diff --git a/.github/ISSUE_TEMPLATE/Bug_Report.md b/.github/ISSUE_TEMPLATE/Bug_Report.md
index dbef2e84987f..f546850f2097 100644
--- a/.github/ISSUE_TEMPLATE/Bug_Report.md
+++ b/.github/ISSUE_TEMPLATE/Bug_Report.md
@@ -34,7 +34,7 @@ If you are running into one of these scenarios, we recommend opening an issue in
-* azurerm_XXXXX
+* `azurerm_XXXXX`
### Terraform Configuration Files
diff --git a/azurerm/config.go b/azurerm/config.go
index e0be1bc82b1a..4f79907fe40c 100644
--- a/azurerm/config.go
+++ b/azurerm/config.go
@@ -45,7 +45,7 @@ import (
"github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi"
"github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights"
"github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"
- "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management"
+ "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
"github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security"
"github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr"
"github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql"
diff --git a/azurerm/data_source_management_group.go b/azurerm/data_source_management_group.go
index 37093d96c17d..7941f844ed3f 100644
--- a/azurerm/data_source_management_group.go
+++ b/azurerm/data_source_management_group.go
@@ -3,7 +3,7 @@ package azurerm
import (
"fmt"
- "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management"
+ "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils"
)
diff --git a/azurerm/resource_arm_cognitive_account.go b/azurerm/resource_arm_cognitive_account.go
index 7ca8b8e71f4f..1b62aef4a0c0 100644
--- a/azurerm/resource_arm_cognitive_account.go
+++ b/azurerm/resource_arm_cognitive_account.go
@@ -76,17 +76,7 @@ func resourceArmCognitiveAccount() *schema.Resource {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{
- string(cognitiveservices.F0),
- string(cognitiveservices.S0),
- string(cognitiveservices.S1),
- string(cognitiveservices.S2),
- string(cognitiveservices.S3),
- string(cognitiveservices.S4),
- string(cognitiveservices.S5),
- string(cognitiveservices.S6),
- string(cognitiveservices.P0),
- string(cognitiveservices.P1),
- string(cognitiveservices.P2),
+ "F0", "S0", "S1", "S2", "S3", "S4", "S5", "S6", "P0", "P1", "P2",
}, false),
},
@@ -139,7 +129,7 @@ func resourceArmCognitiveAccountCreate(d *schema.ResourceData, meta interface{})
sku := expandCognitiveAccountSku(d)
properties := cognitiveservices.AccountCreateParameters{
- Kind: cognitiveservices.Kind(kind),
+ Kind: utils.String(kind),
Location: utils.String(location),
Sku: sku,
Properties: &cognitiveServicesPropertiesStruct{},
@@ -258,7 +248,7 @@ func expandCognitiveAccountSku(d *schema.ResourceData) *cognitiveservices.Sku {
sku := skus[0].(map[string]interface{})
return &cognitiveservices.Sku{
- Name: cognitiveservices.SkuName(sku["name"].(string)),
+ Name: utils.String(sku["name"].(string)),
Tier: cognitiveservices.SkuTier(sku["tier"].(string)),
}
}
@@ -268,10 +258,13 @@ func flattenCognitiveAccountSku(input *cognitiveservices.Sku) []interface{} {
return []interface{}{}
}
- return []interface{}{
- map[string]interface{}{
- "name": string(input.Name),
- "tier": string(input.Tier),
- },
+ m := map[string]interface{}{
+ "tier": string(input.Tier),
+ }
+
+ if v := input.Name; v != nil {
+ m["name"] = *v
}
+
+ return []interface{}{m}
}
diff --git a/azurerm/resource_arm_express_route_circuit.go b/azurerm/resource_arm_express_route_circuit.go
index f10a995e04dc..39601476f4ae 100644
--- a/azurerm/resource_arm_express_route_circuit.go
+++ b/azurerm/resource_arm_express_route_circuit.go
@@ -62,7 +62,6 @@ func resourceArmExpressRouteCircuit() *schema.Resource {
Required: true,
ValidateFunc: validation.StringInSlice([]string{
string(network.Standard),
- string(network.Premium),
}, true),
DiffSuppressFunc: ignoreCaseDiffSuppressFunc,
},
diff --git a/azurerm/resource_arm_firewall_network_rule_collection.go b/azurerm/resource_arm_firewall_network_rule_collection.go
index eda2aed55c1a..6e36a276ba38 100644
--- a/azurerm/resource_arm_firewall_network_rule_collection.go
+++ b/azurerm/resource_arm_firewall_network_rule_collection.go
@@ -93,7 +93,7 @@ func resourceArmFirewallNetworkRuleCollection() *schema.Resource {
Type: schema.TypeString,
ValidateFunc: validation.StringInSlice([]string{
string(network.Any),
- "ICMP", // TODO(metacpp): update it after v22.0.
+ string(network.ICMP),
string(network.TCP),
string(network.UDP),
}, false),
diff --git a/azurerm/resource_arm_management_group.go b/azurerm/resource_arm_management_group.go
index 4c770df7657d..89a2c7bfb757 100644
--- a/azurerm/resource_arm_management_group.go
+++ b/azurerm/resource_arm_management_group.go
@@ -5,7 +5,7 @@ import (
"log"
"strings"
- "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management"
+ "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
"github.com/google/uuid"
"github.com/hashicorp/terraform/helper/schema"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/response"
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md
new file mode 100644
index 000000000000..0786fdf43468
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/CONTRIBUTING.md
@@ -0,0 +1,24 @@
+# How to contribute
+
+We'd love to accept your patches and contributions to this project. There are
+just a few small guidelines you need to follow.
+
+## Contributor License Agreement
+
+Contributions to this project must be accompanied by a Contributor License
+Agreement. You (or your employer) retain the copyright to your contribution,
+this simply gives us permission to use and redistribute your contributions as
+part of the project. Head over to to see
+your current agreements on file or to sign a new one.
+
+You generally only need to submit a CLA once, so if you've already submitted one
+(even if it was for a different project), you probably don't need to do it
+again.
+
+## Code reviews
+
+All submissions, including submissions by project members, require review. We
+use GitHub pull requests for this purpose. Consult [GitHub Help] for more
+information on using pull requests.
+
+[GitHub Help]: https://help.github.com/articles/about-pull-requests/
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE b/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE
new file mode 100644
index 000000000000..261eeb9e9f8b
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md b/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md
new file mode 100644
index 000000000000..3b9e908f5967
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/README.md
@@ -0,0 +1,61 @@
+# OpenCensus Agent Go Exporter
+
+[![Build Status][travis-image]][travis-url] [![GoDoc][godoc-image]][godoc-url]
+
+
+This repository contains the Go implementation of the OpenCensus Agent (OC-Agent) Exporter.
+OC-Agent is a deamon process running in a VM that can retrieve spans/stats/metrics from
+OpenCensus Library, export them to other backends and possibly push configurations back to
+Library. See more details on [OC-Agent Readme][OCAgentReadme].
+
+Note: This is an experimental repository and is likely to get backwards-incompatible changes.
+Ultimately we may want to move the OC-Agent Go Exporter to [OpenCensus Go core library][OpenCensusGo].
+
+## Installation
+
+```bash
+$ go get -u contrib.go.opencensus.io/exporter/ocagent
+```
+
+## Usage
+
+```go
+import (
+ "context"
+ "fmt"
+ "log"
+ "time"
+
+ "contrib.go.opencensus.io/exporter/ocagent"
+ "go.opencensus.io/trace"
+)
+
+func Example() {
+ exp, err := ocagent.NewExporter(ocagent.WithInsecure(), ocagent.WithServiceName("your-service-name"))
+ if err != nil {
+ log.Fatalf("Failed to create the agent exporter: %v", err)
+ }
+ defer exp.Stop()
+
+ // Now register it as a trace exporter.
+ trace.RegisterExporter(exp)
+
+ // Then use the OpenCensus tracing library, like we normally would.
+ ctx, span := trace.StartSpan(context.Background(), "AgentExporter-Example")
+ defer span.End()
+
+ for i := 0; i < 10; i++ {
+ _, iSpan := trace.StartSpan(ctx, fmt.Sprintf("Sample-%d", i))
+ <-time.After(6 * time.Millisecond)
+ iSpan.End()
+ }
+}
+```
+
+[OCAgentReadme]: https://github.com/census-instrumentation/opencensus-proto/tree/master/opencensus/proto/agent#opencensus-agent-proto
+[OpenCensusGo]: https://github.com/census-instrumentation/opencensus-go
+[godoc-image]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent?status.svg
+[godoc-url]: https://godoc.org/contrib.go.opencensus.io/exporter/ocagent
+[travis-image]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent.svg?branch=master
+[travis-url]: https://travis-ci.org/census-ecosystem/opencensus-go-exporter-ocagent
+
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go
new file mode 100644
index 000000000000..297e44b6e76d
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/common.go
@@ -0,0 +1,38 @@
+// Copyright 2018, OpenCensus Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ocagent
+
+import (
+ "math/rand"
+ "time"
+)
+
+var randSrc = rand.New(rand.NewSource(time.Now().UnixNano()))
+
+// retries function fn upto n times, if fn returns an error lest it returns nil early.
+// It applies exponential backoff in units of (1<= maxAnnotationEventsPerSpan {
+ droppedAnnotationsCount = len(as) - i
+ break
+ }
+ annotations++
+ timeEvents.TimeEvent = append(timeEvents.TimeEvent,
+ &tracepb.Span_TimeEvent{
+ Time: timeToTimestamp(a.Time),
+ Value: transformAnnotationToTimeEvent(&a),
+ },
+ )
+ }
+
+ // Transform message events
+ for i, e := range es {
+ if messageEvents >= maxMessageEventsPerSpan {
+ droppedMessageEventsCount = len(es) - i
+ break
+ }
+ messageEvents++
+ timeEvents.TimeEvent = append(timeEvents.TimeEvent,
+ &tracepb.Span_TimeEvent{
+ Time: timeToTimestamp(e.Time),
+ Value: transformMessageEventToTimeEvent(&e),
+ },
+ )
+ }
+
+ // Process dropped counter
+ timeEvents.DroppedAnnotationsCount = clip32(droppedAnnotationsCount)
+ timeEvents.DroppedMessageEventsCount = clip32(droppedMessageEventsCount)
+
+ return timeEvents
+}
+
+func transformAnnotationToTimeEvent(a *trace.Annotation) *tracepb.Span_TimeEvent_Annotation_ {
+ return &tracepb.Span_TimeEvent_Annotation_{
+ Annotation: &tracepb.Span_TimeEvent_Annotation{
+ Description: &tracepb.TruncatableString{Value: a.Message},
+ Attributes: ocAttributesToProtoAttributes(a.Attributes),
+ },
+ }
+}
+
+func transformMessageEventToTimeEvent(e *trace.MessageEvent) *tracepb.Span_TimeEvent_MessageEvent_ {
+ return &tracepb.Span_TimeEvent_MessageEvent_{
+ MessageEvent: &tracepb.Span_TimeEvent_MessageEvent{
+ Type: tracepb.Span_TimeEvent_MessageEvent_Type(e.EventType),
+ Id: uint64(e.MessageID),
+ UncompressedSize: uint64(e.UncompressedByteSize),
+ CompressedSize: uint64(e.CompressedByteSize),
+ },
+ }
+}
+
+// clip32 clips an int to the range of an int32.
+func clip32(x int) int32 {
+ if x < math.MinInt32 {
+ return math.MinInt32
+ }
+ if x > math.MaxInt32 {
+ return math.MaxInt32
+ }
+ return int32(x)
+}
+
+func timeToTimestamp(t time.Time) *timestamp.Timestamp {
+ nanoTime := t.UnixNano()
+ return ×tamp.Timestamp{
+ Seconds: nanoTime / 1e9,
+ Nanos: int32(nanoTime % 1e9),
+ }
+}
+
+func ocSpanKindToProtoSpanKind(kind int) tracepb.Span_SpanKind {
+ switch kind {
+ case trace.SpanKindClient:
+ return tracepb.Span_CLIENT
+ case trace.SpanKindServer:
+ return tracepb.Span_SERVER
+ default:
+ return tracepb.Span_SPAN_KIND_UNSPECIFIED
+ }
+}
+
+func ocTracestateToProtoTracestate(ts *tracestate.Tracestate) *tracepb.Span_Tracestate {
+ if ts == nil {
+ return nil
+ }
+ return &tracepb.Span_Tracestate{
+ Entries: ocTracestateEntriesToProtoTracestateEntries(ts.Entries()),
+ }
+}
+
+func ocTracestateEntriesToProtoTracestateEntries(entries []tracestate.Entry) []*tracepb.Span_Tracestate_Entry {
+ protoEntries := make([]*tracepb.Span_Tracestate_Entry, 0, len(entries))
+ for _, entry := range entries {
+ protoEntries = append(protoEntries, &tracepb.Span_Tracestate_Entry{
+ Key: entry.Key,
+ Value: entry.Value,
+ })
+ }
+ return protoEntries
+}
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go
new file mode 100644
index 000000000000..855708ab8360
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/transform_stats_to_metrics.go
@@ -0,0 +1,294 @@
+// Copyright 2018, OpenCensus Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ocagent
+
+import (
+ "errors"
+ "time"
+
+ "go.opencensus.io/exemplar"
+ "go.opencensus.io/stats"
+ "go.opencensus.io/stats/view"
+ "go.opencensus.io/tag"
+
+ "github.com/golang/protobuf/ptypes/timestamp"
+
+ metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1"
+)
+
+var (
+ errNilMeasure = errors.New("expecting a non-nil stats.Measure")
+ errNilView = errors.New("expecting a non-nil view.View")
+ errNilViewData = errors.New("expecting a non-nil view.Data")
+)
+
+func viewDataToMetric(vd *view.Data) (*metricspb.Metric, error) {
+ if vd == nil {
+ return nil, errNilViewData
+ }
+
+ descriptor, err := viewToMetricDescriptor(vd.View)
+ if err != nil {
+ return nil, err
+ }
+
+ timeseries, err := viewDataToTimeseries(vd)
+ if err != nil {
+ return nil, err
+ }
+
+ metric := &metricspb.Metric{
+ Descriptor_: descriptor,
+ Timeseries: timeseries,
+ }
+ return metric, nil
+}
+
+func viewToMetricDescriptor(v *view.View) (*metricspb.Metric_MetricDescriptor, error) {
+ if v == nil {
+ return nil, errNilView
+ }
+ if v.Measure == nil {
+ return nil, errNilMeasure
+ }
+
+ desc := &metricspb.Metric_MetricDescriptor{
+ MetricDescriptor: &metricspb.MetricDescriptor{
+ Name: stringOrCall(v.Name, v.Measure.Name),
+ Description: stringOrCall(v.Description, v.Measure.Description),
+ Unit: v.Measure.Unit(),
+ Type: aggregationToMetricDescriptorType(v),
+ LabelKeys: tagKeysToLabelKeys(v.TagKeys),
+ },
+ }
+ return desc, nil
+}
+
+func stringOrCall(first string, call func() string) string {
+ if first != "" {
+ return first
+ }
+ return call()
+}
+
+type measureType uint
+
+const (
+ measureUnknown measureType = iota
+ measureInt64
+ measureFloat64
+)
+
+func measureTypeFromMeasure(m stats.Measure) measureType {
+ switch m.(type) {
+ default:
+ return measureUnknown
+ case *stats.Float64Measure:
+ return measureFloat64
+ case *stats.Int64Measure:
+ return measureInt64
+ }
+}
+
+func aggregationToMetricDescriptorType(v *view.View) metricspb.MetricDescriptor_Type {
+ if v == nil || v.Aggregation == nil {
+ return metricspb.MetricDescriptor_UNSPECIFIED
+ }
+ if v.Measure == nil {
+ return metricspb.MetricDescriptor_UNSPECIFIED
+ }
+
+ switch v.Aggregation.Type {
+ case view.AggTypeCount:
+ // Cumulative on int64
+ return metricspb.MetricDescriptor_CUMULATIVE_INT64
+
+ case view.AggTypeDistribution:
+ // Cumulative types
+ return metricspb.MetricDescriptor_CUMULATIVE_DISTRIBUTION
+
+ case view.AggTypeLastValue:
+ // Gauge types
+ switch measureTypeFromMeasure(v.Measure) {
+ case measureFloat64:
+ return metricspb.MetricDescriptor_GAUGE_DOUBLE
+ case measureInt64:
+ return metricspb.MetricDescriptor_GAUGE_INT64
+ }
+
+ case view.AggTypeSum:
+ // Cumulative types
+ switch measureTypeFromMeasure(v.Measure) {
+ case measureFloat64:
+ return metricspb.MetricDescriptor_CUMULATIVE_DOUBLE
+ case measureInt64:
+ return metricspb.MetricDescriptor_CUMULATIVE_INT64
+ }
+ }
+
+ // For all other cases, return unspecified.
+ return metricspb.MetricDescriptor_UNSPECIFIED
+}
+
+func tagKeysToLabelKeys(tagKeys []tag.Key) []*metricspb.LabelKey {
+ labelKeys := make([]*metricspb.LabelKey, 0, len(tagKeys))
+ for _, tagKey := range tagKeys {
+ labelKeys = append(labelKeys, &metricspb.LabelKey{
+ Key: tagKey.Name(),
+ })
+ }
+ return labelKeys
+}
+
+func viewDataToTimeseries(vd *view.Data) ([]*metricspb.TimeSeries, error) {
+ if vd == nil || len(vd.Rows) == 0 {
+ return nil, nil
+ }
+
+ // Given that view.Data only contains Start, End
+ // the timestamps for all the row data will be the exact same
+ // per aggregation. However, the values will differ.
+ // Each row has its own tags.
+ startTimestamp := timeToProtoTimestamp(vd.Start)
+ endTimestamp := timeToProtoTimestamp(vd.End)
+
+ mType := measureTypeFromMeasure(vd.View.Measure)
+ timeseries := make([]*metricspb.TimeSeries, 0, len(vd.Rows))
+ // It is imperative that the ordering of "LabelValues" matches those
+ // of the Label keys in the metric descriptor.
+ for _, row := range vd.Rows {
+ labelValues := labelValuesFromTags(row.Tags)
+ point := rowToPoint(vd.View, row, endTimestamp, mType)
+ timeseries = append(timeseries, &metricspb.TimeSeries{
+ StartTimestamp: startTimestamp,
+ LabelValues: labelValues,
+ Points: []*metricspb.Point{point},
+ })
+ }
+
+ if len(timeseries) == 0 {
+ return nil, nil
+ }
+
+ return timeseries, nil
+}
+
+func timeToProtoTimestamp(t time.Time) *timestamp.Timestamp {
+ unixNano := t.UnixNano()
+ return ×tamp.Timestamp{
+ Seconds: int64(unixNano / 1e9),
+ Nanos: int32(unixNano % 1e9),
+ }
+}
+
+func rowToPoint(v *view.View, row *view.Row, endTimestamp *timestamp.Timestamp, mType measureType) *metricspb.Point {
+ pt := &metricspb.Point{
+ Timestamp: endTimestamp,
+ }
+
+ switch data := row.Data.(type) {
+ case *view.CountData:
+ pt.Value = &metricspb.Point_Int64Value{Int64Value: data.Value}
+
+ case *view.DistributionData:
+ pt.Value = &metricspb.Point_DistributionValue{
+ DistributionValue: &metricspb.DistributionValue{
+ Count: data.Count,
+ Sum: float64(data.Count) * data.Mean, // because Mean := Sum/Count
+ Buckets: bucketsToProtoBuckets(data.CountPerBucket, data.ExemplarsPerBucket),
+ BucketOptions: &metricspb.DistributionValue_BucketOptions{
+ Type: &metricspb.DistributionValue_BucketOptions_Explicit_{
+ Explicit: &metricspb.DistributionValue_BucketOptions_Explicit{
+ Bounds: v.Aggregation.Buckets,
+ },
+ },
+ },
+ SumOfSquaredDeviation: data.SumOfSquaredDev,
+ }}
+
+ case *view.LastValueData:
+ setPointValue(pt, data.Value, mType)
+
+ case *view.SumData:
+ setPointValue(pt, data.Value, mType)
+ }
+
+ return pt
+}
+
+// Not returning anything from this function because metricspb.Point.is_Value is an unexported
+// interface hence we just have to set its value by pointer.
+func setPointValue(pt *metricspb.Point, value float64, mType measureType) {
+ if mType == measureInt64 {
+ pt.Value = &metricspb.Point_Int64Value{Int64Value: int64(value)}
+ } else {
+ pt.Value = &metricspb.Point_DoubleValue{DoubleValue: value}
+ }
+}
+
+// countPerBucket and exemplars are of the same length in well formed data,
+// otherwise ensure that even if exemplars are non-existent that we always
+// insert counts and create distribution value buckets.
+func bucketsToProtoBuckets(countPerBucket []int64, exemplars []*exemplar.Exemplar) []*metricspb.DistributionValue_Bucket {
+ distBuckets := make([]*metricspb.DistributionValue_Bucket, len(countPerBucket))
+ for i := 0; i < len(countPerBucket); i++ {
+ count := countPerBucket[i]
+
+ var exmplr *exemplar.Exemplar
+ if i < len(exemplars) {
+ exmplr = exemplars[i]
+ }
+
+ var protoExemplar *metricspb.DistributionValue_Exemplar
+ if exmplr != nil {
+ protoExemplar = &metricspb.DistributionValue_Exemplar{
+ Value: exmplr.Value,
+ Timestamp: timeToTimestamp(exmplr.Timestamp),
+ Attachments: exmplr.Attachments,
+ }
+ }
+
+ distBuckets[i] = &metricspb.DistributionValue_Bucket{
+ Count: count,
+ Exemplar: protoExemplar,
+ }
+ }
+
+ return distBuckets
+}
+
+func labelValuesFromTags(tags []tag.Tag) []*metricspb.LabelValue {
+ if len(tags) == 0 {
+ return nil
+ }
+
+ labelValues := make([]*metricspb.LabelValue, 0, len(tags))
+ for _, tag_ := range tags {
+ labelValues = append(labelValues, &metricspb.LabelValue{
+ Value: tag_.Value,
+
+ // It is imperative that we set the "HasValue" attribute,
+ // in order to distinguish missing a label from the empty string.
+ // https://godoc.org/github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1#LabelValue.HasValue
+ //
+ // OpenCensus-Go uses non-pointers for tags as seen by this function's arguments,
+ // so the best case that we can use to distinguish missing labels/tags from the
+ // empty string is by checking if the Tag.Key.Name() != "" to indicate that we have
+ // a value.
+ HasValue: tag_.Key.Name() != "",
+ })
+ }
+ return labelValues
+}
diff --git a/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go b/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go
new file mode 100644
index 000000000000..68be4c75bde7
--- /dev/null
+++ b/vendor/contrib.go.opencensus.io/exporter/ocagent/version.go
@@ -0,0 +1,17 @@
+// Copyright 2018, OpenCensus Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ocagent
+
+const Version = "0.0.1"
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources/models.go
index c1e080fbdbb8..cbe939d82b38 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/profiles/2017-03-09/resources/mgmt/resources/models.go
@@ -19,16 +19,16 @@
package resources
-import original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources"
+import (
+ "context"
+
+ original "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2016-02-01/resources"
+)
const (
DefaultBaseURI = original.DefaultBaseURI
)
-type BaseClient = original.BaseClient
-type DeploymentOperationsClient = original.DeploymentOperationsClient
-type DeploymentsClient = original.DeploymentsClient
-type GroupsClient = original.GroupsClient
type DeploymentMode = original.DeploymentMode
const (
@@ -44,7 +44,9 @@ const (
type AliasPathType = original.AliasPathType
type AliasType = original.AliasType
+type BaseClient = original.BaseClient
type BasicDependency = original.BasicDependency
+type Client = original.Client
type DebugSetting = original.DebugSetting
type Dependency = original.Dependency
type Deployment = original.Deployment
@@ -56,14 +58,16 @@ type DeploymentListResultIterator = original.DeploymentListResultIterator
type DeploymentListResultPage = original.DeploymentListResultPage
type DeploymentOperation = original.DeploymentOperation
type DeploymentOperationProperties = original.DeploymentOperationProperties
+type DeploymentOperationsClient = original.DeploymentOperationsClient
type DeploymentOperationsListResult = original.DeploymentOperationsListResult
type DeploymentOperationsListResultIterator = original.DeploymentOperationsListResultIterator
type DeploymentOperationsListResultPage = original.DeploymentOperationsListResultPage
type DeploymentProperties = original.DeploymentProperties
type DeploymentPropertiesExtended = original.DeploymentPropertiesExtended
+type DeploymentValidateResult = original.DeploymentValidateResult
+type DeploymentsClient = original.DeploymentsClient
type DeploymentsCreateOrUpdateFuture = original.DeploymentsCreateOrUpdateFuture
type DeploymentsDeleteFuture = original.DeploymentsDeleteFuture
-type DeploymentValidateResult = original.DeploymentValidateResult
type ExportTemplateRequest = original.ExportTemplateRequest
type GenericResource = original.GenericResource
type GenericResourceFilter = original.GenericResourceFilter
@@ -74,6 +78,7 @@ type GroupListResult = original.GroupListResult
type GroupListResultIterator = original.GroupListResultIterator
type GroupListResultPage = original.GroupListResultPage
type GroupProperties = original.GroupProperties
+type GroupsClient = original.GroupsClient
type GroupsDeleteFuture = original.GroupsDeleteFuture
type HTTPMessage = original.HTTPMessage
type Identity = original.Identity
@@ -91,27 +96,35 @@ type ProviderListResultIterator = original.ProviderListResultIterator
type ProviderListResultPage = original.ProviderListResultPage
type ProviderOperationDisplayProperties = original.ProviderOperationDisplayProperties
type ProviderResourceType = original.ProviderResourceType
+type ProvidersClient = original.ProvidersClient
type Resource = original.Resource
type Sku = original.Sku
type SubResource = original.SubResource
type TagCount = original.TagCount
type TagDetails = original.TagDetails
+type TagValue = original.TagValue
+type TagsClient = original.TagsClient
type TagsListResult = original.TagsListResult
type TagsListResultIterator = original.TagsListResultIterator
type TagsListResultPage = original.TagsListResultPage
-type TagValue = original.TagValue
type TargetResource = original.TargetResource
type TemplateLink = original.TemplateLink
type UpdateFuture = original.UpdateFuture
-type ProvidersClient = original.ProvidersClient
-type Client = original.Client
-type TagsClient = original.TagsClient
func New(subscriptionID string) BaseClient {
return original.New(subscriptionID)
}
-func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
- return original.NewWithBaseURI(baseURI, subscriptionID)
+func NewClient(subscriptionID string) Client {
+ return original.NewClient(subscriptionID)
+}
+func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
+ return original.NewClientWithBaseURI(baseURI, subscriptionID)
+}
+func NewDeploymentListResultIterator(page DeploymentListResultPage) DeploymentListResultIterator {
+ return original.NewDeploymentListResultIterator(page)
+}
+func NewDeploymentListResultPage(getNextPage func(context.Context, DeploymentListResult) (DeploymentListResult, error)) DeploymentListResultPage {
+ return original.NewDeploymentListResultPage(getNextPage)
}
func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsClient {
return original.NewDeploymentOperationsClient(subscriptionID)
@@ -119,23 +132,41 @@ func NewDeploymentOperationsClient(subscriptionID string) DeploymentOperationsCl
func NewDeploymentOperationsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentOperationsClient {
return original.NewDeploymentOperationsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewDeploymentOperationsListResultIterator(page DeploymentOperationsListResultPage) DeploymentOperationsListResultIterator {
+ return original.NewDeploymentOperationsListResultIterator(page)
+}
+func NewDeploymentOperationsListResultPage(getNextPage func(context.Context, DeploymentOperationsListResult) (DeploymentOperationsListResult, error)) DeploymentOperationsListResultPage {
+ return original.NewDeploymentOperationsListResultPage(getNextPage)
+}
func NewDeploymentsClient(subscriptionID string) DeploymentsClient {
return original.NewDeploymentsClient(subscriptionID)
}
func NewDeploymentsClientWithBaseURI(baseURI string, subscriptionID string) DeploymentsClient {
return original.NewDeploymentsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator {
+ return original.NewGroupListResultIterator(page)
+}
+func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return original.NewGroupListResultPage(getNextPage)
+}
func NewGroupsClient(subscriptionID string) GroupsClient {
return original.NewGroupsClient(subscriptionID)
}
func NewGroupsClientWithBaseURI(baseURI string, subscriptionID string) GroupsClient {
return original.NewGroupsClientWithBaseURI(baseURI, subscriptionID)
}
-func PossibleDeploymentModeValues() []DeploymentMode {
- return original.PossibleDeploymentModeValues()
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return original.NewListResultIterator(page)
}
-func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
- return original.PossibleResourceIdentityTypeValues()
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return original.NewListResultPage(getNextPage)
+}
+func NewProviderListResultIterator(page ProviderListResultPage) ProviderListResultIterator {
+ return original.NewProviderListResultIterator(page)
+}
+func NewProviderListResultPage(getNextPage func(context.Context, ProviderListResult) (ProviderListResult, error)) ProviderListResultPage {
+ return original.NewProviderListResultPage(getNextPage)
}
func NewProvidersClient(subscriptionID string) ProvidersClient {
return original.NewProvidersClient(subscriptionID)
@@ -143,18 +174,27 @@ func NewProvidersClient(subscriptionID string) ProvidersClient {
func NewProvidersClientWithBaseURI(baseURI string, subscriptionID string) ProvidersClient {
return original.NewProvidersClientWithBaseURI(baseURI, subscriptionID)
}
-func NewClient(subscriptionID string) Client {
- return original.NewClient(subscriptionID)
-}
-func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
- return original.NewClientWithBaseURI(baseURI, subscriptionID)
-}
func NewTagsClient(subscriptionID string) TagsClient {
return original.NewTagsClient(subscriptionID)
}
func NewTagsClientWithBaseURI(baseURI string, subscriptionID string) TagsClient {
return original.NewTagsClientWithBaseURI(baseURI, subscriptionID)
}
+func NewTagsListResultIterator(page TagsListResultPage) TagsListResultIterator {
+ return original.NewTagsListResultIterator(page)
+}
+func NewTagsListResultPage(getNextPage func(context.Context, TagsListResult) (TagsListResult, error)) TagsListResultPage {
+ return original.NewTagsListResultPage(getNextPage)
+}
+func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
+ return original.NewWithBaseURI(baseURI, subscriptionID)
+}
+func PossibleDeploymentModeValues() []DeploymentMode {
+ return original.PossibleDeploymentModeValues()
+}
+func PossibleResourceIdentityTypeValues() []ResourceIdentityType {
+ return original.PossibleResourceIdentityTypeValues()
+}
func UserAgent() string {
return original.UserAgent() + " profiles/2017-03-09"
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go
index c4949b0fa0bc..6cae13130257 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/analyticsitems.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewAnalyticsItemsClientWithBaseURI(baseURI string, subscriptionID string) A
// ID - the Id of a specific item defined in the Application Insights component
// name - the name of a specific item defined in the Application Insights component
func (client AnalyticsItemsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnalyticsItemsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, scopePath, ID, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Delete", nil, "Failure preparing request")
@@ -125,6 +136,16 @@ func (client AnalyticsItemsClient) DeleteResponder(resp *http.Response) (result
// ID - the Id of a specific item defined in the Application Insights component
// name - the name of a specific item defined in the Application Insights component
func (client AnalyticsItemsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, ID string, name string) (result ApplicationInsightsComponentAnalyticsItem, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnalyticsItemsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, scopePath, ID, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Get", nil, "Failure preparing request")
@@ -206,6 +227,16 @@ func (client AnalyticsItemsClient) GetResponder(resp *http.Response) (result App
// includeContent - flag indicating whether or not to return the content of each applicable item. If false,
// only return the item information.
func (client AnalyticsItemsClient) List(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, scope ItemScope, typeParameter ItemTypeParameter, includeContent *bool) (result ListApplicationInsightsComponentAnalyticsItem, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnalyticsItemsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName, scopePath, scope, typeParameter, includeContent)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "List", nil, "Failure preparing request")
@@ -293,6 +324,16 @@ func (client AnalyticsItemsClient) ListResponder(resp *http.Response) (result Li
// overrideItem - flag indicating whether or not to force save an item. This allows overriding an item if it
// already exists.
func (client AnalyticsItemsClient) Put(ctx context.Context, resourceGroupName string, resourceName string, scopePath ItemScopePath, itemProperties ApplicationInsightsComponentAnalyticsItem, overrideItem *bool) (result ApplicationInsightsComponentAnalyticsItem, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnalyticsItemsClient.Put")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PutPreparer(ctx, resourceGroupName, resourceName, scopePath, itemProperties, overrideItem)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnalyticsItemsClient", "Put", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go
index fab37ef31a3c..badc8bddc5b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/annotations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAnnotationsClientWithBaseURI(baseURI string, subscriptionID string) Anno
// annotationProperties - properties that need to be specified to create an annotation of a Application
// Insights component.
func (client AnnotationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, annotationProperties Annotation) (result ListAnnotation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnnotationsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, annotationProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "Create", nil, "Failure preparing request")
@@ -116,6 +127,16 @@ func (client AnnotationsClient) CreateResponder(resp *http.Response) (result Lis
// resourceName - the name of the Application Insights component resource.
// annotationID - the unique annotation ID. This is unique within a Application Insights component.
func (client AnnotationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnnotationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, annotationID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client AnnotationsClient) DeleteResponder(resp *http.Response) (result Set
// resourceName - the name of the Application Insights component resource.
// annotationID - the unique annotation ID. This is unique within a Application Insights component.
func (client AnnotationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, annotationID string) (result ListAnnotation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnnotationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, annotationID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "Get", nil, "Failure preparing request")
@@ -255,6 +286,16 @@ func (client AnnotationsClient) GetResponder(resp *http.Response) (result ListAn
// start - the start time to query from for annotations, cannot be older than 90 days from current date.
// end - the end time to query for annotations.
func (client AnnotationsClient) List(ctx context.Context, resourceGroupName string, resourceName string, start string, end string) (result AnnotationsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AnnotationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName, start, end)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AnnotationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/apikeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/apikeys.go
index 601b384c32fe..335aae099a13 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/apikeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/apikeys.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAPIKeysClientWithBaseURI(baseURI string, subscriptionID string) APIKeysC
// APIKeyProperties - properties that need to be specified to create an API key of a Application Insights
// component.
func (client APIKeysClient) Create(ctx context.Context, resourceGroupName string, resourceName string, APIKeyProperties APIKeyRequest) (result ApplicationInsightsComponentAPIKey, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIKeysClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, APIKeyProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.APIKeysClient", "Create", nil, "Failure preparing request")
@@ -116,6 +127,16 @@ func (client APIKeysClient) CreateResponder(resp *http.Response) (result Applica
// resourceName - the name of the Application Insights component resource.
// keyID - the API Key ID. This is unique within a Application Insights component.
func (client APIKeysClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, keyID string) (result ApplicationInsightsComponentAPIKey, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIKeysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, keyID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.APIKeysClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client APIKeysClient) DeleteResponder(resp *http.Response) (result Applica
// resourceName - the name of the Application Insights component resource.
// keyID - the API Key ID. This is unique within a Application Insights component.
func (client APIKeysClient) Get(ctx context.Context, resourceGroupName string, resourceName string, keyID string) (result ApplicationInsightsComponentAPIKey, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIKeysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, keyID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.APIKeysClient", "Get", nil, "Failure preparing request")
@@ -253,6 +284,16 @@ func (client APIKeysClient) GetResponder(resp *http.Response) (result Applicatio
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client APIKeysClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponentAPIKeyListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIKeysClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.APIKeysClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go
index 81aff2abd2d3..f3bad06a7795 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentavailablefeatures.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewComponentAvailableFeaturesClientWithBaseURI(baseURI string, subscription
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentAvailableFeaturesClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponentAvailableFeatures, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentAvailableFeaturesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentAvailableFeaturesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go
index 7b983c7c66ac..a8377cfcfee6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentcurrentbillingfeatures.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewComponentCurrentBillingFeaturesClientWithBaseURI(baseURI string, subscri
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentCurrentBillingFeaturesClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponentBillingFeatures, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentCurrentBillingFeaturesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentCurrentBillingFeaturesClient", "Get", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client ComponentCurrentBillingFeaturesClient) GetResponder(resp *http.Resp
// billingFeaturesProperties - properties that need to be specified to update billing features for an
// Application Insights component.
func (client ComponentCurrentBillingFeaturesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, billingFeaturesProperties ApplicationInsightsComponentBillingFeatures) (result ApplicationInsightsComponentBillingFeatures, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentCurrentBillingFeaturesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, billingFeaturesProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentCurrentBillingFeaturesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go
index 5e0ac6512866..6e8b2c4f5f3a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentfeaturecapabilities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -40,11 +41,21 @@ func NewComponentFeatureCapabilitiesClientWithBaseURI(baseURI string, subscripti
return ComponentFeatureCapabilitiesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// Get returns feature capabilites of the application insights component.
+// Get returns feature capabilities of the application insights component.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentFeatureCapabilitiesClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponentFeatureCapabilities, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentFeatureCapabilitiesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentFeatureCapabilitiesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go
index 24dbba59d652..85c74ca43e41 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/componentquotastatus.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewComponentQuotaStatusClientWithBaseURI(baseURI string, subscriptionID str
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentQuotaStatusClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponentQuotaStatus, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentQuotaStatusClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentQuotaStatusClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
index e52d86e5f36c..773ecb4b8668 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/components.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewComponentsClientWithBaseURI(baseURI string, subscriptionID string) Compo
// resourceName - the name of the Application Insights component resource.
// insightProperties - properties that need to be specified to create an Application Insights component.
func (client ComponentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, insightProperties ApplicationInsightsComponent) (result ApplicationInsightsComponent, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.CreateOrUpdate")
+ 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: insightProperties,
Constraints: []validation.Constraint{{Target: "insightProperties.Kind", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -122,6 +133,16 @@ func (client ComponentsClient) CreateOrUpdateResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "Delete", nil, "Failure preparing request")
@@ -188,6 +209,16 @@ func (client ComponentsClient) DeleteResponder(resp *http.Response) (result auto
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ComponentsClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsComponent, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "Get", nil, "Failure preparing request")
@@ -256,6 +287,16 @@ func (client ComponentsClient) GetResponder(resp *http.Response) (result Applica
// resourceName - the name of the Application Insights component resource.
// purgeID - in a purge status request, this is the Id of the operation the status of which is returned.
func (client ComponentsClient) GetPurgeStatus(ctx context.Context, resourceGroupName string, resourceName string, purgeID string) (result ComponentPurgeStatusResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.GetPurgeStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPurgeStatusPreparer(ctx, resourceGroupName, resourceName, purgeID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "GetPurgeStatus", nil, "Failure preparing request")
@@ -321,6 +362,16 @@ func (client ComponentsClient) GetPurgeStatusResponder(resp *http.Response) (res
// List gets a list of all Application Insights components within a subscription.
func (client ComponentsClient) List(ctx context.Context) (result ApplicationInsightsComponentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.List")
+ defer func() {
+ sc := -1
+ if result.aiclr.Response.Response != nil {
+ sc = result.aiclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -383,8 +434,8 @@ func (client ComponentsClient) ListResponder(resp *http.Response) (result Applic
}
// listNextResults retrieves the next set of results, if any.
-func (client ComponentsClient) listNextResults(lastResults ApplicationInsightsComponentListResult) (result ApplicationInsightsComponentListResult, err error) {
- req, err := lastResults.applicationInsightsComponentListResultPreparer()
+func (client ComponentsClient) listNextResults(ctx context.Context, lastResults ApplicationInsightsComponentListResult) (result ApplicationInsightsComponentListResult, err error) {
+ req, err := lastResults.applicationInsightsComponentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.ComponentsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -405,6 +456,16 @@ func (client ComponentsClient) listNextResults(lastResults ApplicationInsightsCo
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ComponentsClient) ListComplete(ctx context.Context) (result ApplicationInsightsComponentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.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
}
@@ -413,6 +474,16 @@ func (client ComponentsClient) ListComplete(ctx context.Context) (result Applica
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ComponentsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ApplicationInsightsComponentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.aiclr.Response.Response != nil {
+ sc = result.aiclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -476,8 +547,8 @@ func (client ComponentsClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ComponentsClient) listByResourceGroupNextResults(lastResults ApplicationInsightsComponentListResult) (result ApplicationInsightsComponentListResult, err error) {
- req, err := lastResults.applicationInsightsComponentListResultPreparer()
+func (client ComponentsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ApplicationInsightsComponentListResult) (result ApplicationInsightsComponentListResult, err error) {
+ req, err := lastResults.applicationInsightsComponentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.ComponentsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -498,6 +569,16 @@ func (client ComponentsClient) listByResourceGroupNextResults(lastResults Applic
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ComponentsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ApplicationInsightsComponentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -508,6 +589,16 @@ func (client ComponentsClient) ListByResourceGroupComplete(ctx context.Context,
// resourceName - the name of the Application Insights component resource.
// body - describes the body of a request to purge data in a single table of an Application Insights component
func (client ComponentsClient) Purge(ctx context.Context, resourceGroupName string, resourceName string, body ComponentPurgeBody) (result ComponentPurgeResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.Purge")
+ 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: body,
Constraints: []validation.Constraint{{Target: "body.Table", Name: validation.Null, Rule: true, Chain: nil},
@@ -585,6 +676,16 @@ func (client ComponentsClient) PurgeResponder(resp *http.Response) (result Compo
// resourceName - the name of the Application Insights component resource.
// componentTags - updated tag information to set into the component instance.
func (client ComponentsClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, componentTags TagsResource) (result ApplicationInsightsComponent, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComponentsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, componentTags)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ComponentsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go
index ab8cbf207fdf..105952def012 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/exportconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewExportConfigurationsClientWithBaseURI(baseURI string, subscriptionID str
// exportProperties - properties that need to be specified to create a Continuous Export configuration of a
// Application Insights component.
func (client ExportConfigurationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, exportProperties ApplicationInsightsComponentExportRequest) (result ListApplicationInsightsComponentExportConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExportConfigurationsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, exportProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ExportConfigurationsClient", "Create", nil, "Failure preparing request")
@@ -116,6 +127,16 @@ func (client ExportConfigurationsClient) CreateResponder(resp *http.Response) (r
// resourceName - the name of the Application Insights component resource.
// exportID - the Continuous Export configuration ID. This is unique within a Application Insights component.
func (client ExportConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, exportID string) (result ApplicationInsightsComponentExportConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExportConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, exportID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ExportConfigurationsClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client ExportConfigurationsClient) DeleteResponder(resp *http.Response) (r
// resourceName - the name of the Application Insights component resource.
// exportID - the Continuous Export configuration ID. This is unique within a Application Insights component.
func (client ExportConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, exportID string) (result ApplicationInsightsComponentExportConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExportConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, exportID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ExportConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -253,6 +284,16 @@ func (client ExportConfigurationsClient) GetResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ExportConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result ListApplicationInsightsComponentExportConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExportConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ExportConfigurationsClient", "List", nil, "Failure preparing request")
@@ -322,6 +363,16 @@ func (client ExportConfigurationsClient) ListResponder(resp *http.Response) (res
// exportID - the Continuous Export configuration ID. This is unique within a Application Insights component.
// exportProperties - properties that need to be specified to update the Continuous Export configuration.
func (client ExportConfigurationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, exportID string, exportProperties ApplicationInsightsComponentExportRequest) (result ApplicationInsightsComponentExportConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExportConfigurationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, exportID, exportProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ExportConfigurationsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go
index 3da83bbe489d..d4f322684731 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/favorites.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewFavoritesClientWithBaseURI(baseURI string, subscriptionID string) Favori
// favoriteProperties - properties that need to be specified to create a new favorite and add it to an
// Application Insights component.
func (client FavoritesClient) Add(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FavoritesClient.Add")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.AddPreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Add", nil, "Failure preparing request")
@@ -118,6 +129,16 @@ func (client FavoritesClient) AddResponder(resp *http.Response) (result Applicat
// resourceName - the name of the Application Insights component resource.
// favoriteID - the Id of a specific favorite defined in the Application Insights component
func (client FavoritesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FavoritesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, favoriteID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client FavoritesClient) DeleteResponder(resp *http.Response) (result autor
// resourceName - the name of the Application Insights component resource.
// favoriteID - the Id of a specific favorite defined in the Application Insights component
func (client FavoritesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string) (result ApplicationInsightsComponentFavorite, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FavoritesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, favoriteID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Get", nil, "Failure preparing request")
@@ -260,6 +291,16 @@ func (client FavoritesClient) GetResponder(resp *http.Response) (result Applicat
// false, only return summary content for favorites.
// tags - tags that must be present on each favorite returned.
func (client FavoritesClient) List(ctx context.Context, resourceGroupName string, resourceName string, favoriteType FavoriteType, sourceType FavoriteSourceType, canFetchContent *bool, tags []string) (result ListApplicationInsightsComponentFavorite, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FavoritesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName, favoriteType, sourceType, canFetchContent, tags)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "List", nil, "Failure preparing request")
@@ -343,6 +384,16 @@ func (client FavoritesClient) ListResponder(resp *http.Response) (result ListApp
// favoriteID - the Id of a specific favorite defined in the Application Insights component
// favoriteProperties - properties that need to be specified to update the existing favorite.
func (client FavoritesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, favoriteID string, favoriteProperties ApplicationInsightsComponentFavorite) (result ApplicationInsightsComponentFavorite, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FavoritesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, favoriteID, favoriteProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.FavoritesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
index 64a0f3b12d60..0266a572be05 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/models.go
@@ -18,13 +18,18 @@ package insights
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights"
+
// ApplicationType enumerates the values for application type.
type ApplicationType string
@@ -274,7 +279,7 @@ type AnnotationsListResult struct {
Value *[]Annotation `json:"value,omitempty"`
}
-// APIKeyRequest an Application Insights component API Key createion request definition.
+// APIKeyRequest an Application Insights component API Key creation request definition.
type APIKeyRequest struct {
// Name - The name of the API Key.
Name *string `json:"name,omitempty"`
@@ -408,8 +413,8 @@ func (aic *ApplicationInsightsComponent) UnmarshalJSON(body []byte) error {
return nil
}
-// ApplicationInsightsComponentAnalyticsItem properties that define an Analytics item that is associated to an
-// Application Insights component.
+// ApplicationInsightsComponentAnalyticsItem properties that define an Analytics item that is associated to
+// an Application Insights component.
type ApplicationInsightsComponentAnalyticsItem struct {
autorest.Response `json:"-"`
// ID - Internally assigned unique id of the item definition.
@@ -431,17 +436,18 @@ type ApplicationInsightsComponentAnalyticsItem struct {
Properties *ApplicationInsightsComponentAnalyticsItemProperties `json:"Properties,omitempty"`
}
-// ApplicationInsightsComponentAnalyticsItemProperties a set of properties that can be defined in the context of a
-// specific item type. Each type may have its own properties.
+// ApplicationInsightsComponentAnalyticsItemProperties a set of properties that can be defined in the
+// context of a specific item type. Each type may have its own properties.
type ApplicationInsightsComponentAnalyticsItemProperties struct {
// FunctionAlias - A function alias, used when the type of the item is Function
FunctionAlias *string `json:"functionAlias,omitempty"`
}
-// ApplicationInsightsComponentAPIKey properties that define an API key of an Application Insights Component.
+// ApplicationInsightsComponentAPIKey properties that define an API key of an Application Insights
+// Component.
type ApplicationInsightsComponentAPIKey struct {
autorest.Response `json:"-"`
- // ID - The unique ID of the API key inside an Applciation Insights component. It is auto generated when the API key is created.
+ // ID - The unique ID of the API key inside an Application Insights component. It is auto generated when the API key is created.
ID *string `json:"id,omitempty"`
// APIKey - The API key value. It will be only return once when the API Key was created.
APIKey *string `json:"apiKey,omitempty"`
@@ -466,20 +472,20 @@ type ApplicationInsightsComponentAPIKeyListResult struct {
// ApplicationInsightsComponentAvailableFeatures an Application Insights component available features.
type ApplicationInsightsComponentAvailableFeatures struct {
autorest.Response `json:"-"`
- // Result - A list of Application Insigths component feature.
+ // Result - A list of Application Insights component feature.
Result *[]ApplicationInsightsComponentFeature `json:"Result,omitempty"`
}
// ApplicationInsightsComponentBillingFeatures an Application Insights component billing features
type ApplicationInsightsComponentBillingFeatures struct {
autorest.Response `json:"-"`
- // DataVolumeCap - An Application Insights component daily data volumne cap
+ // DataVolumeCap - An Application Insights component daily data volume cap
DataVolumeCap *ApplicationInsightsComponentDataVolumeCap `json:"DataVolumeCap,omitempty"`
// CurrentBillingFeatures - Current enabled pricing plan. When the component is in the Enterprise plan, this will list both 'Basic' and 'Application Insights Enterprise'.
CurrentBillingFeatures *[]string `json:"CurrentBillingFeatures,omitempty"`
}
-// ApplicationInsightsComponentDataVolumeCap an Application Insights component daily data volumne cap
+// ApplicationInsightsComponentDataVolumeCap an Application Insights component daily data volume cap
type ApplicationInsightsComponentDataVolumeCap struct {
// Cap - Daily data volume cap in GB.
Cap *float64 `json:"Cap,omitempty"`
@@ -495,10 +501,11 @@ type ApplicationInsightsComponentDataVolumeCap struct {
MaxHistoryCap *float64 `json:"MaxHistoryCap,omitempty"`
}
-// ApplicationInsightsComponentExportConfiguration properties that define a Continuous Export configuration.
+// ApplicationInsightsComponentExportConfiguration properties that define a Continuous Export
+// configuration.
type ApplicationInsightsComponentExportConfiguration struct {
autorest.Response `json:"-"`
- // ExportID - The unique ID of the export configuration inside an Applciation Insights component. It is auto generated when the Continuous Export configuration is created.
+ // ExportID - The unique ID of the export configuration inside an Application Insights component. It is auto generated when the Continuous Export configuration is created.
ExportID *string `json:"ExportId,omitempty"`
// InstrumentationKey - The instrumentation key of the Application Insights component.
InstrumentationKey *string `json:"InstrumentationKey,omitempty"`
@@ -538,8 +545,8 @@ type ApplicationInsightsComponentExportConfiguration struct {
ContainerName *string `json:"ContainerName,omitempty"`
}
-// ApplicationInsightsComponentExportRequest an Application Insights component Continuous Export configuration
-// request definition.
+// ApplicationInsightsComponentExportRequest an Application Insights component Continuous Export
+// configuration request definition.
type ApplicationInsightsComponentExportRequest struct {
// RecordTypes - The document types to be exported, as comma separated values. Allowed values include 'Requests', 'Event', 'Exceptions', 'Metrics', 'PageViews', 'PageViewPerformance', 'Rdd', 'PerformanceCounters', 'Availability', 'Messages'.
RecordTypes *string `json:"RecordTypes,omitempty"`
@@ -561,8 +568,8 @@ type ApplicationInsightsComponentExportRequest struct {
DestinationAccountID *string `json:"DestinationAccountId,omitempty"`
}
-// ApplicationInsightsComponentFavorite properties that define a favorite that is associated to an Application
-// Insights component.
+// ApplicationInsightsComponentFavorite properties that define a favorite that is associated to an
+// Application Insights component.
type ApplicationInsightsComponentFavorite struct {
autorest.Response `json:"-"`
// Name - The user-defined name of the favorite.
@@ -595,15 +602,15 @@ type ApplicationInsightsComponentFeature struct {
FeatureName *string `json:"FeatureName,omitempty"`
// MeterID - The meter id used for the feature.
MeterID *string `json:"MeterId,omitempty"`
- // MeterRateFrequency - The meter meter rate for the feature's meter.
+ // MeterRateFrequency - The meter rate for the feature's meter.
MeterRateFrequency *string `json:"MeterRateFrequency,omitempty"`
// ResouceID - Reserved, not used now.
ResouceID *string `json:"ResouceId,omitempty"`
// IsHidden - Reserved, not used now.
IsHidden *bool `json:"IsHidden,omitempty"`
- // Capabilities - A list of Application Insigths component feature capability.
+ // Capabilities - A list of Application Insights component feature capability.
Capabilities *[]ApplicationInsightsComponentFeatureCapability `json:"Capabilities,omitempty"`
- // Title - Desplay name of the feature.
+ // Title - Display name of the feature.
Title *string `json:"Title,omitempty"`
// IsMainFeature - Whether can apply addon feature on to it.
IsMainFeature *bool `json:"IsMainFeature,omitempty"`
@@ -638,7 +645,7 @@ type ApplicationInsightsComponentFeatureCapabilities struct {
MultipleStepWebTest *bool `json:"MultipleStepWebTest,omitempty"`
// APIAccessLevel - Reserved, not used now.
APIAccessLevel *string `json:"ApiAccessLevel,omitempty"`
- // TrackingType - The applciation insights component used tracking type.
+ // TrackingType - The application insights component used tracking type.
TrackingType *string `json:"TrackingType,omitempty"`
// DailyCap - Daily data volume cap in GB.
DailyCap *float64 `json:"DailyCap,omitempty"`
@@ -654,7 +661,7 @@ type ApplicationInsightsComponentFeatureCapability struct {
Name *string `json:"Name,omitempty"`
// Description - The description of the capability.
Description *string `json:"Description,omitempty"`
- // Value - The vaule of the capability.
+ // Value - The value of the capability.
Value *string `json:"Value,omitempty"`
// Unit - The unit of the capability.
Unit *string `json:"Unit,omitempty"`
@@ -669,7 +676,7 @@ type ApplicationInsightsComponentListResult struct {
autorest.Response `json:"-"`
// Value - List of Application Insights component definitions.
Value *[]ApplicationInsightsComponent `json:"value,omitempty"`
- // NextLink - The URI to get the next set of Application Insights component defintions if too many components where returned in the result set.
+ // NextLink - The URI to get the next set of Application Insights component definitions if too many components where returned in the result set.
NextLink *string `json:"nextLink,omitempty"`
}
@@ -680,14 +687,24 @@ type ApplicationInsightsComponentListResultIterator struct {
page ApplicationInsightsComponentListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
+func (iter *ApplicationInsightsComponentListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -696,6 +713,13 @@ func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ApplicationInsightsComponentListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationInsightsComponentListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -715,6 +739,11 @@ func (iter ApplicationInsightsComponentListResultIterator) Value() ApplicationIn
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ApplicationInsightsComponentListResultIterator type.
+func NewApplicationInsightsComponentListResultIterator(page ApplicationInsightsComponentListResultPage) ApplicationInsightsComponentListResultIterator {
+ return ApplicationInsightsComponentListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
return aiclr.Value == nil || len(*aiclr.Value) == 0
@@ -722,11 +751,11 @@ func (aiclr ApplicationInsightsComponentListResult) IsEmpty() bool {
// applicationInsightsComponentListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer() (*http.Request, error) {
+func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponentListResultPreparer(ctx context.Context) (*http.Request, error) {
if aiclr.NextLink == nil || len(to.String(aiclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(aiclr.NextLink)))
@@ -734,14 +763,24 @@ func (aiclr ApplicationInsightsComponentListResult) applicationInsightsComponent
// ApplicationInsightsComponentListResultPage contains a page of ApplicationInsightsComponent values.
type ApplicationInsightsComponentListResultPage struct {
- fn func(ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
+ fn func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)
aiclr ApplicationInsightsComponentListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ApplicationInsightsComponentListResultPage) Next() error {
- next, err := page.fn(page.aiclr)
+func (page *ApplicationInsightsComponentListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationInsightsComponentListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.aiclr)
if err != nil {
return err
}
@@ -749,6 +788,13 @@ func (page *ApplicationInsightsComponentListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ApplicationInsightsComponentListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationInsightsComponentListResultPage) NotDone() bool {
return !page.aiclr.IsEmpty()
@@ -767,6 +813,11 @@ func (page ApplicationInsightsComponentListResultPage) Values() []ApplicationIns
return *page.aiclr.Value
}
+// Creates a new instance of the ApplicationInsightsComponentListResultPage type.
+func NewApplicationInsightsComponentListResultPage(getNextPage func(context.Context, ApplicationInsightsComponentListResult) (ApplicationInsightsComponentListResult, error)) ApplicationInsightsComponentListResultPage {
+ return ApplicationInsightsComponentListResultPage{fn: getNextPage}
+}
+
// ApplicationInsightsComponentProactiveDetectionConfiguration properties that define a ProactiveDetection
// configuration.
type ApplicationInsightsComponentProactiveDetectionConfiguration struct {
@@ -794,7 +845,7 @@ type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
DisplayName *string `json:"DisplayName,omitempty"`
// Description - The rule description
Description *string `json:"Description,omitempty"`
- // HelpURL - URL which displays aditional info about the proactive detection rule
+ // HelpURL - URL which displays additional info about the proactive detection rule
HelpURL *string `json:"HelpUrl,omitempty"`
// IsHidden - A flag indicating whether the rule is hidden (from the UI)
IsHidden *bool `json:"IsHidden,omitempty"`
@@ -806,7 +857,8 @@ type ApplicationInsightsComponentProactiveDetectionConfigurationRuleDefinitions
SupportsEmailNotifications *bool `json:"SupportsEmailNotifications,omitempty"`
}
-// ApplicationInsightsComponentProperties properties that define an Application Insights component resource.
+// ApplicationInsightsComponentProperties properties that define an Application Insights component
+// resource.
type ApplicationInsightsComponentProperties struct {
// ApplicationID - The unique ID of your application. This field mirrors the 'Name' field and cannot be changed.
ApplicationID *string `json:"ApplicationId,omitempty"`
@@ -941,8 +993,8 @@ type ErrorFieldContract struct {
Target *string `json:"target,omitempty"`
}
-// ErrorResponse error reponse indicates Insights service is not able to process the incoming request. The reason
-// is provided in the error message.
+// ErrorResponse error response indicates Insights service is not able to process the incoming request. The
+// reason is provided in the error message.
type ErrorResponse struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
@@ -1016,8 +1068,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationListResult result of the request to list CDN operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationListResult result of the request to list CDN operations. It contains a list of operations and a
+// URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN operations supported by the CDN resource provider.
@@ -1032,14 +1084,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1048,6 +1110,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1067,6 +1136,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1074,11 +1148,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1086,14 +1160,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1101,6 +1185,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1119,14 +1210,19 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// SetObject ...
type SetObject struct {
autorest.Response `json:"-"`
Value interface{} `json:"value,omitempty"`
}
-// TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a WebTest
-// instance.
+// TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on a
+// WebTest instance.
type TagsResource struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
@@ -1265,8 +1361,8 @@ func (wt *WebTest) UnmarshalJSON(body []byte) error {
return nil
}
-// WebTestGeolocation geo-physical location to run a web test from. You must specify one or more locations for the
-// test to run from.
+// WebTestGeolocation geo-physical location to run a web test from. You must specify one or more locations
+// for the test to run from.
type WebTestGeolocation struct {
// Location - Location ID for the webtest to run from.
Location *string `json:"Id,omitempty"`
@@ -1287,14 +1383,24 @@ type WebTestListResultIterator struct {
page WebTestListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WebTestListResultIterator) Next() error {
+func (iter *WebTestListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1303,6 +1409,13 @@ func (iter *WebTestListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WebTestListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WebTestListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1322,6 +1435,11 @@ func (iter WebTestListResultIterator) Value() WebTest {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WebTestListResultIterator type.
+func NewWebTestListResultIterator(page WebTestListResultPage) WebTestListResultIterator {
+ return WebTestListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wtlr WebTestListResult) IsEmpty() bool {
return wtlr.Value == nil || len(*wtlr.Value) == 0
@@ -1329,11 +1447,11 @@ func (wtlr WebTestListResult) IsEmpty() bool {
// webTestListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wtlr WebTestListResult) webTestListResultPreparer() (*http.Request, error) {
+func (wtlr WebTestListResult) webTestListResultPreparer(ctx context.Context) (*http.Request, error) {
if wtlr.NextLink == nil || len(to.String(wtlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wtlr.NextLink)))
@@ -1341,14 +1459,24 @@ func (wtlr WebTestListResult) webTestListResultPreparer() (*http.Request, error)
// WebTestListResultPage contains a page of WebTest values.
type WebTestListResultPage struct {
- fn func(WebTestListResult) (WebTestListResult, error)
+ fn func(context.Context, WebTestListResult) (WebTestListResult, error)
wtlr WebTestListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WebTestListResultPage) Next() error {
- next, err := page.fn(page.wtlr)
+func (page *WebTestListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wtlr)
if err != nil {
return err
}
@@ -1356,6 +1484,13 @@ func (page *WebTestListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WebTestListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WebTestListResultPage) NotDone() bool {
return !page.wtlr.IsEmpty()
@@ -1374,6 +1509,11 @@ func (page WebTestListResultPage) Values() []WebTest {
return *page.wtlr.Value
}
+// Creates a new instance of the WebTestListResultPage type.
+func NewWebTestListResultPage(getNextPage func(context.Context, WebTestListResult) (WebTestListResult, error)) WebTestListResultPage {
+ return WebTestListResultPage{fn: getNextPage}
+}
+
// WebTestProperties metadata describing a web test for an Azure resource.
type WebTestProperties struct {
// SyntheticMonitorID - Unique ID of this WebTest. This is typically the same value as the Name field.
@@ -1676,7 +1816,7 @@ type WorkItemConfigurationsListResult struct {
type WorkItemCreateConfiguration struct {
// ConnectorID - Unique connector id
ConnectorID *string `json:"ConnectorId,omitempty"`
- // ConnectorDataConfiguration - Serialized JSON object for detaile d properties
+ // ConnectorDataConfiguration - Serialized JSON object for detailed properties
ConnectorDataConfiguration *string `json:"ConnectorDataConfiguration,omitempty"`
// ValidateOnly - Boolean indicating validate only
ValidateOnly *bool `json:"ValidateOnly,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/operations.go
index a06822f91600..16d160f4a976 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available insights REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go
index d794a135561e..f661970b2658 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/proactivedetectionconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewProactiveDetectionConfigurationsClientWithBaseURI(baseURI string, subscr
// configurationID - the ProactiveDetection configuration ID. This is unique within a Application Insights
// component.
func (client ProactiveDetectionConfigurationsClient) Get(ctx context.Context, resourceGroupName string, resourceName string, configurationID string) (result ApplicationInsightsComponentProactiveDetectionConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProactiveDetectionConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName, configurationID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ProactiveDetectionConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client ProactiveDetectionConfigurationsClient) GetResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client ProactiveDetectionConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result ListApplicationInsightsComponentProactiveDetectionConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProactiveDetectionConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ProactiveDetectionConfigurationsClient", "List", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client ProactiveDetectionConfigurationsClient) ListResponder(resp *http.Re
// proactiveDetectionProperties - properties that need to be specified to update the ProactiveDetection
// configuration.
func (client ProactiveDetectionConfigurationsClient) Update(ctx context.Context, resourceGroupName string, resourceName string, configurationID string, proactiveDetectionProperties ApplicationInsightsComponentProactiveDetectionConfiguration) (result ApplicationInsightsComponentProactiveDetectionConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProactiveDetectionConfigurationsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, configurationID, proactiveDetectionProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ProactiveDetectionConfigurationsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go
index b319546fb38f..0c7c04dc98d7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtestlocations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewWebTestLocationsClientWithBaseURI(baseURI string, subscriptionID string)
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client WebTestLocationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result ApplicationInsightsWebTestLocationsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestLocationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WebTestLocationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
index 464479765739..d0bece1a049b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/webtests.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewWebTestsClientWithBaseURI(baseURI string, subscriptionID string) WebTest
// webTestDefinition - properties that need to be specified to create or update an Application Insights web
// test definition.
func (client WebTestsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, webTestName string, webTestDefinition WebTest) (result WebTest, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.CreateOrUpdate")
+ 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: webTestDefinition,
Constraints: []validation.Constraint{{Target: "webTestDefinition.WebTestProperties", Name: validation.Null, Rule: false,
@@ -126,6 +137,16 @@ func (client WebTestsClient) CreateOrUpdateResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// webTestName - the name of the Application Insights webtest resource.
func (client WebTestsClient) Delete(ctx context.Context, resourceGroupName string, webTestName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, webTestName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client WebTestsClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the name of the resource group.
// webTestName - the name of the Application Insights webtest resource.
func (client WebTestsClient) Get(ctx context.Context, resourceGroupName string, webTestName string) (result WebTest, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, webTestName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "Get", nil, "Failure preparing request")
@@ -254,8 +285,18 @@ func (client WebTestsClient) GetResponder(resp *http.Response) (result WebTest,
return
}
-// List get all Application Insights web test alerts definitioned within a subscription.
+// List get all Application Insights web test alerts definitions within a subscription.
func (client WebTestsClient) List(ctx context.Context) (result WebTestListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.List")
+ defer func() {
+ sc := -1
+ if result.wtlr.Response.Response != nil {
+ sc = result.wtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -318,8 +359,8 @@ func (client WebTestsClient) ListResponder(resp *http.Response) (result WebTestL
}
// listNextResults retrieves the next set of results, if any.
-func (client WebTestsClient) listNextResults(lastResults WebTestListResult) (result WebTestListResult, err error) {
- req, err := lastResults.webTestListResultPreparer()
+func (client WebTestsClient) listNextResults(ctx context.Context, lastResults WebTestListResult) (result WebTestListResult, err error) {
+ req, err := lastResults.webTestListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.WebTestsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -340,6 +381,16 @@ func (client WebTestsClient) listNextResults(lastResults WebTestListResult) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebTestsClient) ListComplete(ctx context.Context) (result WebTestListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.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
}
@@ -349,6 +400,16 @@ func (client WebTestsClient) ListComplete(ctx context.Context) (result WebTestLi
// componentName - the name of the Application Insights component resource.
// resourceGroupName - the name of the resource group.
func (client WebTestsClient) ListByComponent(ctx context.Context, componentName string, resourceGroupName string) (result WebTestListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.ListByComponent")
+ defer func() {
+ sc := -1
+ if result.wtlr.Response.Response != nil {
+ sc = result.wtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByComponentNextResults
req, err := client.ListByComponentPreparer(ctx, componentName, resourceGroupName)
if err != nil {
@@ -413,8 +474,8 @@ func (client WebTestsClient) ListByComponentResponder(resp *http.Response) (resu
}
// listByComponentNextResults retrieves the next set of results, if any.
-func (client WebTestsClient) listByComponentNextResults(lastResults WebTestListResult) (result WebTestListResult, err error) {
- req, err := lastResults.webTestListResultPreparer()
+func (client WebTestsClient) listByComponentNextResults(ctx context.Context, lastResults WebTestListResult) (result WebTestListResult, err error) {
+ req, err := lastResults.webTestListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.WebTestsClient", "listByComponentNextResults", nil, "Failure preparing next results request")
}
@@ -435,6 +496,16 @@ func (client WebTestsClient) listByComponentNextResults(lastResults WebTestListR
// ListByComponentComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebTestsClient) ListByComponentComplete(ctx context.Context, componentName string, resourceGroupName string) (result WebTestListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.ListByComponent")
+ 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.ListByComponent(ctx, componentName, resourceGroupName)
return
}
@@ -443,6 +514,16 @@ func (client WebTestsClient) ListByComponentComplete(ctx context.Context, compon
// Parameters:
// resourceGroupName - the name of the resource group.
func (client WebTestsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result WebTestListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.wtlr.Response.Response != nil {
+ sc = result.wtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -506,8 +587,8 @@ func (client WebTestsClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client WebTestsClient) listByResourceGroupNextResults(lastResults WebTestListResult) (result WebTestListResult, err error) {
- req, err := lastResults.webTestListResultPreparer()
+func (client WebTestsClient) listByResourceGroupNextResults(ctx context.Context, lastResults WebTestListResult) (result WebTestListResult, err error) {
+ req, err := lastResults.webTestListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.WebTestsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -528,6 +609,16 @@ func (client WebTestsClient) listByResourceGroupNextResults(lastResults WebTestL
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebTestsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result WebTestListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -538,6 +629,16 @@ func (client WebTestsClient) ListByResourceGroupComplete(ctx context.Context, re
// webTestName - the name of the Application Insights webtest resource.
// webTestTags - updated tag information to set into the web test instance.
func (client WebTestsClient) UpdateTags(ctx context.Context, resourceGroupName string, webTestName string, webTestTags TagsResource) (result WebTest, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebTestsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, webTestName, webTestTags)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WebTestsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go
index 7dc771d3813d..05f15244280c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workbooks.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkbooksClientWithBaseURI(baseURI string, subscriptionID string) Workbo
// resourceName - the name of the Application Insights component resource.
// workbookProperties - properties that need to be specified to create a new workbook.
func (client WorkbooksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksClient.CreateOrUpdate")
+ 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: workbookProperties,
Constraints: []validation.Constraint{{Target: "workbookProperties.WorkbookProperties", Name: validation.Null, Rule: false,
@@ -127,6 +138,16 @@ func (client WorkbooksClient) CreateOrUpdateResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client WorkbooksClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Delete", nil, "Failure preparing request")
@@ -193,6 +214,16 @@ func (client WorkbooksClient) DeleteResponder(resp *http.Response) (result autor
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client WorkbooksClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Workbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client WorkbooksClient) GetResponder(resp *http.Response) (result Workbook
// canFetchContent - flag indicating whether or not to return the full content for each applicable workbook. If
// false, only return summary content for workbooks.
func (client WorkbooksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, category CategoryType, tags []string, canFetchContent *bool) (result WorkbooksListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, category, tags, canFetchContent)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -337,6 +378,16 @@ func (client WorkbooksClient) ListByResourceGroupResponder(resp *http.Response)
// resourceName - the name of the Application Insights component resource.
// workbookProperties - properties that need to be specified to create a new workbook.
func (client WorkbooksClient) Update(ctx context.Context, resourceGroupName string, resourceName string, workbookProperties Workbook) (result Workbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkbooksClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, workbookProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkbooksClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go
index 1c4e259ec45f..364c392bde51 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/appinsights/mgmt/2015-05-01/insights/workitemconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkItemConfigurationsClientWithBaseURI(baseURI string, subscriptionID s
// workItemConfigurationProperties - properties that need to be specified to create a work item configuration
// of a Application Insights component.
func (client WorkItemConfigurationsClient) Create(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigurationProperties WorkItemCreateConfiguration) (result WorkItemConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkItemConfigurationsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, resourceGroupName, resourceName, workItemConfigurationProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "Create", nil, "Failure preparing request")
@@ -110,13 +121,23 @@ func (client WorkItemConfigurationsClient) CreateResponder(resp *http.Response)
return
}
-// Delete delete an workitem configuration of an Application Insights component.
+// Delete delete a work item configuration of an Application Insights component.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
// workItemConfigID - the unique work item configuration Id. This can be either friendly name of connector as
// defined in connector configuration
func (client WorkItemConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, workItemConfigID string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkItemConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName, workItemConfigID)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client WorkItemConfigurationsClient) DeleteResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client WorkItemConfigurationsClient) GetDefault(ctx context.Context, resourceGroupName string, resourceName string) (result WorkItemConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkItemConfigurationsClient.GetDefault")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetDefaultPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "GetDefault", nil, "Failure preparing request")
@@ -252,6 +283,16 @@ func (client WorkItemConfigurationsClient) GetDefaultResponder(resp *http.Respon
// resourceGroupName - the name of the resource group.
// resourceName - the name of the Application Insights component resource.
func (client WorkItemConfigurationsClient) List(ctx context.Context, resourceGroupName string, resourceName string) (result WorkItemConfigurationsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkItemConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.WorkItemConfigurationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go
index 5d3b9f1d1d05..aed5f8076305 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/account.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC
// automationAccountName - the name of the automation account.
// parameters - parameters supplied to the create or update automation account.
func (client AccountClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountCreateOrUpdateParameters) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.CreateOrUpdate")
+ 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},
@@ -123,6 +134,16 @@ func (client AccountClient) CreateOrUpdateResponder(resp *http.Response) (result
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client AccountClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Delete")
+ 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},
@@ -197,6 +218,16 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client AccountClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Get")
+ 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},
@@ -269,6 +300,16 @@ func (client AccountClient) GetResponder(resp *http.Response) (result Account, e
// List retrieve a list of accounts within a given subscription.
func (client AccountClient) List(ctx context.Context) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -331,8 +372,8 @@ func (client AccountClient) ListResponder(resp *http.Response) (result AccountLi
}
// listNextResults retrieves the next set of results, if any.
-func (client AccountClient) listNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountClient) listNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.AccountClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -353,6 +394,16 @@ func (client AccountClient) listNextResults(lastResults AccountListResult) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountClient) ListComplete(ctx context.Context) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.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
}
@@ -361,6 +412,16 @@ func (client AccountClient) ListComplete(ctx context.Context) (result AccountLis
// Parameters:
// resourceGroupName - name of an Azure Resource group.
func (client AccountClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.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},
@@ -432,8 +493,8 @@ func (client AccountClient) ListByResourceGroupResponder(resp *http.Response) (r
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AccountClient) listByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountClient) listByResourceGroupNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.AccountClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -454,6 +515,16 @@ func (client AccountClient) listByResourceGroupNextResults(lastResults AccountLi
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -464,6 +535,16 @@ func (client AccountClient) ListByResourceGroupComplete(ctx context.Context, res
// automationAccountName - the name of the automation account.
// parameters - parameters supplied to the update automation account.
func (client AccountClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AccountUpdateParameters) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go
index 9cb37f954224..f6480f72bfce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/activity.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewActivityClientWithBaseURI(baseURI string, subscriptionID string) Activit
// moduleName - the name of module.
// activityName - the name of activity.
func (client ActivityClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, activityName string) (result Activity, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityClient.Get")
+ 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},
@@ -125,6 +136,16 @@ func (client ActivityClient) GetResponder(resp *http.Response) (result Activity,
// automationAccountName - the name of the automation account.
// moduleName - the name of module.
func (client ActivityClient) ListByModule(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityClient.ListByModule")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.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},
@@ -198,8 +219,8 @@ func (client ActivityClient) ListByModuleResponder(resp *http.Response) (result
}
// listByModuleNextResults retrieves the next set of results, if any.
-func (client ActivityClient) listByModuleNextResults(lastResults ActivityListResult) (result ActivityListResult, err error) {
- req, err := lastResults.activityListResultPreparer()
+func (client ActivityClient) listByModuleNextResults(ctx context.Context, lastResults ActivityListResult) (result ActivityListResult, err error) {
+ req, err := lastResults.activityListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.ActivityClient", "listByModuleNextResults", nil, "Failure preparing next results request")
}
@@ -220,6 +241,16 @@ func (client ActivityClient) listByModuleNextResults(lastResults ActivityListRes
// ListByModuleComplete enumerates all values, automatically crossing page boundaries as required.
func (client ActivityClient) ListByModuleComplete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result ActivityListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityClient.ListByModule")
+ 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.ListByModule(ctx, resourceGroupName, automationAccountName, moduleName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go
index ac1fc3e08727..40ab44dcfc4b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/agentregistrationinformation.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAgentRegistrationInformationClientWithBaseURI(baseURI string, subscripti
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client AgentRegistrationInformationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result AgentRegistration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentRegistrationInformationClient.Get")
+ 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},
@@ -122,6 +133,16 @@ func (client AgentRegistrationInformationClient) GetResponder(resp *http.Respons
// automationAccountName - the name of the automation account.
// parameters - the name of the agent registration key to be regenerated
func (client AgentRegistrationInformationClient) RegenerateKey(ctx context.Context, resourceGroupName string, automationAccountName string, parameters AgentRegistrationRegenerateKeyParameter) (result AgentRegistration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgentRegistrationInformationClient.RegenerateKey")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go
index bb46d3d1e975..c7fd07f0209d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/certificate.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) Cert
// certificateName - the parameters supplied to the create or update certificate operation.
// parameters - the parameters supplied to the create or update certificate operation.
func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateCreateOrUpdateParameters) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.CreateOrUpdate")
+ 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},
@@ -130,6 +141,16 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re
// automationAccountName - the name of the automation account.
// certificateName - the name of certificate.
func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Delete")
+ 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},
@@ -206,6 +227,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut
// automationAccountName - the name of the automation account.
// certificateName - the name of certificate.
func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Get")
+ 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},
@@ -282,6 +313,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client CertificateClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.clr.Response.Response != nil {
+ sc = result.clr.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},
@@ -354,8 +395,8 @@ func (client CertificateClient) ListByAutomationAccountResponder(resp *http.Resp
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client CertificateClient) listByAutomationAccountNextResults(lastResults CertificateListResult) (result CertificateListResult, err error) {
- req, err := lastResults.certificateListResultPreparer()
+func (client CertificateClient) listByAutomationAccountNextResults(ctx context.Context, lastResults CertificateListResult) (result CertificateListResult, err error) {
+ req, err := lastResults.certificateListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.CertificateClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -376,6 +417,16 @@ func (client CertificateClient) listByAutomationAccountNextResults(lastResults C
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CertificateListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -387,6 +438,16 @@ func (client CertificateClient) ListByAutomationAccountComplete(ctx context.Cont
// certificateName - the parameters supplied to the update certificate operation.
// parameters - the parameters supplied to the update certificate operation.
func (client CertificateClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, certificateName string, parameters CertificateUpdateParameters) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go
index f29f9359388a..f7d4a07adb2c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connection.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewConnectionClientWithBaseURI(baseURI string, subscriptionID string) Conne
// connectionName - the parameters supplied to the create or update connection operation.
// parameters - the parameters supplied to the create or update connection operation.
func (client ConnectionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionCreateOrUpdateParameters) (result Connection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.CreateOrUpdate")
+ 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},
@@ -130,6 +141,16 @@ func (client ConnectionClient) CreateOrUpdateResponder(resp *http.Response) (res
// automationAccountName - the name of the automation account.
// connectionName - the name of connection.
func (client ConnectionClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.Delete")
+ 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},
@@ -207,6 +228,16 @@ func (client ConnectionClient) DeleteResponder(resp *http.Response) (result Conn
// automationAccountName - the name of the automation account.
// connectionName - the name of connection.
func (client ConnectionClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string) (result Connection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.Get")
+ 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},
@@ -283,6 +314,16 @@ func (client ConnectionClient) GetResponder(resp *http.Response) (result Connect
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client ConnectionClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.clr.Response.Response != nil {
+ sc = result.clr.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},
@@ -355,8 +396,8 @@ func (client ConnectionClient) ListByAutomationAccountResponder(resp *http.Respo
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client ConnectionClient) listByAutomationAccountNextResults(lastResults ConnectionListResult) (result ConnectionListResult, err error) {
- req, err := lastResults.connectionListResultPreparer()
+func (client ConnectionClient) listByAutomationAccountNextResults(ctx context.Context, lastResults ConnectionListResult) (result ConnectionListResult, err error) {
+ req, err := lastResults.connectionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.ConnectionClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -377,6 +418,16 @@ func (client ConnectionClient) listByAutomationAccountNextResults(lastResults Co
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -388,6 +439,16 @@ func (client ConnectionClient) ListByAutomationAccountComplete(ctx context.Conte
// connectionName - the parameters supplied to the update a connection operation.
// parameters - the parameters supplied to the update a connection operation.
func (client ConnectionClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, connectionName string, parameters ConnectionUpdateParameters) (result Connection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go
index 7ec6c994a39b..e04c9125f7b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/connectiontype.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -40,13 +41,23 @@ func NewConnectionTypeClientWithBaseURI(baseURI string, subscriptionID string) C
return ConnectionTypeClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// CreateOrUpdate create a connectiontype.
+// CreateOrUpdate create a connection type.
// Parameters:
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
-// connectionTypeName - the parameters supplied to the create or update connectiontype operation.
-// parameters - the parameters supplied to the create or update connectiontype operation.
+// connectionTypeName - the parameters supplied to the create or update connection type operation.
+// parameters - the parameters supplied to the create or update connection type operation.
func (client ConnectionTypeClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string, parameters ConnectionTypeCreateOrUpdateParameters) (result ConnectionType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeClient.CreateOrUpdate")
+ 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},
@@ -124,12 +135,22 @@ func (client ConnectionTypeClient) CreateOrUpdateResponder(resp *http.Response)
return
}
-// Delete delete the connectiontype.
+// Delete delete the connection type.
// Parameters:
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
-// connectionTypeName - the name of connectiontype.
+// connectionTypeName - the name of connection type.
func (client ConnectionTypeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeClient.Delete")
+ 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},
@@ -200,12 +221,22 @@ func (client ConnectionTypeClient) DeleteResponder(resp *http.Response) (result
return
}
-// Get retrieve the connectiontype identified by connectiontype name.
+// Get retrieve the connection type identified by connection type name.
// Parameters:
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
-// connectionTypeName - the name of connectiontype.
+// connectionTypeName - the name of connection type.
func (client ConnectionTypeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, connectionTypeName string) (result ConnectionType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeClient.Get")
+ 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},
@@ -277,11 +308,21 @@ func (client ConnectionTypeClient) GetResponder(resp *http.Response) (result Con
return
}
-// ListByAutomationAccount retrieve a list of connectiontypes.
+// ListByAutomationAccount retrieve a list of connection types.
// Parameters:
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client ConnectionTypeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.ctlr.Response.Response != nil {
+ sc = result.ctlr.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},
@@ -354,8 +395,8 @@ func (client ConnectionTypeClient) ListByAutomationAccountResponder(resp *http.R
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResults ConnectionTypeListResult) (result ConnectionTypeListResult, err error) {
- req, err := lastResults.connectionTypeListResultPreparer()
+func (client ConnectionTypeClient) listByAutomationAccountNextResults(ctx context.Context, lastResults ConnectionTypeListResult) (result ConnectionTypeListResult, err error) {
+ req, err := lastResults.connectionTypeListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.ConnectionTypeClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -376,6 +417,16 @@ func (client ConnectionTypeClient) listByAutomationAccountNextResults(lastResult
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ConnectionTypeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ConnectionTypeListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go
index c54ccec48327..cf77be1e11dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/credential.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewCredentialClientWithBaseURI(baseURI string, subscriptionID string) Crede
// credentialName - the parameters supplied to the create or update credential operation.
// parameters - the parameters supplied to the create or update credential operation.
func (client CredentialClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialCreateOrUpdateParameters) (result Credential, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.CreateOrUpdate")
+ 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},
@@ -132,6 +143,16 @@ func (client CredentialClient) CreateOrUpdateResponder(resp *http.Response) (res
// automationAccountName - the name of the automation account.
// credentialName - the name of credential.
func (client CredentialClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.Delete")
+ 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},
@@ -208,6 +229,16 @@ func (client CredentialClient) DeleteResponder(resp *http.Response) (result auto
// automationAccountName - the name of the automation account.
// credentialName - the name of credential.
func (client CredentialClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string) (result Credential, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.Get")
+ 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},
@@ -284,6 +315,16 @@ func (client CredentialClient) GetResponder(resp *http.Response) (result Credent
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client CredentialClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.clr.Response.Response != nil {
+ sc = result.clr.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},
@@ -356,8 +397,8 @@ func (client CredentialClient) ListByAutomationAccountResponder(resp *http.Respo
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client CredentialClient) listByAutomationAccountNextResults(lastResults CredentialListResult) (result CredentialListResult, err error) {
- req, err := lastResults.credentialListResultPreparer()
+func (client CredentialClient) listByAutomationAccountNextResults(ctx context.Context, lastResults CredentialListResult) (result CredentialListResult, err error) {
+ req, err := lastResults.credentialListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.CredentialClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -378,6 +419,16 @@ func (client CredentialClient) listByAutomationAccountNextResults(lastResults Cr
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result CredentialListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -389,6 +440,16 @@ func (client CredentialClient) ListByAutomationAccountComplete(ctx context.Conte
// credentialName - the parameters supplied to the Update credential operation.
// parameters - the parameters supplied to the Update credential operation.
func (client CredentialClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, credentialName string, parameters CredentialUpdateParameters) (result Credential, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go
index 3ed11e06bc91..1a03f09b1892 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjob.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
@@ -48,6 +49,16 @@ func NewDscCompilationJobClientWithBaseURI(baseURI string, subscriptionID string
// compilationJobID - the the DSC configuration Id.
// parameters - the parameters supplied to the create compilation job operation.
func (client DscCompilationJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID, parameters DscCompilationJobCreateParameters) (result DscCompilationJob, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobClient.Create")
+ 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},
@@ -130,6 +141,16 @@ func (client DscCompilationJobClient) CreateResponder(resp *http.Response) (resu
// automationAccountName - the name of the automation account.
// compilationJobID - the Dsc configuration compilation job id.
func (client DscCompilationJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, compilationJobID uuid.UUID) (result DscCompilationJob, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobClient.Get")
+ 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},
@@ -208,6 +229,16 @@ func (client DscCompilationJobClient) GetResponder(resp *http.Response) (result
// jobID - the job id.
// jobStreamID - the job stream id.
func (client DscCompilationJobClient) GetStream(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, jobStreamID string) (result JobStream, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobClient.GetStream")
+ 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},
@@ -286,6 +317,16 @@ func (client DscCompilationJobClient) GetStreamResponder(resp *http.Response) (r
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client DscCompilationJobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.dcjlr.Response.Response != nil {
+ sc = result.dcjlr.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},
@@ -361,8 +402,8 @@ func (client DscCompilationJobClient) ListByAutomationAccountResponder(resp *htt
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastResults DscCompilationJobListResult) (result DscCompilationJobListResult, err error) {
- req, err := lastResults.dscCompilationJobListResultPreparer()
+func (client DscCompilationJobClient) listByAutomationAccountNextResults(ctx context.Context, lastResults DscCompilationJobListResult) (result DscCompilationJobListResult, err error) {
+ req, err := lastResults.dscCompilationJobListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.DscCompilationJobClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -383,6 +424,16 @@ func (client DscCompilationJobClient) listByAutomationAccountNextResults(lastRes
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client DscCompilationJobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscCompilationJobListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go
index 4b3723035159..0823e36ac794 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dsccompilationjobstream.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDscCompilationJobStreamClientWithBaseURI(baseURI string, subscriptionID
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client DscCompilationJobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result JobStreamListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobStreamClient.ListByJob")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go
index 1082b69dd005..af7b29459bc5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscconfiguration.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDscConfigurationClientWithBaseURI(baseURI string, subscriptionID string)
// configurationName - the create or update parameters for configuration.
// parameters - the create or update parameters for configuration.
func (client DscConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters DscConfigurationCreateOrUpdateParameters) (result DscConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.CreateOrUpdate")
+ 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},
@@ -135,6 +146,16 @@ func (client DscConfigurationClient) CreateOrUpdateResponder(resp *http.Response
// automationAccountName - the name of the automation account.
// configurationName - the configuration name.
func (client DscConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.Delete")
+ 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},
@@ -211,6 +232,16 @@ func (client DscConfigurationClient) DeleteResponder(resp *http.Response) (resul
// automationAccountName - the name of the automation account.
// configurationName - the configuration name.
func (client DscConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result DscConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.Get")
+ 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},
@@ -288,6 +319,16 @@ func (client DscConfigurationClient) GetResponder(resp *http.Response) (result D
// automationAccountName - the name of the automation account.
// configurationName - the configuration name.
func (client DscConfigurationClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.GetContent")
+ 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},
@@ -367,6 +408,16 @@ func (client DscConfigurationClient) GetContentResponder(resp *http.Response) (r
// top - the the number of rows to take.
// inlinecount - return total rows.
func (client DscConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result DscConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.dclr.Response.Response != nil {
+ sc = result.dclr.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},
@@ -451,8 +502,8 @@ func (client DscConfigurationClient) ListByAutomationAccountResponder(resp *http
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResults DscConfigurationListResult) (result DscConfigurationListResult, err error) {
- req, err := lastResults.dscConfigurationListResultPreparer()
+func (client DscConfigurationClient) listByAutomationAccountNextResults(ctx context.Context, lastResults DscConfigurationListResult) (result DscConfigurationListResult, err error) {
+ req, err := lastResults.dscConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.DscConfigurationClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -473,6 +524,16 @@ func (client DscConfigurationClient) listByAutomationAccountNextResults(lastResu
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string, skip *int32, top *int32, inlinecount string) (result DscConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter, skip, top, inlinecount)
return
}
@@ -484,6 +545,16 @@ func (client DscConfigurationClient) ListByAutomationAccountComplete(ctx context
// configurationName - the create or update parameters for configuration.
// parameters - the create or update parameters for configuration.
func (client DscConfigurationClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, configurationName string, parameters *DscConfigurationUpdateParameters) (result DscConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go
index e61c56e58c50..23b3490f3e73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnode.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewDscNodeClientWithBaseURI(baseURI string, subscriptionID string) DscNodeC
// automationAccountName - the name of the automation account.
// nodeID - the node id.
func (client DscNodeClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeClient.Delete")
+ 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},
@@ -123,6 +134,16 @@ func (client DscNodeClient) DeleteResponder(resp *http.Response) (result DscNode
// automationAccountName - the name of the automation account.
// nodeID - the node id.
func (client DscNodeClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string) (result DscNode, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeClient.Get")
+ 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},
@@ -200,6 +221,16 @@ func (client DscNodeClient) GetResponder(resp *http.Response) (result DscNode, e
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client DscNodeClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.dnlr.Response.Response != nil {
+ sc = result.dnlr.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},
@@ -275,8 +306,8 @@ func (client DscNodeClient) ListByAutomationAccountResponder(resp *http.Response
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNodeListResult) (result DscNodeListResult, err error) {
- req, err := lastResults.dscNodeListResultPreparer()
+func (client DscNodeClient) listByAutomationAccountNextResults(ctx context.Context, lastResults DscNodeListResult) (result DscNodeListResult, err error) {
+ req, err := lastResults.dscNodeListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.DscNodeClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -297,6 +328,16 @@ func (client DscNodeClient) listByAutomationAccountNextResults(lastResults DscNo
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
@@ -308,6 +349,16 @@ func (client DscNodeClient) ListByAutomationAccountComplete(ctx context.Context,
// nodeID - parameters supplied to the update dsc node.
// parameters - parameters supplied to the update dsc node.
func (client DscNodeClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, parameters DscNodeUpdateParameters) (result DscNode, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go
index dc292bbd8b59..8e36ed158d47 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/dscnodeconfiguration.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDscNodeConfigurationClientWithBaseURI(baseURI string, subscriptionID str
// nodeConfigurationName - the create or update parameters for configuration.
// parameters - the create or update parameters for configuration.
func (client DscNodeConfigurationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string, parameters DscNodeConfigurationCreateOrUpdateParameters) (result DscNodeConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationClient.CreateOrUpdate")
+ 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},
@@ -135,6 +146,16 @@ func (client DscNodeConfigurationClient) CreateOrUpdateResponder(resp *http.Resp
// automationAccountName - the name of the automation account.
// nodeConfigurationName - the Dsc node configuration name.
func (client DscNodeConfigurationClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationClient.Delete")
+ 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},
@@ -211,6 +232,16 @@ func (client DscNodeConfigurationClient) DeleteResponder(resp *http.Response) (r
// automationAccountName - the name of the automation account.
// nodeConfigurationName - the Dsc node configuration name.
func (client DscNodeConfigurationClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeConfigurationName string) (result DscNodeConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationClient.Get")
+ 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},
@@ -288,6 +319,16 @@ func (client DscNodeConfigurationClient) GetResponder(resp *http.Response) (resu
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client DscNodeConfigurationClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.dnclr.Response.Response != nil {
+ sc = result.dnclr.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},
@@ -363,8 +404,8 @@ func (client DscNodeConfigurationClient) ListByAutomationAccountResponder(resp *
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(lastResults DscNodeConfigurationListResult) (result DscNodeConfigurationListResult, err error) {
- req, err := lastResults.dscNodeConfigurationListResultPreparer()
+func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(ctx context.Context, lastResults DscNodeConfigurationListResult) (result DscNodeConfigurationListResult, err error) {
+ req, err := lastResults.dscNodeConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.DscNodeConfigurationClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -385,6 +426,16 @@ func (client DscNodeConfigurationClient) listByAutomationAccountNextResults(last
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client DscNodeConfigurationClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result DscNodeConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go
index 61c80c6ebc5a..4db68823a40c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/fields.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewFieldsClientWithBaseURI(baseURI string, subscriptionID string) FieldsCli
// moduleName - the name of module.
// typeName - the name of type.
func (client FieldsClient) ListByType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FieldsClient.ListByType")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go
index 86bd913bf4df..9d76a6c6b528 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/hybridrunbookworkergroup.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewHybridRunbookWorkerGroupClientWithBaseURI(baseURI string, subscriptionID
// automationAccountName - the name of the automation account.
// hybridRunbookWorkerGroupName - the hybrid runbook worker group name
func (client HybridRunbookWorkerGroupClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupClient.Delete")
+ 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},
@@ -122,6 +133,16 @@ func (client HybridRunbookWorkerGroupClient) DeleteResponder(resp *http.Response
// automationAccountName - the name of the automation account.
// hybridRunbookWorkerGroupName - the hybrid runbook worker group name
func (client HybridRunbookWorkerGroupClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string) (result HybridRunbookWorkerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupClient.Get")
+ 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},
@@ -199,6 +220,16 @@ func (client HybridRunbookWorkerGroupClient) GetResponder(resp *http.Response) (
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result HybridRunbookWorkerGroupsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.hrwglr.Response.Response != nil {
+ sc = result.hrwglr.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},
@@ -274,8 +305,8 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountResponder(re
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults(lastResults HybridRunbookWorkerGroupsListResult) (result HybridRunbookWorkerGroupsListResult, err error) {
- req, err := lastResults.hybridRunbookWorkerGroupsListResultPreparer()
+func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults(ctx context.Context, lastResults HybridRunbookWorkerGroupsListResult) (result HybridRunbookWorkerGroupsListResult, err error) {
+ req, err := lastResults.hybridRunbookWorkerGroupsListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.HybridRunbookWorkerGroupClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -296,6 +327,16 @@ func (client HybridRunbookWorkerGroupClient) listByAutomationAccountNextResults(
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result HybridRunbookWorkerGroupsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
@@ -307,6 +348,16 @@ func (client HybridRunbookWorkerGroupClient) ListByAutomationAccountComplete(ctx
// hybridRunbookWorkerGroupName - the hybrid runbook worker group name
// parameters - the hybrid runbook worker group
func (client HybridRunbookWorkerGroupClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, hybridRunbookWorkerGroupName string, parameters HybridRunbookWorkerGroupUpdateParameters) (result HybridRunbookWorkerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go
index cc3e1d1cfd84..eb611fe54846 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/job.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
@@ -48,6 +49,16 @@ func NewJobClientWithBaseURI(baseURI string, subscriptionID string) JobClient {
// jobID - the job id.
// parameters - the parameters supplied to the create job operation.
func (client JobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID, parameters JobCreateParameters) (result Job, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.Create")
+ 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},
@@ -130,6 +141,16 @@ func (client JobClient) CreateResponder(resp *http.Response) (result Job, err er
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result Job, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.Get")
+ 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},
@@ -207,6 +228,16 @@ func (client JobClient) GetResponder(resp *http.Response) (result Job, err error
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) GetOutput(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.GetOutput")
+ 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},
@@ -283,6 +314,16 @@ func (client JobClient) GetOutputResponder(resp *http.Response) (result ReadClos
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) GetRunbookContent(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.GetRunbookContent")
+ 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},
@@ -359,6 +400,16 @@ func (client JobClient) GetRunbookContentResponder(resp *http.Response) (result
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client JobClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.jlr.Response.Response != nil {
+ sc = result.jlr.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},
@@ -434,8 +485,8 @@ func (client JobClient) ListByAutomationAccountResponder(resp *http.Response) (r
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client JobClient) listByAutomationAccountNextResults(lastResults JobListResult) (result JobListResult, err error) {
- req, err := lastResults.jobListResultPreparer()
+func (client JobClient) listByAutomationAccountNextResults(ctx context.Context, lastResults JobListResult) (result JobListResult, err error) {
+ req, err := lastResults.jobListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.JobClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -456,6 +507,16 @@ func (client JobClient) listByAutomationAccountNextResults(lastResults JobListRe
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
@@ -466,6 +527,16 @@ func (client JobClient) ListByAutomationAccountComplete(ctx context.Context, res
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.Resume")
+ 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},
@@ -542,6 +613,16 @@ func (client JobClient) ResumeResponder(resp *http.Response) (result autorest.Re
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.Stop")
+ 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},
@@ -618,6 +699,16 @@ func (client JobClient) StopResponder(resp *http.Response) (result autorest.Resp
// automationAccountName - the name of the automation account.
// jobID - the job id.
func (client JobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, jobID uuid.UUID) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobClient.Suspend")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go
index 1dbcb8ed2537..2a9399987b92 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobschedule.go
@@ -24,6 +24,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
)
@@ -49,6 +50,16 @@ func NewJobScheduleClientWithBaseURI(baseURI string, subscriptionID string) JobS
// jobScheduleID - the job schedule name.
// parameters - the parameters supplied to the create job schedule operation.
func (client JobScheduleClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID, parameters JobScheduleCreateParameters) (result JobSchedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleClient.Create")
+ 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},
@@ -133,6 +144,16 @@ func (client JobScheduleClient) CreateResponder(resp *http.Response) (result Job
// automationAccountName - the name of the automation account.
// jobScheduleID - the job schedule name.
func (client JobScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleClient.Delete")
+ 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},
@@ -209,6 +230,16 @@ func (client JobScheduleClient) DeleteResponder(resp *http.Response) (result aut
// automationAccountName - the name of the automation account.
// jobScheduleID - the job schedule name.
func (client JobScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobScheduleID uuid.UUID) (result JobSchedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleClient.Get")
+ 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},
@@ -286,6 +317,16 @@ func (client JobScheduleClient) GetResponder(resp *http.Response) (result JobSch
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client JobScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobScheduleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.jslr.Response.Response != nil {
+ sc = result.jslr.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},
@@ -361,8 +402,8 @@ func (client JobScheduleClient) ListByAutomationAccountResponder(resp *http.Resp
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults JobScheduleListResult) (result JobScheduleListResult, err error) {
- req, err := lastResults.jobScheduleListResultPreparer()
+func (client JobScheduleClient) listByAutomationAccountNextResults(ctx context.Context, lastResults JobScheduleListResult) (result JobScheduleListResult, err error) {
+ req, err := lastResults.jobScheduleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.JobScheduleClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -383,6 +424,16 @@ func (client JobScheduleClient) listByAutomationAccountNextResults(lastResults J
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client JobScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result JobScheduleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go
index 3cc4c6d2b7bf..e39d0042a1c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/jobstream.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewJobStreamClientWithBaseURI(baseURI string, subscriptionID string) JobStr
// jobID - the job id.
// jobStreamID - the job stream id.
func (client JobStreamClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, jobStreamID string) (result JobStream, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamClient.Get")
+ 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},
@@ -126,6 +137,16 @@ func (client JobStreamClient) GetResponder(resp *http.Response) (result JobStrea
// jobID - the job Id.
// filter - the filter to apply on the operation.
func (client JobStreamClient) ListByJob(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamClient.ListByJob")
+ defer func() {
+ sc := -1
+ if result.jslr.Response.Response != nil {
+ sc = result.jslr.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},
@@ -202,8 +223,8 @@ func (client JobStreamClient) ListByJobResponder(resp *http.Response) (result Jo
}
// listByJobNextResults retrieves the next set of results, if any.
-func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResult) (result JobStreamListResult, err error) {
- req, err := lastResults.jobStreamListResultPreparer()
+func (client JobStreamClient) listByJobNextResults(ctx context.Context, lastResults JobStreamListResult) (result JobStreamListResult, err error) {
+ req, err := lastResults.jobStreamListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.JobStreamClient", "listByJobNextResults", nil, "Failure preparing next results request")
}
@@ -224,6 +245,16 @@ func (client JobStreamClient) listByJobNextResults(lastResults JobStreamListResu
// ListByJobComplete enumerates all values, automatically crossing page boundaries as required.
func (client JobStreamClient) ListByJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, jobID string, filter string) (result JobStreamListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamClient.ListByJob")
+ 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.ListByJob(ctx, resourceGroupName, automationAccountName, jobID, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go
index a063a20de6ad..b5deb4773976 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/keys.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewKeysClientWithBaseURI(baseURI string, subscriptionID string) KeysClient
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client KeysClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result KeyListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/KeysClient.ListByAutomationAccount")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go
index 0ddea23c643f..c6d196e46eae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/linkedworkspace.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLinkedWorkspaceClientWithBaseURI(baseURI string, subscriptionID string)
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client LinkedWorkspaceClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string) (result LinkedWorkspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LinkedWorkspaceClient.Get")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go
index aadb1e64659e..0264caf18f52 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/models.go
@@ -18,16 +18,21 @@ package automation
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"io"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation"
+
// AccountState enumerates the values for account state.
type AccountState string
@@ -617,7 +622,8 @@ func (a *Account) UnmarshalJSON(body []byte) error {
return nil
}
-// AccountCreateOrUpdateParameters the parameters supplied to the create or update automation account operation.
+// AccountCreateOrUpdateParameters the parameters supplied to the create or update automation account
+// operation.
type AccountCreateOrUpdateParameters struct {
// AccountCreateOrUpdateProperties - Gets or sets account create or update properties.
*AccountCreateOrUpdateProperties `json:"properties,omitempty"`
@@ -719,14 +725,24 @@ type AccountListResultIterator struct {
page AccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AccountListResultIterator) Next() error {
+func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -735,6 +751,13 @@ func (iter *AccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -754,6 +777,11 @@ func (iter AccountListResultIterator) Value() Account {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AccountListResultIterator type.
+func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
+ return AccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr AccountListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -761,11 +789,11 @@ func (alr AccountListResult) IsEmpty() bool {
// accountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (alr AccountListResult) accountListResultPreparer() (*http.Request, error) {
+func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.NextLink)))
@@ -773,14 +801,24 @@ func (alr AccountListResult) accountListResultPreparer() (*http.Request, error)
// AccountListResultPage contains a page of Account values.
type AccountListResultPage struct {
- fn func(AccountListResult) (AccountListResult, error)
+ fn func(context.Context, AccountListResult) (AccountListResult, error)
alr AccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AccountListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -788,6 +826,13 @@ func (page *AccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AccountListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -806,6 +851,11 @@ func (page AccountListResultPage) Values() []Account {
return *page.alr.Value
}
+// Creates a new instance of the AccountListResultPage type.
+func NewAccountListResultPage(getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
+ return AccountListResultPage{fn: getNextPage}
+}
+
// AccountProperties definition of the account property.
type AccountProperties struct {
// Sku - Gets or sets the SKU of account.
@@ -992,14 +1042,24 @@ type ActivityListResultIterator struct {
page ActivityListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ActivityListResultIterator) Next() error {
+func (iter *ActivityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1008,6 +1068,13 @@ func (iter *ActivityListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ActivityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ActivityListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1027,6 +1094,11 @@ func (iter ActivityListResultIterator) Value() Activity {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ActivityListResultIterator type.
+func NewActivityListResultIterator(page ActivityListResultPage) ActivityListResultIterator {
+ return ActivityListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr ActivityListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -1034,11 +1106,11 @@ func (alr ActivityListResult) IsEmpty() bool {
// activityListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (alr ActivityListResult) activityListResultPreparer() (*http.Request, error) {
+func (alr ActivityListResult) activityListResultPreparer(ctx context.Context) (*http.Request, error) {
if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.NextLink)))
@@ -1046,14 +1118,24 @@ func (alr ActivityListResult) activityListResultPreparer() (*http.Request, error
// ActivityListResultPage contains a page of Activity values.
type ActivityListResultPage struct {
- fn func(ActivityListResult) (ActivityListResult, error)
+ fn func(context.Context, ActivityListResult) (ActivityListResult, error)
alr ActivityListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ActivityListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *ActivityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -1061,6 +1143,13 @@ func (page *ActivityListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ActivityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ActivityListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -1079,6 +1168,11 @@ func (page ActivityListResultPage) Values() []Activity {
return *page.alr.Value
}
+// Creates a new instance of the ActivityListResultPage type.
+func NewActivityListResultPage(getNextPage func(context.Context, ActivityListResult) (ActivityListResult, error)) ActivityListResultPage {
+ return ActivityListResultPage{fn: getNextPage}
+}
+
// ActivityOutputType definition of the activity output type.
type ActivityOutputType struct {
// Name - Gets or sets the name of the activity output type.
@@ -1159,7 +1253,7 @@ type AdvancedScheduleMonthlyOccurrence struct {
Day ScheduleDay `json:"day,omitempty"`
}
-// AgentRegistration definition of the agent registration infomration type.
+// AgentRegistration definition of the agent registration information type.
type AgentRegistration struct {
autorest.Response `json:"-"`
// DscMetaConfiguration - Gets or sets the dsc meta configuration.
@@ -1292,8 +1386,8 @@ func (c *Certificate) UnmarshalJSON(body []byte) error {
return nil
}
-// CertificateCreateOrUpdateParameters the parameters supplied to the create or update or replace certificate
-// operation.
+// CertificateCreateOrUpdateParameters the parameters supplied to the create or update or replace
+// certificate operation.
type CertificateCreateOrUpdateParameters struct {
// Name - Gets or sets the name of the certificate.
Name *string `json:"name,omitempty"`
@@ -1373,14 +1467,24 @@ type CertificateListResultIterator struct {
page CertificateListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CertificateListResultIterator) Next() error {
+func (iter *CertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1389,6 +1493,13 @@ func (iter *CertificateListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CertificateListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CertificateListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1408,6 +1519,11 @@ func (iter CertificateListResultIterator) Value() Certificate {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CertificateListResultIterator type.
+func NewCertificateListResultIterator(page CertificateListResultPage) CertificateListResultIterator {
+ return CertificateListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (clr CertificateListResult) IsEmpty() bool {
return clr.Value == nil || len(*clr.Value) == 0
@@ -1415,11 +1531,11 @@ func (clr CertificateListResult) IsEmpty() bool {
// certificateListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (clr CertificateListResult) certificateListResultPreparer() (*http.Request, error) {
+func (clr CertificateListResult) certificateListResultPreparer(ctx context.Context) (*http.Request, error) {
if clr.NextLink == nil || len(to.String(clr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(clr.NextLink)))
@@ -1427,14 +1543,24 @@ func (clr CertificateListResult) certificateListResultPreparer() (*http.Request,
// CertificateListResultPage contains a page of Certificate values.
type CertificateListResultPage struct {
- fn func(CertificateListResult) (CertificateListResult, error)
+ fn func(context.Context, CertificateListResult) (CertificateListResult, error)
clr CertificateListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CertificateListResultPage) Next() error {
- next, err := page.fn(page.clr)
+func (page *CertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.clr)
if err != nil {
return err
}
@@ -1442,6 +1568,13 @@ func (page *CertificateListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CertificateListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CertificateListResultPage) NotDone() bool {
return !page.clr.IsEmpty()
@@ -1460,6 +1593,11 @@ func (page CertificateListResultPage) Values() []Certificate {
return *page.clr.Value
}
+// Creates a new instance of the CertificateListResultPage type.
+func NewCertificateListResultPage(getNextPage func(context.Context, CertificateListResult) (CertificateListResult, error)) CertificateListResultPage {
+ return CertificateListResultPage{fn: getNextPage}
+}
+
// CertificateProperties properties of the certificate.
type CertificateProperties struct {
// Thumbprint - Gets the thumbprint of the certificate.
@@ -1710,14 +1848,24 @@ type ConnectionListResultIterator struct {
page ConnectionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ConnectionListResultIterator) Next() error {
+func (iter *ConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1726,6 +1874,13 @@ func (iter *ConnectionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ConnectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ConnectionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1745,6 +1900,11 @@ func (iter ConnectionListResultIterator) Value() Connection {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ConnectionListResultIterator type.
+func NewConnectionListResultIterator(page ConnectionListResultPage) ConnectionListResultIterator {
+ return ConnectionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (clr ConnectionListResult) IsEmpty() bool {
return clr.Value == nil || len(*clr.Value) == 0
@@ -1752,11 +1912,11 @@ func (clr ConnectionListResult) IsEmpty() bool {
// connectionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (clr ConnectionListResult) connectionListResultPreparer() (*http.Request, error) {
+func (clr ConnectionListResult) connectionListResultPreparer(ctx context.Context) (*http.Request, error) {
if clr.NextLink == nil || len(to.String(clr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(clr.NextLink)))
@@ -1764,14 +1924,24 @@ func (clr ConnectionListResult) connectionListResultPreparer() (*http.Request, e
// ConnectionListResultPage contains a page of Connection values.
type ConnectionListResultPage struct {
- fn func(ConnectionListResult) (ConnectionListResult, error)
+ fn func(context.Context, ConnectionListResult) (ConnectionListResult, error)
clr ConnectionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ConnectionListResultPage) Next() error {
- next, err := page.fn(page.clr)
+func (page *ConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.clr)
if err != nil {
return err
}
@@ -1779,6 +1949,13 @@ func (page *ConnectionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ConnectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ConnectionListResultPage) NotDone() bool {
return !page.clr.IsEmpty()
@@ -1797,6 +1974,11 @@ func (page ConnectionListResultPage) Values() []Connection {
return *page.clr.Value
}
+// Creates a new instance of the ConnectionListResultPage type.
+func NewConnectionListResultPage(getNextPage func(context.Context, ConnectionListResult) (ConnectionListResult, error)) ConnectionListResultPage {
+ return ConnectionListResultPage{fn: getNextPage}
+}
+
// ConnectionProperties definition of the connection properties.
type ConnectionProperties struct {
// ConnectionType - Gets or sets the connectionType of the connection.
@@ -2009,14 +2191,24 @@ type ConnectionTypeListResultIterator struct {
page ConnectionTypeListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ConnectionTypeListResultIterator) Next() error {
+func (iter *ConnectionTypeListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2025,6 +2217,13 @@ func (iter *ConnectionTypeListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ConnectionTypeListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ConnectionTypeListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2044,6 +2243,11 @@ func (iter ConnectionTypeListResultIterator) Value() ConnectionType {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ConnectionTypeListResultIterator type.
+func NewConnectionTypeListResultIterator(page ConnectionTypeListResultPage) ConnectionTypeListResultIterator {
+ return ConnectionTypeListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ctlr ConnectionTypeListResult) IsEmpty() bool {
return ctlr.Value == nil || len(*ctlr.Value) == 0
@@ -2051,11 +2255,11 @@ func (ctlr ConnectionTypeListResult) IsEmpty() bool {
// connectionTypeListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ctlr ConnectionTypeListResult) connectionTypeListResultPreparer() (*http.Request, error) {
+func (ctlr ConnectionTypeListResult) connectionTypeListResultPreparer(ctx context.Context) (*http.Request, error) {
if ctlr.NextLink == nil || len(to.String(ctlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ctlr.NextLink)))
@@ -2063,14 +2267,24 @@ func (ctlr ConnectionTypeListResult) connectionTypeListResultPreparer() (*http.R
// ConnectionTypeListResultPage contains a page of ConnectionType values.
type ConnectionTypeListResultPage struct {
- fn func(ConnectionTypeListResult) (ConnectionTypeListResult, error)
+ fn func(context.Context, ConnectionTypeListResult) (ConnectionTypeListResult, error)
ctlr ConnectionTypeListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ConnectionTypeListResultPage) Next() error {
- next, err := page.fn(page.ctlr)
+func (page *ConnectionTypeListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionTypeListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ctlr)
if err != nil {
return err
}
@@ -2078,6 +2292,13 @@ func (page *ConnectionTypeListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ConnectionTypeListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ConnectionTypeListResultPage) NotDone() bool {
return !page.ctlr.IsEmpty()
@@ -2096,6 +2317,11 @@ func (page ConnectionTypeListResultPage) Values() []ConnectionType {
return *page.ctlr.Value
}
+// Creates a new instance of the ConnectionTypeListResultPage type.
+func NewConnectionTypeListResultPage(getNextPage func(context.Context, ConnectionTypeListResult) (ConnectionTypeListResult, error)) ConnectionTypeListResultPage {
+ return ConnectionTypeListResultPage{fn: getNextPage}
+}
+
// ConnectionTypeProperties properties of the connection type.
type ConnectionTypeProperties struct {
// IsGlobal - Gets or sets a Boolean value to indicate if the connection type is global.
@@ -2369,7 +2595,7 @@ func (ccoup *CredentialCreateOrUpdateParameters) UnmarshalJSON(body []byte) erro
return nil
}
-// CredentialCreateOrUpdateProperties the properties of the create cerdential operation.
+// CredentialCreateOrUpdateProperties the properties of the create credential operation.
type CredentialCreateOrUpdateProperties struct {
// UserName - Gets or sets the user name of the credential.
UserName *string `json:"userName,omitempty"`
@@ -2394,14 +2620,24 @@ type CredentialListResultIterator struct {
page CredentialListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CredentialListResultIterator) Next() error {
+func (iter *CredentialListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2410,6 +2646,13 @@ func (iter *CredentialListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CredentialListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CredentialListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2429,6 +2672,11 @@ func (iter CredentialListResultIterator) Value() Credential {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CredentialListResultIterator type.
+func NewCredentialListResultIterator(page CredentialListResultPage) CredentialListResultIterator {
+ return CredentialListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (clr CredentialListResult) IsEmpty() bool {
return clr.Value == nil || len(*clr.Value) == 0
@@ -2436,11 +2684,11 @@ func (clr CredentialListResult) IsEmpty() bool {
// credentialListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (clr CredentialListResult) credentialListResultPreparer() (*http.Request, error) {
+func (clr CredentialListResult) credentialListResultPreparer(ctx context.Context) (*http.Request, error) {
if clr.NextLink == nil || len(to.String(clr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(clr.NextLink)))
@@ -2448,14 +2696,24 @@ func (clr CredentialListResult) credentialListResultPreparer() (*http.Request, e
// CredentialListResultPage contains a page of Credential values.
type CredentialListResultPage struct {
- fn func(CredentialListResult) (CredentialListResult, error)
+ fn func(context.Context, CredentialListResult) (CredentialListResult, error)
clr CredentialListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CredentialListResultPage) Next() error {
- next, err := page.fn(page.clr)
+func (page *CredentialListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CredentialListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.clr)
if err != nil {
return err
}
@@ -2463,6 +2721,13 @@ func (page *CredentialListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CredentialListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CredentialListResultPage) NotDone() bool {
return !page.clr.IsEmpty()
@@ -2481,6 +2746,11 @@ func (page CredentialListResultPage) Values() []Credential {
return *page.clr.Value
}
+// Creates a new instance of the CredentialListResultPage type.
+func NewCredentialListResultPage(getNextPage func(context.Context, CredentialListResult) (CredentialListResult, error)) CredentialListResultPage {
+ return CredentialListResultPage{fn: getNextPage}
+}
+
// CredentialProperties definition of the credential properties
type CredentialProperties struct {
// UserName - Gets the user name of the credential.
@@ -2759,14 +3029,24 @@ type DscCompilationJobListResultIterator struct {
page DscCompilationJobListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DscCompilationJobListResultIterator) Next() error {
+func (iter *DscCompilationJobListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2775,6 +3055,13 @@ func (iter *DscCompilationJobListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DscCompilationJobListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DscCompilationJobListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2794,6 +3081,11 @@ func (iter DscCompilationJobListResultIterator) Value() DscCompilationJob {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DscCompilationJobListResultIterator type.
+func NewDscCompilationJobListResultIterator(page DscCompilationJobListResultPage) DscCompilationJobListResultIterator {
+ return DscCompilationJobListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dcjlr DscCompilationJobListResult) IsEmpty() bool {
return dcjlr.Value == nil || len(*dcjlr.Value) == 0
@@ -2801,11 +3093,11 @@ func (dcjlr DscCompilationJobListResult) IsEmpty() bool {
// dscCompilationJobListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dcjlr DscCompilationJobListResult) dscCompilationJobListResultPreparer() (*http.Request, error) {
+func (dcjlr DscCompilationJobListResult) dscCompilationJobListResultPreparer(ctx context.Context) (*http.Request, error) {
if dcjlr.NextLink == nil || len(to.String(dcjlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dcjlr.NextLink)))
@@ -2813,14 +3105,24 @@ func (dcjlr DscCompilationJobListResult) dscCompilationJobListResultPreparer() (
// DscCompilationJobListResultPage contains a page of DscCompilationJob values.
type DscCompilationJobListResultPage struct {
- fn func(DscCompilationJobListResult) (DscCompilationJobListResult, error)
+ fn func(context.Context, DscCompilationJobListResult) (DscCompilationJobListResult, error)
dcjlr DscCompilationJobListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DscCompilationJobListResultPage) Next() error {
- next, err := page.fn(page.dcjlr)
+func (page *DscCompilationJobListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscCompilationJobListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dcjlr)
if err != nil {
return err
}
@@ -2828,6 +3130,13 @@ func (page *DscCompilationJobListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DscCompilationJobListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DscCompilationJobListResultPage) NotDone() bool {
return !page.dcjlr.IsEmpty()
@@ -2846,6 +3155,11 @@ func (page DscCompilationJobListResultPage) Values() []DscCompilationJob {
return *page.dcjlr.Value
}
+// Creates a new instance of the DscCompilationJobListResultPage type.
+func NewDscCompilationJobListResultPage(getNextPage func(context.Context, DscCompilationJobListResult) (DscCompilationJobListResult, error)) DscCompilationJobListResultPage {
+ return DscCompilationJobListResultPage{fn: getNextPage}
+}
+
// DscCompilationJobProperties definition of Dsc Compilation job properties.
type DscCompilationJobProperties struct {
// Configuration - Gets or sets the configuration.
@@ -3190,14 +3504,24 @@ type DscConfigurationListResultIterator struct {
page DscConfigurationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DscConfigurationListResultIterator) Next() error {
+func (iter *DscConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3206,6 +3530,13 @@ func (iter *DscConfigurationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DscConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DscConfigurationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3225,6 +3556,11 @@ func (iter DscConfigurationListResultIterator) Value() DscConfiguration {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DscConfigurationListResultIterator type.
+func NewDscConfigurationListResultIterator(page DscConfigurationListResultPage) DscConfigurationListResultIterator {
+ return DscConfigurationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dclr DscConfigurationListResult) IsEmpty() bool {
return dclr.Value == nil || len(*dclr.Value) == 0
@@ -3232,11 +3568,11 @@ func (dclr DscConfigurationListResult) IsEmpty() bool {
// dscConfigurationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dclr DscConfigurationListResult) dscConfigurationListResultPreparer() (*http.Request, error) {
+func (dclr DscConfigurationListResult) dscConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
if dclr.NextLink == nil || len(to.String(dclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dclr.NextLink)))
@@ -3244,14 +3580,24 @@ func (dclr DscConfigurationListResult) dscConfigurationListResultPreparer() (*ht
// DscConfigurationListResultPage contains a page of DscConfiguration values.
type DscConfigurationListResultPage struct {
- fn func(DscConfigurationListResult) (DscConfigurationListResult, error)
+ fn func(context.Context, DscConfigurationListResult) (DscConfigurationListResult, error)
dclr DscConfigurationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DscConfigurationListResultPage) Next() error {
- next, err := page.fn(page.dclr)
+func (page *DscConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dclr)
if err != nil {
return err
}
@@ -3259,6 +3605,13 @@ func (page *DscConfigurationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DscConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DscConfigurationListResultPage) NotDone() bool {
return !page.dclr.IsEmpty()
@@ -3277,11 +3630,16 @@ func (page DscConfigurationListResultPage) Values() []DscConfiguration {
return *page.dclr.Value
}
+// Creates a new instance of the DscConfigurationListResultPage type.
+func NewDscConfigurationListResultPage(getNextPage func(context.Context, DscConfigurationListResult) (DscConfigurationListResult, error)) DscConfigurationListResultPage {
+ return DscConfigurationListResultPage{fn: getNextPage}
+}
+
// DscConfigurationParameter definition of the configuration parameter type.
type DscConfigurationParameter struct {
// Type - Gets or sets the type of the parameter.
Type *string `json:"type,omitempty"`
- // IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is madatory or not.
+ // IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
IsMandatory *bool `json:"isMandatory,omitempty"`
// Position - Get or sets the position of the parameter.
Position *int32 `json:"position,omitempty"`
@@ -3349,7 +3707,8 @@ func (dcp DscConfigurationProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// DscConfigurationUpdateParameters the parameters supplied to the create or update configuration operation.
+// DscConfigurationUpdateParameters the parameters supplied to the create or update configuration
+// operation.
type DscConfigurationUpdateParameters struct {
// DscConfigurationCreateOrUpdateProperties - Gets or sets configuration create or update properties.
*DscConfigurationCreateOrUpdateProperties `json:"properties,omitempty"`
@@ -3480,14 +3839,14 @@ type DscNodeConfiguration struct {
Type *string `json:"type,omitempty"`
}
-// DscNodeConfigurationAssociationProperty the dsc nodeconfiguration property associated with the entity.
+// DscNodeConfigurationAssociationProperty the dsc node configuration property associated with the entity.
type DscNodeConfigurationAssociationProperty struct {
- // Name - Gets or sets the name of the dsc nodeconfiguration.
+ // Name - Gets or sets the name of the dsc node configuration.
Name *string `json:"name,omitempty"`
}
-// DscNodeConfigurationCreateOrUpdateParameters the parameters supplied to the create or update node configuration
-// operation.
+// DscNodeConfigurationCreateOrUpdateParameters the parameters supplied to the create or update node
+// configuration operation.
type DscNodeConfigurationCreateOrUpdateParameters struct {
// Source - Gets or sets the source.
Source *ContentSource `json:"source,omitempty"`
@@ -3508,20 +3867,31 @@ type DscNodeConfigurationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// DscNodeConfigurationListResultIterator provides access to a complete listing of DscNodeConfiguration values.
+// DscNodeConfigurationListResultIterator provides access to a complete listing of DscNodeConfiguration
+// values.
type DscNodeConfigurationListResultIterator struct {
i int
page DscNodeConfigurationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DscNodeConfigurationListResultIterator) Next() error {
+func (iter *DscNodeConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3530,6 +3900,13 @@ func (iter *DscNodeConfigurationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DscNodeConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DscNodeConfigurationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3549,6 +3926,11 @@ func (iter DscNodeConfigurationListResultIterator) Value() DscNodeConfiguration
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DscNodeConfigurationListResultIterator type.
+func NewDscNodeConfigurationListResultIterator(page DscNodeConfigurationListResultPage) DscNodeConfigurationListResultIterator {
+ return DscNodeConfigurationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dnclr DscNodeConfigurationListResult) IsEmpty() bool {
return dnclr.Value == nil || len(*dnclr.Value) == 0
@@ -3556,11 +3938,11 @@ func (dnclr DscNodeConfigurationListResult) IsEmpty() bool {
// dscNodeConfigurationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dnclr DscNodeConfigurationListResult) dscNodeConfigurationListResultPreparer() (*http.Request, error) {
+func (dnclr DscNodeConfigurationListResult) dscNodeConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
if dnclr.NextLink == nil || len(to.String(dnclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dnclr.NextLink)))
@@ -3568,14 +3950,24 @@ func (dnclr DscNodeConfigurationListResult) dscNodeConfigurationListResultPrepar
// DscNodeConfigurationListResultPage contains a page of DscNodeConfiguration values.
type DscNodeConfigurationListResultPage struct {
- fn func(DscNodeConfigurationListResult) (DscNodeConfigurationListResult, error)
+ fn func(context.Context, DscNodeConfigurationListResult) (DscNodeConfigurationListResult, error)
dnclr DscNodeConfigurationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DscNodeConfigurationListResultPage) Next() error {
- next, err := page.fn(page.dnclr)
+func (page *DscNodeConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dnclr)
if err != nil {
return err
}
@@ -3583,6 +3975,13 @@ func (page *DscNodeConfigurationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DscNodeConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DscNodeConfigurationListResultPage) NotDone() bool {
return !page.dnclr.IsEmpty()
@@ -3601,6 +4000,11 @@ func (page DscNodeConfigurationListResultPage) Values() []DscNodeConfiguration {
return *page.dnclr.Value
}
+// Creates a new instance of the DscNodeConfigurationListResultPage type.
+func NewDscNodeConfigurationListResultPage(getNextPage func(context.Context, DscNodeConfigurationListResult) (DscNodeConfigurationListResult, error)) DscNodeConfigurationListResultPage {
+ return DscNodeConfigurationListResultPage{fn: getNextPage}
+}
+
// DscNodeExtensionHandlerAssociationProperty the dsc extensionHandler property associated with the node
type DscNodeExtensionHandlerAssociationProperty struct {
// Name - Gets or sets the name of the extension handler.
@@ -3624,14 +4028,24 @@ type DscNodeListResultIterator struct {
page DscNodeListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DscNodeListResultIterator) Next() error {
+func (iter *DscNodeListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3640,6 +4054,13 @@ func (iter *DscNodeListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DscNodeListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DscNodeListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3659,6 +4080,11 @@ func (iter DscNodeListResultIterator) Value() DscNode {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DscNodeListResultIterator type.
+func NewDscNodeListResultIterator(page DscNodeListResultPage) DscNodeListResultIterator {
+ return DscNodeListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dnlr DscNodeListResult) IsEmpty() bool {
return dnlr.Value == nil || len(*dnlr.Value) == 0
@@ -3666,11 +4092,11 @@ func (dnlr DscNodeListResult) IsEmpty() bool {
// dscNodeListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dnlr DscNodeListResult) dscNodeListResultPreparer() (*http.Request, error) {
+func (dnlr DscNodeListResult) dscNodeListResultPreparer(ctx context.Context) (*http.Request, error) {
if dnlr.NextLink == nil || len(to.String(dnlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dnlr.NextLink)))
@@ -3678,14 +4104,24 @@ func (dnlr DscNodeListResult) dscNodeListResultPreparer() (*http.Request, error)
// DscNodeListResultPage contains a page of DscNode values.
type DscNodeListResultPage struct {
- fn func(DscNodeListResult) (DscNodeListResult, error)
+ fn func(context.Context, DscNodeListResult) (DscNodeListResult, error)
dnlr DscNodeListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DscNodeListResultPage) Next() error {
- next, err := page.fn(page.dnlr)
+func (page *DscNodeListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dnlr)
if err != nil {
return err
}
@@ -3693,6 +4129,13 @@ func (page *DscNodeListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DscNodeListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DscNodeListResultPage) NotDone() bool {
return !page.dnlr.IsEmpty()
@@ -3711,6 +4154,11 @@ func (page DscNodeListResultPage) Values() []DscNode {
return *page.dnlr.Value
}
+// Creates a new instance of the DscNodeListResultPage type.
+func NewDscNodeListResultPage(getNextPage func(context.Context, DscNodeListResult) (DscNodeListResult, error)) DscNodeListResultPage {
+ return DscNodeListResultPage{fn: getNextPage}
+}
+
// DscNodeReport definition of the dsc node report type.
type DscNodeReport struct {
autorest.Response `json:"-"`
@@ -3769,14 +4217,24 @@ type DscNodeReportListResultIterator struct {
page DscNodeReportListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DscNodeReportListResultIterator) Next() error {
+func (iter *DscNodeReportListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeReportListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3785,6 +4243,13 @@ func (iter *DscNodeReportListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DscNodeReportListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DscNodeReportListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3804,6 +4269,11 @@ func (iter DscNodeReportListResultIterator) Value() DscNodeReport {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DscNodeReportListResultIterator type.
+func NewDscNodeReportListResultIterator(page DscNodeReportListResultPage) DscNodeReportListResultIterator {
+ return DscNodeReportListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dnrlr DscNodeReportListResult) IsEmpty() bool {
return dnrlr.Value == nil || len(*dnrlr.Value) == 0
@@ -3811,11 +4281,11 @@ func (dnrlr DscNodeReportListResult) IsEmpty() bool {
// dscNodeReportListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dnrlr DscNodeReportListResult) dscNodeReportListResultPreparer() (*http.Request, error) {
+func (dnrlr DscNodeReportListResult) dscNodeReportListResultPreparer(ctx context.Context) (*http.Request, error) {
if dnrlr.NextLink == nil || len(to.String(dnrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dnrlr.NextLink)))
@@ -3823,14 +4293,24 @@ func (dnrlr DscNodeReportListResult) dscNodeReportListResultPreparer() (*http.Re
// DscNodeReportListResultPage contains a page of DscNodeReport values.
type DscNodeReportListResultPage struct {
- fn func(DscNodeReportListResult) (DscNodeReportListResult, error)
+ fn func(context.Context, DscNodeReportListResult) (DscNodeReportListResult, error)
dnrlr DscNodeReportListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DscNodeReportListResultPage) Next() error {
- next, err := page.fn(page.dnrlr)
+func (page *DscNodeReportListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DscNodeReportListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dnrlr)
if err != nil {
return err
}
@@ -3838,6 +4318,13 @@ func (page *DscNodeReportListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DscNodeReportListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DscNodeReportListResultPage) NotDone() bool {
return !page.dnrlr.IsEmpty()
@@ -3856,6 +4343,11 @@ func (page DscNodeReportListResultPage) Values() []DscNodeReport {
return *page.dnrlr.Value
}
+// Creates a new instance of the DscNodeReportListResultPage type.
+func NewDscNodeReportListResultPage(getNextPage func(context.Context, DscNodeReportListResult) (DscNodeReportListResult, error)) DscNodeReportListResultPage {
+ return DscNodeReportListResultPage{fn: getNextPage}
+}
+
// DscNodeUpdateParameters the parameters supplied to the update dsc node operation.
type DscNodeUpdateParameters struct {
// NodeID - Gets or sets the id of the dsc node.
@@ -3964,21 +4456,31 @@ type HybridRunbookWorkerGroupsListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// HybridRunbookWorkerGroupsListResultIterator provides access to a complete listing of HybridRunbookWorkerGroup
-// values.
+// HybridRunbookWorkerGroupsListResultIterator provides access to a complete listing of
+// HybridRunbookWorkerGroup values.
type HybridRunbookWorkerGroupsListResultIterator struct {
i int
page HybridRunbookWorkerGroupsListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *HybridRunbookWorkerGroupsListResultIterator) Next() error {
+func (iter *HybridRunbookWorkerGroupsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupsListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3987,6 +4489,13 @@ func (iter *HybridRunbookWorkerGroupsListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *HybridRunbookWorkerGroupsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter HybridRunbookWorkerGroupsListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4006,6 +4515,11 @@ func (iter HybridRunbookWorkerGroupsListResultIterator) Value() HybridRunbookWor
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the HybridRunbookWorkerGroupsListResultIterator type.
+func NewHybridRunbookWorkerGroupsListResultIterator(page HybridRunbookWorkerGroupsListResultPage) HybridRunbookWorkerGroupsListResultIterator {
+ return HybridRunbookWorkerGroupsListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (hrwglr HybridRunbookWorkerGroupsListResult) IsEmpty() bool {
return hrwglr.Value == nil || len(*hrwglr.Value) == 0
@@ -4013,11 +4527,11 @@ func (hrwglr HybridRunbookWorkerGroupsListResult) IsEmpty() bool {
// hybridRunbookWorkerGroupsListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (hrwglr HybridRunbookWorkerGroupsListResult) hybridRunbookWorkerGroupsListResultPreparer() (*http.Request, error) {
+func (hrwglr HybridRunbookWorkerGroupsListResult) hybridRunbookWorkerGroupsListResultPreparer(ctx context.Context) (*http.Request, error) {
if hrwglr.NextLink == nil || len(to.String(hrwglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(hrwglr.NextLink)))
@@ -4025,14 +4539,24 @@ func (hrwglr HybridRunbookWorkerGroupsListResult) hybridRunbookWorkerGroupsListR
// HybridRunbookWorkerGroupsListResultPage contains a page of HybridRunbookWorkerGroup values.
type HybridRunbookWorkerGroupsListResultPage struct {
- fn func(HybridRunbookWorkerGroupsListResult) (HybridRunbookWorkerGroupsListResult, error)
+ fn func(context.Context, HybridRunbookWorkerGroupsListResult) (HybridRunbookWorkerGroupsListResult, error)
hrwglr HybridRunbookWorkerGroupsListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *HybridRunbookWorkerGroupsListResultPage) Next() error {
- next, err := page.fn(page.hrwglr)
+func (page *HybridRunbookWorkerGroupsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HybridRunbookWorkerGroupsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.hrwglr)
if err != nil {
return err
}
@@ -4040,6 +4564,13 @@ func (page *HybridRunbookWorkerGroupsListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *HybridRunbookWorkerGroupsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page HybridRunbookWorkerGroupsListResultPage) NotDone() bool {
return !page.hrwglr.IsEmpty()
@@ -4058,6 +4589,11 @@ func (page HybridRunbookWorkerGroupsListResultPage) Values() []HybridRunbookWork
return *page.hrwglr.Value
}
+// Creates a new instance of the HybridRunbookWorkerGroupsListResultPage type.
+func NewHybridRunbookWorkerGroupsListResultPage(getNextPage func(context.Context, HybridRunbookWorkerGroupsListResult) (HybridRunbookWorkerGroupsListResult, error)) HybridRunbookWorkerGroupsListResultPage {
+ return HybridRunbookWorkerGroupsListResultPage{fn: getNextPage}
+}
+
// HybridRunbookWorkerGroupUpdateParameters parameters supplied to the update operation.
type HybridRunbookWorkerGroupUpdateParameters struct {
// Credential - Sets the credential of a worker group.
@@ -4197,14 +4733,24 @@ type JobListResultIterator struct {
page JobListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *JobListResultIterator) Next() error {
+func (iter *JobListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4213,6 +4759,13 @@ func (iter *JobListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *JobListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JobListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4232,6 +4785,11 @@ func (iter JobListResultIterator) Value() Job {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the JobListResultIterator type.
+func NewJobListResultIterator(page JobListResultPage) JobListResultIterator {
+ return JobListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (jlr JobListResult) IsEmpty() bool {
return jlr.Value == nil || len(*jlr.Value) == 0
@@ -4239,11 +4797,11 @@ func (jlr JobListResult) IsEmpty() bool {
// jobListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (jlr JobListResult) jobListResultPreparer() (*http.Request, error) {
+func (jlr JobListResult) jobListResultPreparer(ctx context.Context) (*http.Request, error) {
if jlr.NextLink == nil || len(to.String(jlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jlr.NextLink)))
@@ -4251,14 +4809,24 @@ func (jlr JobListResult) jobListResultPreparer() (*http.Request, error) {
// JobListResultPage contains a page of Job values.
type JobListResultPage struct {
- fn func(JobListResult) (JobListResult, error)
+ fn func(context.Context, JobListResult) (JobListResult, error)
jlr JobListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *JobListResultPage) Next() error {
- next, err := page.fn(page.jlr)
+func (page *JobListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.jlr)
if err != nil {
return err
}
@@ -4266,6 +4834,13 @@ func (page *JobListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *JobListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JobListResultPage) NotDone() bool {
return !page.jlr.IsEmpty()
@@ -4284,6 +4859,11 @@ func (page JobListResultPage) Values() []Job {
return *page.jlr.Value
}
+// Creates a new instance of the JobListResultPage type.
+func NewJobListResultPage(getNextPage func(context.Context, JobListResult) (JobListResult, error)) JobListResultPage {
+ return JobListResultPage{fn: getNextPage}
+}
+
// JobProperties definition of job properties.
type JobProperties struct {
// Runbook - Gets or sets the runbook.
@@ -4540,14 +5120,24 @@ type JobScheduleListResultIterator struct {
page JobScheduleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *JobScheduleListResultIterator) Next() error {
+func (iter *JobScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4556,6 +5146,13 @@ func (iter *JobScheduleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *JobScheduleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JobScheduleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4575,6 +5172,11 @@ func (iter JobScheduleListResultIterator) Value() JobSchedule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the JobScheduleListResultIterator type.
+func NewJobScheduleListResultIterator(page JobScheduleListResultPage) JobScheduleListResultIterator {
+ return JobScheduleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (jslr JobScheduleListResult) IsEmpty() bool {
return jslr.Value == nil || len(*jslr.Value) == 0
@@ -4582,11 +5184,11 @@ func (jslr JobScheduleListResult) IsEmpty() bool {
// jobScheduleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (jslr JobScheduleListResult) jobScheduleListResultPreparer() (*http.Request, error) {
+func (jslr JobScheduleListResult) jobScheduleListResultPreparer(ctx context.Context) (*http.Request, error) {
if jslr.NextLink == nil || len(to.String(jslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jslr.NextLink)))
@@ -4594,14 +5196,24 @@ func (jslr JobScheduleListResult) jobScheduleListResultPreparer() (*http.Request
// JobScheduleListResultPage contains a page of JobSchedule values.
type JobScheduleListResultPage struct {
- fn func(JobScheduleListResult) (JobScheduleListResult, error)
+ fn func(context.Context, JobScheduleListResult) (JobScheduleListResult, error)
jslr JobScheduleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *JobScheduleListResultPage) Next() error {
- next, err := page.fn(page.jslr)
+func (page *JobScheduleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobScheduleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.jslr)
if err != nil {
return err
}
@@ -4609,6 +5221,13 @@ func (page *JobScheduleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *JobScheduleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JobScheduleListResultPage) NotDone() bool {
return !page.jslr.IsEmpty()
@@ -4627,6 +5246,11 @@ func (page JobScheduleListResultPage) Values() []JobSchedule {
return *page.jslr.Value
}
+// Creates a new instance of the JobScheduleListResultPage type.
+func NewJobScheduleListResultPage(getNextPage func(context.Context, JobScheduleListResult) (JobScheduleListResult, error)) JobScheduleListResultPage {
+ return JobScheduleListResultPage{fn: getNextPage}
+}
+
// JobScheduleProperties definition of job schedule parameters.
type JobScheduleProperties struct {
// JobScheduleID - Gets or sets the id of job schedule.
@@ -4731,14 +5355,24 @@ type JobStreamListResultIterator struct {
page JobStreamListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *JobStreamListResultIterator) Next() error {
+func (iter *JobStreamListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4747,6 +5381,13 @@ func (iter *JobStreamListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *JobStreamListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JobStreamListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4766,6 +5407,11 @@ func (iter JobStreamListResultIterator) Value() JobStream {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the JobStreamListResultIterator type.
+func NewJobStreamListResultIterator(page JobStreamListResultPage) JobStreamListResultIterator {
+ return JobStreamListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (jslr JobStreamListResult) IsEmpty() bool {
return jslr.Value == nil || len(*jslr.Value) == 0
@@ -4773,11 +5419,11 @@ func (jslr JobStreamListResult) IsEmpty() bool {
// jobStreamListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (jslr JobStreamListResult) jobStreamListResultPreparer() (*http.Request, error) {
+func (jslr JobStreamListResult) jobStreamListResultPreparer(ctx context.Context) (*http.Request, error) {
if jslr.NextLink == nil || len(to.String(jslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jslr.NextLink)))
@@ -4785,14 +5431,24 @@ func (jslr JobStreamListResult) jobStreamListResultPreparer() (*http.Request, er
// JobStreamListResultPage contains a page of JobStream values.
type JobStreamListResultPage struct {
- fn func(JobStreamListResult) (JobStreamListResult, error)
+ fn func(context.Context, JobStreamListResult) (JobStreamListResult, error)
jslr JobStreamListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *JobStreamListResultPage) Next() error {
- next, err := page.fn(page.jslr)
+func (page *JobStreamListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobStreamListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.jslr)
if err != nil {
return err
}
@@ -4800,6 +5456,13 @@ func (page *JobStreamListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *JobStreamListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JobStreamListResultPage) NotDone() bool {
return !page.jslr.IsEmpty()
@@ -4818,6 +5481,11 @@ func (page JobStreamListResultPage) Values() []JobStream {
return *page.jslr.Value
}
+// Creates a new instance of the JobStreamListResultPage type.
+func NewJobStreamListResultPage(getNextPage func(context.Context, JobStreamListResult) (JobStreamListResult, error)) JobStreamListResultPage {
+ return JobStreamListResultPage{fn: getNextPage}
+}
+
// JobStreamProperties definition of the job stream.
type JobStreamProperties struct {
// JobStreamID - Gets or sets the id of the job stream.
@@ -5116,14 +5784,24 @@ type ModuleListResultIterator struct {
page ModuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ModuleListResultIterator) Next() error {
+func (iter *ModuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5132,6 +5810,13 @@ func (iter *ModuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ModuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ModuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5151,6 +5836,11 @@ func (iter ModuleListResultIterator) Value() Module {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ModuleListResultIterator type.
+func NewModuleListResultIterator(page ModuleListResultPage) ModuleListResultIterator {
+ return ModuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (mlr ModuleListResult) IsEmpty() bool {
return mlr.Value == nil || len(*mlr.Value) == 0
@@ -5158,11 +5848,11 @@ func (mlr ModuleListResult) IsEmpty() bool {
// moduleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (mlr ModuleListResult) moduleListResultPreparer() (*http.Request, error) {
+func (mlr ModuleListResult) moduleListResultPreparer(ctx context.Context) (*http.Request, error) {
if mlr.NextLink == nil || len(to.String(mlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(mlr.NextLink)))
@@ -5170,14 +5860,24 @@ func (mlr ModuleListResult) moduleListResultPreparer() (*http.Request, error) {
// ModuleListResultPage contains a page of Module values.
type ModuleListResultPage struct {
- fn func(ModuleListResult) (ModuleListResult, error)
+ fn func(context.Context, ModuleListResult) (ModuleListResult, error)
mlr ModuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ModuleListResultPage) Next() error {
- next, err := page.fn(page.mlr)
+func (page *ModuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.mlr)
if err != nil {
return err
}
@@ -5185,6 +5885,13 @@ func (page *ModuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ModuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ModuleListResultPage) NotDone() bool {
return !page.mlr.IsEmpty()
@@ -5203,6 +5910,11 @@ func (page ModuleListResultPage) Values() []Module {
return *page.mlr.Value
}
+// Creates a new instance of the ModuleListResultPage type.
+func NewModuleListResultPage(getNextPage func(context.Context, ModuleListResult) (ModuleListResult, error)) ModuleListResultPage {
+ return ModuleListResultPage{fn: getNextPage}
+}
+
// ModuleProperties definition of the module property type.
type ModuleProperties struct {
// IsGlobal - Gets or sets the isGlobal flag of the module.
@@ -5367,7 +6079,7 @@ type Resource struct {
Type *string `json:"type,omitempty"`
}
-// RunAsCredentialAssociationProperty definition of runas credential to use for hybrid worker.
+// RunAsCredentialAssociationProperty definition of RunAs credential to use for hybrid worker.
type RunAsCredentialAssociationProperty struct {
// Name - Gets or sets the name of the credential.
Name *string `json:"name,omitempty"`
@@ -5509,7 +6221,8 @@ type RunbookCreateOrUpdateDraftParameters struct {
RunbookContent *string `json:"runbookContent,omitempty"`
}
-// RunbookCreateOrUpdateDraftProperties the parameters supplied to the create or update dratft runbook properties.
+// RunbookCreateOrUpdateDraftProperties the parameters supplied to the create or update draft runbook
+// properties.
type RunbookCreateOrUpdateDraftProperties struct {
// LogVerbose - Gets or sets verbose log option.
LogVerbose *bool `json:"logVerbose,omitempty"`
@@ -5665,7 +6378,8 @@ func (rd RunbookDraft) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// RunbookDraftPublishFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RunbookDraftPublishFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RunbookDraftPublishFuture struct {
azure.Future
}
@@ -5687,8 +6401,8 @@ func (future *RunbookDraftPublishFuture) Result(client RunbookDraftClient) (ar a
return
}
-// RunbookDraftReplaceContentFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// RunbookDraftReplaceContentFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type RunbookDraftReplaceContentFuture struct {
azure.Future
}
@@ -5716,7 +6430,7 @@ func (future *RunbookDraftReplaceContentFuture) Result(client RunbookDraftClient
return
}
-// RunbookDraftUndoEditResult the response model for the undoedit runbook operation.
+// RunbookDraftUndoEditResult the response model for the undo edit runbook operation.
type RunbookDraftUndoEditResult struct {
autorest.Response `json:"-"`
// StatusCode - Possible values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestURITooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HTTPVersionNotSupported'
@@ -5739,14 +6453,24 @@ type RunbookListResultIterator struct {
page RunbookListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RunbookListResultIterator) Next() error {
+func (iter *RunbookListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5755,6 +6479,13 @@ func (iter *RunbookListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RunbookListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RunbookListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5774,6 +6505,11 @@ func (iter RunbookListResultIterator) Value() Runbook {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RunbookListResultIterator type.
+func NewRunbookListResultIterator(page RunbookListResultPage) RunbookListResultIterator {
+ return RunbookListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr RunbookListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -5781,11 +6517,11 @@ func (rlr RunbookListResult) IsEmpty() bool {
// runbookListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr RunbookListResult) runbookListResultPreparer() (*http.Request, error) {
+func (rlr RunbookListResult) runbookListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -5793,14 +6529,24 @@ func (rlr RunbookListResult) runbookListResultPreparer() (*http.Request, error)
// RunbookListResultPage contains a page of Runbook values.
type RunbookListResultPage struct {
- fn func(RunbookListResult) (RunbookListResult, error)
+ fn func(context.Context, RunbookListResult) (RunbookListResult, error)
rlr RunbookListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RunbookListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *RunbookListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -5808,6 +6554,13 @@ func (page *RunbookListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RunbookListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RunbookListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -5826,11 +6579,16 @@ func (page RunbookListResultPage) Values() []Runbook {
return *page.rlr.Value
}
+// Creates a new instance of the RunbookListResultPage type.
+func NewRunbookListResultPage(getNextPage func(context.Context, RunbookListResult) (RunbookListResult, error)) RunbookListResultPage {
+ return RunbookListResultPage{fn: getNextPage}
+}
+
// RunbookParameter definition of the runbook parameter type.
type RunbookParameter struct {
// Type - Gets or sets the type of the parameter.
Type *string `json:"type,omitempty"`
- // IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is madatory or not.
+ // IsMandatory - Gets or sets a Boolean value to indicate whether the parameter is mandatory or not.
IsMandatory *bool `json:"isMandatory,omitempty"`
// Position - Get or sets the position of the parameter.
Position *int32 `json:"position,omitempty"`
@@ -6190,14 +6948,24 @@ type ScheduleListResultIterator struct {
page ScheduleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ScheduleListResultIterator) Next() error {
+func (iter *ScheduleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6206,6 +6974,13 @@ func (iter *ScheduleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ScheduleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ScheduleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6225,6 +7000,11 @@ func (iter ScheduleListResultIterator) Value() Schedule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ScheduleListResultIterator type.
+func NewScheduleListResultIterator(page ScheduleListResultPage) ScheduleListResultIterator {
+ return ScheduleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (slr ScheduleListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
@@ -6232,11 +7012,11 @@ func (slr ScheduleListResult) IsEmpty() bool {
// scheduleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (slr ScheduleListResult) scheduleListResultPreparer() (*http.Request, error) {
+func (slr ScheduleListResult) scheduleListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
@@ -6244,14 +7024,24 @@ func (slr ScheduleListResult) scheduleListResultPreparer() (*http.Request, error
// ScheduleListResultPage contains a page of Schedule values.
type ScheduleListResultPage struct {
- fn func(ScheduleListResult) (ScheduleListResult, error)
+ fn func(context.Context, ScheduleListResult) (ScheduleListResult, error)
slr ScheduleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ScheduleListResultPage) Next() error {
- next, err := page.fn(page.slr)
+func (page *ScheduleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
@@ -6259,6 +7049,13 @@ func (page *ScheduleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ScheduleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ScheduleListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
@@ -6277,6 +7074,11 @@ func (page ScheduleListResultPage) Values() []Schedule {
return *page.slr.Value
}
+// Creates a new instance of the ScheduleListResultPage type.
+func NewScheduleListResultPage(getNextPage func(context.Context, ScheduleListResult) (ScheduleListResult, error)) ScheduleListResultPage {
+ return ScheduleListResultPage{fn: getNextPage}
+}
+
// ScheduleProperties definition of schedule parameters.
type ScheduleProperties struct {
// StartTime - Gets or sets the start time of the schedule.
@@ -6580,7 +7382,7 @@ type UsageListResult struct {
Value *[]Usage `json:"value,omitempty"`
}
-// Variable definition of the varible.
+// Variable definition of the variable.
type Variable struct {
autorest.Response `json:"-"`
// VariableProperties - Gets or sets the properties of the variable.
@@ -6740,14 +7542,24 @@ type VariableListResultIterator struct {
page VariableListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VariableListResultIterator) Next() error {
+func (iter *VariableListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6756,6 +7568,13 @@ func (iter *VariableListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VariableListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VariableListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6775,6 +7594,11 @@ func (iter VariableListResultIterator) Value() Variable {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VariableListResultIterator type.
+func NewVariableListResultIterator(page VariableListResultPage) VariableListResultIterator {
+ return VariableListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vlr VariableListResult) IsEmpty() bool {
return vlr.Value == nil || len(*vlr.Value) == 0
@@ -6782,11 +7606,11 @@ func (vlr VariableListResult) IsEmpty() bool {
// variableListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vlr VariableListResult) variableListResultPreparer() (*http.Request, error) {
+func (vlr VariableListResult) variableListResultPreparer(ctx context.Context) (*http.Request, error) {
if vlr.NextLink == nil || len(to.String(vlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vlr.NextLink)))
@@ -6794,14 +7618,24 @@ func (vlr VariableListResult) variableListResultPreparer() (*http.Request, error
// VariableListResultPage contains a page of Variable values.
type VariableListResultPage struct {
- fn func(VariableListResult) (VariableListResult, error)
+ fn func(context.Context, VariableListResult) (VariableListResult, error)
vlr VariableListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VariableListResultPage) Next() error {
- next, err := page.fn(page.vlr)
+func (page *VariableListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vlr)
if err != nil {
return err
}
@@ -6809,6 +7643,13 @@ func (page *VariableListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VariableListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VariableListResultPage) NotDone() bool {
return !page.vlr.IsEmpty()
@@ -6827,7 +7668,12 @@ func (page VariableListResultPage) Values() []Variable {
return *page.vlr.Value
}
-// VariableProperties definition of the varible properties
+// Creates a new instance of the VariableListResultPage type.
+func NewVariableListResultPage(getNextPage func(context.Context, VariableListResult) (VariableListResult, error)) VariableListResultPage {
+ return VariableListResultPage{fn: getNextPage}
+}
+
+// VariableProperties definition of the variable properties
type VariableProperties struct {
// Value - Gets or sets the value of the variable.
Value *string `json:"value,omitempty"`
@@ -7092,14 +7938,24 @@ type WebhookListResultIterator struct {
page WebhookListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WebhookListResultIterator) Next() error {
+func (iter *WebhookListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7108,6 +7964,13 @@ func (iter *WebhookListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WebhookListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WebhookListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7127,6 +7990,11 @@ func (iter WebhookListResultIterator) Value() Webhook {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WebhookListResultIterator type.
+func NewWebhookListResultIterator(page WebhookListResultPage) WebhookListResultIterator {
+ return WebhookListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wlr WebhookListResult) IsEmpty() bool {
return wlr.Value == nil || len(*wlr.Value) == 0
@@ -7134,11 +8002,11 @@ func (wlr WebhookListResult) IsEmpty() bool {
// webhookListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wlr WebhookListResult) webhookListResultPreparer() (*http.Request, error) {
+func (wlr WebhookListResult) webhookListResultPreparer(ctx context.Context) (*http.Request, error) {
if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wlr.NextLink)))
@@ -7146,14 +8014,24 @@ func (wlr WebhookListResult) webhookListResultPreparer() (*http.Request, error)
// WebhookListResultPage contains a page of Webhook values.
type WebhookListResultPage struct {
- fn func(WebhookListResult) (WebhookListResult, error)
+ fn func(context.Context, WebhookListResult) (WebhookListResult, error)
wlr WebhookListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WebhookListResultPage) Next() error {
- next, err := page.fn(page.wlr)
+func (page *WebhookListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wlr)
if err != nil {
return err
}
@@ -7161,6 +8039,13 @@ func (page *WebhookListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WebhookListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WebhookListResultPage) NotDone() bool {
return !page.wlr.IsEmpty()
@@ -7179,6 +8064,11 @@ func (page WebhookListResultPage) Values() []Webhook {
return *page.wlr.Value
}
+// Creates a new instance of the WebhookListResultPage type.
+func NewWebhookListResultPage(getNextPage func(context.Context, WebhookListResult) (WebhookListResult, error)) WebhookListResultPage {
+ return WebhookListResultPage{fn: getNextPage}
+}
+
// WebhookProperties definition of the webhook properties
type WebhookProperties struct {
// IsEnabled - Gets or sets the value of the enabled flag of the webhook.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go
index d75a0d02f7f4..2ab1ae2becbe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/module.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewModuleClientWithBaseURI(baseURI string, subscriptionID string) ModuleCli
// moduleName - the name of module.
// parameters - the create or update parameters for module.
func (client ModuleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleCreateOrUpdateParameters) (result Module, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.CreateOrUpdate")
+ 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},
@@ -135,6 +146,16 @@ func (client ModuleClient) CreateOrUpdateResponder(resp *http.Response) (result
// automationAccountName - the name of the automation account.
// moduleName - the module name.
func (client ModuleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.Delete")
+ 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},
@@ -211,6 +232,16 @@ func (client ModuleClient) DeleteResponder(resp *http.Response) (result autorest
// automationAccountName - the name of the automation account.
// moduleName - the module name.
func (client ModuleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string) (result Module, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.Get")
+ 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},
@@ -287,6 +318,16 @@ func (client ModuleClient) GetResponder(resp *http.Response) (result Module, err
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client ModuleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.mlr.Response.Response != nil {
+ sc = result.mlr.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},
@@ -359,8 +400,8 @@ func (client ModuleClient) ListByAutomationAccountResponder(resp *http.Response)
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client ModuleClient) listByAutomationAccountNextResults(lastResults ModuleListResult) (result ModuleListResult, err error) {
- req, err := lastResults.moduleListResultPreparer()
+func (client ModuleClient) listByAutomationAccountNextResults(ctx context.Context, lastResults ModuleListResult) (result ModuleListResult, err error) {
+ req, err := lastResults.moduleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.ModuleClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -381,6 +422,16 @@ func (client ModuleClient) listByAutomationAccountNextResults(lastResults Module
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ModuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -392,6 +443,16 @@ func (client ModuleClient) ListByAutomationAccountComplete(ctx context.Context,
// moduleName - the name of module.
// parameters - the update parameters for module.
func (client ModuleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, parameters ModuleUpdateParameters) (result Module, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ModuleClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go
index 32a8f9af74db..92e7fd86fe32 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/nodereports.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewNodeReportsClientWithBaseURI(baseURI string, subscriptionID string) Node
// nodeID - the Dsc node id.
// reportID - the report id.
func (client NodeReportsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result DscNodeReport, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NodeReportsClient.Get")
+ 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},
@@ -126,6 +137,16 @@ func (client NodeReportsClient) GetResponder(resp *http.Response) (result DscNod
// nodeID - the Dsc node id.
// reportID - the report id.
func (client NodeReportsClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, reportID string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NodeReportsClient.GetContent")
+ 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},
@@ -205,6 +226,16 @@ func (client NodeReportsClient) GetContentResponder(resp *http.Response) (result
// nodeID - the parameters supplied to the list operation.
// filter - the filter to apply on the operation.
func (client NodeReportsClient) ListByNode(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NodeReportsClient.ListByNode")
+ defer func() {
+ sc := -1
+ if result.dnrlr.Response.Response != nil {
+ sc = result.dnrlr.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},
@@ -281,8 +312,8 @@ func (client NodeReportsClient) ListByNodeResponder(resp *http.Response) (result
}
// listByNodeNextResults retrieves the next set of results, if any.
-func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportListResult) (result DscNodeReportListResult, err error) {
- req, err := lastResults.dscNodeReportListResultPreparer()
+func (client NodeReportsClient) listByNodeNextResults(ctx context.Context, lastResults DscNodeReportListResult) (result DscNodeReportListResult, err error) {
+ req, err := lastResults.dscNodeReportListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.NodeReportsClient", "listByNodeNextResults", nil, "Failure preparing next results request")
}
@@ -303,6 +334,16 @@ func (client NodeReportsClient) listByNodeNextResults(lastResults DscNodeReportL
// ListByNodeComplete enumerates all values, automatically crossing page boundaries as required.
func (client NodeReportsClient) ListByNodeComplete(ctx context.Context, resourceGroupName string, automationAccountName string, nodeID string, filter string) (result DscNodeReportListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NodeReportsClient.ListByNode")
+ 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.ListByNode(ctx, resourceGroupName, automationAccountName, nodeID, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go
index 04791f5ad5b3..3271369fbcd3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/objectdatatypes.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewObjectDataTypesClientWithBaseURI(baseURI string, subscriptionID string)
// moduleName - the name of module.
// typeName - the name of type.
func (client ObjectDataTypesClient) ListFieldsByModuleAndType(ctx context.Context, resourceGroupName string, automationAccountName string, moduleName string, typeName string) (result TypeFieldListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectDataTypesClient.ListFieldsByModuleAndType")
+ 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},
@@ -125,6 +136,16 @@ func (client ObjectDataTypesClient) ListFieldsByModuleAndTypeResponder(resp *htt
// automationAccountName - the name of the automation account.
// typeName - the name of type.
func (client ObjectDataTypesClient) ListFieldsByType(ctx context.Context, resourceGroupName string, automationAccountName string, typeName string) (result TypeFieldListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectDataTypesClient.ListFieldsByType")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/operations.go
index b731c2d30ea0..3c7b59fa5449 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Automation REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "automation.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go
index 84adf85fefe0..c99e689fe215 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbook.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewRunbookClientWithBaseURI(baseURI string, subscriptionID string) RunbookC
// parameters - the create or update parameters for runbook. Provide either content link for a published
// runbook or draft, not both.
func (client RunbookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookCreateOrUpdateParameters) (result Runbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.CreateOrUpdate")
+ 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},
@@ -144,6 +155,16 @@ func (client RunbookClient) CreateOrUpdateResponder(resp *http.Response) (result
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.Delete")
+ 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},
@@ -220,6 +241,16 @@ func (client RunbookClient) DeleteResponder(resp *http.Response) (result autores
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result Runbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.Get")
+ 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},
@@ -297,6 +328,16 @@ func (client RunbookClient) GetResponder(resp *http.Response) (result Runbook, e
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.GetContent")
+ 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},
@@ -372,6 +413,16 @@ func (client RunbookClient) GetContentResponder(resp *http.Response) (result Rea
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client RunbookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.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},
@@ -444,8 +495,8 @@ func (client RunbookClient) ListByAutomationAccountResponder(resp *http.Response
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client RunbookClient) listByAutomationAccountNextResults(lastResults RunbookListResult) (result RunbookListResult, err error) {
- req, err := lastResults.runbookListResultPreparer()
+func (client RunbookClient) listByAutomationAccountNextResults(ctx context.Context, lastResults RunbookListResult) (result RunbookListResult, err error) {
+ req, err := lastResults.runbookListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.RunbookClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -466,6 +517,16 @@ func (client RunbookClient) listByAutomationAccountNextResults(lastResults Runbo
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result RunbookListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -477,6 +538,16 @@ func (client RunbookClient) ListByAutomationAccountComplete(ctx context.Context,
// runbookName - the runbook name.
// parameters - the update parameters for runbook.
func (client RunbookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters RunbookUpdateParameters) (result Runbook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go
index ce3d3f111c44..67dc6a33d0a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/runbookdraft.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"io"
"net/http"
)
@@ -47,6 +48,16 @@ func NewRunbookDraftClientWithBaseURI(baseURI string, subscriptionID string) Run
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookDraftClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraft, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookDraftClient.Get")
+ 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},
@@ -124,6 +135,16 @@ func (client RunbookDraftClient) GetResponder(resp *http.Response) (result Runbo
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookDraftClient) GetContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookDraftClient.GetContent")
+ 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},
@@ -200,6 +221,16 @@ func (client RunbookDraftClient) GetContentResponder(resp *http.Response) (resul
// automationAccountName - the name of the automation account.
// runbookName - the parameters supplied to the publish runbook operation.
func (client RunbookDraftClient) Publish(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftPublishFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookDraftClient.Publish")
+ 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},
@@ -254,10 +285,6 @@ func (client RunbookDraftClient) PublishSender(req *http.Request) (future Runboo
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -281,6 +308,16 @@ func (client RunbookDraftClient) PublishResponder(resp *http.Response) (result a
// runbookName - the runbook name.
// runbookContent - the runbook draft content.
func (client RunbookDraftClient) ReplaceContent(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, runbookContent io.ReadCloser) (result RunbookDraftReplaceContentFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookDraftClient.ReplaceContent")
+ 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},
@@ -337,10 +374,6 @@ func (client RunbookDraftClient) ReplaceContentSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -364,6 +397,16 @@ func (client RunbookDraftClient) ReplaceContentResponder(resp *http.Response) (r
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client RunbookDraftClient) UndoEdit(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result RunbookDraftUndoEditResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunbookDraftClient.UndoEdit")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go
index c6635f076f56..1768ccfbad0c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/schedule.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewScheduleClientWithBaseURI(baseURI string, subscriptionID string) Schedul
// scheduleName - the schedule name.
// parameters - the parameters supplied to the create or update schedule operation.
func (client ScheduleClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleCreateOrUpdateParameters) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.CreateOrUpdate")
+ 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},
@@ -130,6 +141,16 @@ func (client ScheduleClient) CreateOrUpdateResponder(resp *http.Response) (resul
// automationAccountName - the name of the automation account.
// scheduleName - the schedule name.
func (client ScheduleClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.Delete")
+ 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},
@@ -206,6 +227,16 @@ func (client ScheduleClient) DeleteResponder(resp *http.Response) (result autore
// automationAccountName - the name of the automation account.
// scheduleName - the schedule name.
func (client ScheduleClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.Get")
+ 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},
@@ -282,6 +313,16 @@ func (client ScheduleClient) GetResponder(resp *http.Response) (result Schedule,
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client ScheduleClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.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},
@@ -354,8 +395,8 @@ func (client ScheduleClient) ListByAutomationAccountResponder(resp *http.Respons
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client ScheduleClient) listByAutomationAccountNextResults(lastResults ScheduleListResult) (result ScheduleListResult, err error) {
- req, err := lastResults.scheduleListResultPreparer()
+func (client ScheduleClient) listByAutomationAccountNextResults(ctx context.Context, lastResults ScheduleListResult) (result ScheduleListResult, err error) {
+ req, err := lastResults.scheduleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.ScheduleClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -376,6 +417,16 @@ func (client ScheduleClient) listByAutomationAccountNextResults(lastResults Sche
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result ScheduleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -387,6 +438,16 @@ func (client ScheduleClient) ListByAutomationAccountComplete(ctx context.Context
// scheduleName - the schedule name.
// parameters - the parameters supplied to the update schedule operation.
func (client ScheduleClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, scheduleName string, parameters ScheduleUpdateParameters) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduleClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go
index 94c03fd22047..dfca129d5350 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/statistics.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewStatisticsClientWithBaseURI(baseURI string, subscriptionID string) Stati
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client StatisticsClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result StatisticsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StatisticsClient.ListByAutomationAccount")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go
index 38da3d182a88..29d0930c9943 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjob.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewTestJobClientWithBaseURI(baseURI string, subscriptionID string) TestJobC
// runbookName - the parameters supplied to the create test job operation.
// parameters - the parameters supplied to the create test job operation.
func (client TestJobClient) Create(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, parameters TestJobCreateParameters) (result TestJob, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobClient.Create")
+ 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},
@@ -126,6 +137,16 @@ func (client TestJobClient) CreateResponder(resp *http.Response) (result TestJob
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client TestJobClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result TestJob, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobClient.Get")
+ 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},
@@ -203,6 +224,16 @@ func (client TestJobClient) GetResponder(resp *http.Response) (result TestJob, e
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client TestJobClient) Resume(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobClient.Resume")
+ 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},
@@ -279,6 +310,16 @@ func (client TestJobClient) ResumeResponder(resp *http.Response) (result autores
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client TestJobClient) Stop(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobClient.Stop")
+ 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},
@@ -355,6 +396,16 @@ func (client TestJobClient) StopResponder(resp *http.Response) (result autorest.
// automationAccountName - the name of the automation account.
// runbookName - the runbook name.
func (client TestJobClient) Suspend(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobClient.Suspend")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go
index 3e6219040420..4f132375aa10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/testjobstreams.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewTestJobStreamsClientWithBaseURI(baseURI string, subscriptionID string) T
// runbookName - the runbook name.
// jobStreamID - the job stream id.
func (client TestJobStreamsClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, jobStreamID string) (result JobStream, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobStreamsClient.Get")
+ 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},
@@ -126,6 +137,16 @@ func (client TestJobStreamsClient) GetResponder(resp *http.Response) (result Job
// runbookName - the runbook name.
// filter - the filter to apply on the operation.
func (client TestJobStreamsClient) ListByTestJob(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobStreamsClient.ListByTestJob")
+ defer func() {
+ sc := -1
+ if result.jslr.Response.Response != nil {
+ sc = result.jslr.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},
@@ -202,8 +223,8 @@ func (client TestJobStreamsClient) ListByTestJobResponder(resp *http.Response) (
}
// listByTestJobNextResults retrieves the next set of results, if any.
-func (client TestJobStreamsClient) listByTestJobNextResults(lastResults JobStreamListResult) (result JobStreamListResult, err error) {
- req, err := lastResults.jobStreamListResultPreparer()
+func (client TestJobStreamsClient) listByTestJobNextResults(ctx context.Context, lastResults JobStreamListResult) (result JobStreamListResult, err error) {
+ req, err := lastResults.jobStreamListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.TestJobStreamsClient", "listByTestJobNextResults", nil, "Failure preparing next results request")
}
@@ -224,6 +245,16 @@ func (client TestJobStreamsClient) listByTestJobNextResults(lastResults JobStrea
// ListByTestJobComplete enumerates all values, automatically crossing page boundaries as required.
func (client TestJobStreamsClient) ListByTestJobComplete(ctx context.Context, resourceGroupName string, automationAccountName string, runbookName string, filter string) (result JobStreamListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TestJobStreamsClient.ListByTestJob")
+ 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.ListByTestJob(ctx, resourceGroupName, automationAccountName, runbookName, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go
index 39f4e6b683b2..ddb392af716d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/usages.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client UsagesClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result UsageListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.ListByAutomationAccount")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go
index df53908dba5e..62741c8678a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/variable.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVariableClientWithBaseURI(baseURI string, subscriptionID string) Variabl
// variableName - the variable name.
// parameters - the parameters supplied to the create or update variable operation.
func (client VariableClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableCreateOrUpdateParameters) (result Variable, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.CreateOrUpdate")
+ 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},
@@ -129,6 +140,16 @@ func (client VariableClient) CreateOrUpdateResponder(resp *http.Response) (resul
// automationAccountName - the name of the automation account.
// variableName - the name of variable.
func (client VariableClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.Delete")
+ 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},
@@ -205,6 +226,16 @@ func (client VariableClient) DeleteResponder(resp *http.Response) (result autore
// automationAccountName - the name of the automation account.
// variableName - the name of variable.
func (client VariableClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string) (result Variable, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.Get")
+ 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},
@@ -281,6 +312,16 @@ func (client VariableClient) GetResponder(resp *http.Response) (result Variable,
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client VariableClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.vlr.Response.Response != nil {
+ sc = result.vlr.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},
@@ -353,8 +394,8 @@ func (client VariableClient) ListByAutomationAccountResponder(resp *http.Respons
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client VariableClient) listByAutomationAccountNextResults(lastResults VariableListResult) (result VariableListResult, err error) {
- req, err := lastResults.variableListResultPreparer()
+func (client VariableClient) listByAutomationAccountNextResults(ctx context.Context, lastResults VariableListResult) (result VariableListResult, err error) {
+ req, err := lastResults.variableListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.VariableClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -375,6 +416,16 @@ func (client VariableClient) listByAutomationAccountNextResults(lastResults Vari
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string) (result VariableListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName)
return
}
@@ -386,6 +437,16 @@ func (client VariableClient) ListByAutomationAccountComplete(ctx context.Context
// variableName - the variable name.
// parameters - the parameters supplied to the update variable operation.
func (client VariableClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, variableName string, parameters VariableUpdateParameters) (result Variable, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VariableClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go
index 186ab20e4d82..eca7240b65f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/automation/mgmt/2015-10-31/automation/webhook.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewWebhookClientWithBaseURI(baseURI string, subscriptionID string) WebhookC
// webhookName - the webhook name.
// parameters - the create or update parameters for webhook.
func (client WebhookClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookCreateOrUpdateParameters) (result Webhook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.CreateOrUpdate")
+ 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},
@@ -129,6 +140,16 @@ func (client WebhookClient) CreateOrUpdateResponder(resp *http.Response) (result
// automationAccountName - the name of the automation account.
// webhookName - the webhook name.
func (client WebhookClient) Delete(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.Delete")
+ 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},
@@ -204,6 +225,16 @@ func (client WebhookClient) DeleteResponder(resp *http.Response) (result autores
// resourceGroupName - name of an Azure Resource group.
// automationAccountName - the name of the automation account.
func (client WebhookClient) GenerateURI(ctx context.Context, resourceGroupName string, automationAccountName string) (result String, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.GenerateURI")
+ 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},
@@ -280,6 +311,16 @@ func (client WebhookClient) GenerateURIResponder(resp *http.Response) (result St
// automationAccountName - the name of the automation account.
// webhookName - the webhook name.
func (client WebhookClient) Get(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string) (result Webhook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.Get")
+ 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},
@@ -357,6 +398,16 @@ func (client WebhookClient) GetResponder(resp *http.Response) (result Webhook, e
// automationAccountName - the name of the automation account.
// filter - the filter to apply on the operation.
func (client WebhookClient) ListByAutomationAccount(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.ListByAutomationAccount")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.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},
@@ -432,8 +483,8 @@ func (client WebhookClient) ListByAutomationAccountResponder(resp *http.Response
}
// listByAutomationAccountNextResults retrieves the next set of results, if any.
-func (client WebhookClient) listByAutomationAccountNextResults(lastResults WebhookListResult) (result WebhookListResult, err error) {
- req, err := lastResults.webhookListResultPreparer()
+func (client WebhookClient) listByAutomationAccountNextResults(ctx context.Context, lastResults WebhookListResult) (result WebhookListResult, err error) {
+ req, err := lastResults.webhookListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "automation.WebhookClient", "listByAutomationAccountNextResults", nil, "Failure preparing next results request")
}
@@ -454,6 +505,16 @@ func (client WebhookClient) listByAutomationAccountNextResults(lastResults Webho
// ListByAutomationAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context, resourceGroupName string, automationAccountName string, filter string) (result WebhookListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.ListByAutomationAccount")
+ 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.ListByAutomationAccount(ctx, resourceGroupName, automationAccountName, filter)
return
}
@@ -465,6 +526,16 @@ func (client WebhookClient) ListByAutomationAccountComplete(ctx context.Context,
// webhookName - the webhook name.
// parameters - the update parameters for webhook.
func (client WebhookClient) Update(ctx context.Context, resourceGroupName string, automationAccountName string, webhookName string, parameters WebhookUpdateParameters) (result Webhook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
index ebc60a38765b..edbd07fc8365 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/account.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewAccountClientWithBaseURI(baseURI string, subscriptionID string) AccountC
// created. For example: http://accountname.region.batch.azure.com/.
// parameters - additional parameters for account creation.
func (client AccountClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result AccountCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -115,10 +126,6 @@ func (client AccountClient) CreateSender(req *http.Request) (future AccountCreat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -141,6 +148,16 @@ func (client AccountClient) CreateResponder(resp *http.Response) (result Account
// resourceGroupName - the name of the resource group that contains the Batch account.
// accountName - the name of the Batch account.
func (client AccountClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result AccountDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -194,10 +211,6 @@ func (client AccountClient) DeleteSender(req *http.Request) (future AccountDelet
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -219,6 +232,16 @@ func (client AccountClient) DeleteResponder(resp *http.Response) (result autores
// resourceGroupName - the name of the resource group that contains the Batch account.
// accountName - the name of the Batch account.
func (client AccountClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Get")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -296,6 +319,16 @@ func (client AccountClient) GetResponder(resp *http.Response) (result Account, e
// resourceGroupName - the name of the resource group that contains the Batch account.
// accountName - the name of the Batch account.
func (client AccountClient) GetKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.GetKeys")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -368,6 +401,16 @@ func (client AccountClient) GetKeysResponder(resp *http.Response) (result Accoun
// List gets information about the Batch accounts associated with the subscription.
func (client AccountClient) List(ctx context.Context) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -430,8 +473,8 @@ func (client AccountClient) ListResponder(resp *http.Response) (result AccountLi
}
// listNextResults retrieves the next set of results, if any.
-func (client AccountClient) listNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountClient) listNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.AccountClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -452,6 +495,16 @@ func (client AccountClient) listNextResults(lastResults AccountListResult) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountClient) ListComplete(ctx context.Context) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.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
}
@@ -460,6 +513,16 @@ func (client AccountClient) ListComplete(ctx context.Context) (result AccountLis
// Parameters:
// resourceGroupName - the name of the resource group that contains the Batch account.
func (client AccountClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -523,8 +586,8 @@ func (client AccountClient) ListByResourceGroupResponder(resp *http.Response) (r
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AccountClient) listByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountClient) listByResourceGroupNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.AccountClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -545,6 +608,16 @@ func (client AccountClient) listByResourceGroupNextResults(lastResults AccountLi
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -555,6 +628,16 @@ func (client AccountClient) ListByResourceGroupComplete(ctx context.Context, res
// accountName - the name of the Batch account.
// parameters - the type of key to regenerate.
func (client AccountClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters AccountRegenerateKeyParameters) (result AccountKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.RegenerateKey")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -633,6 +716,16 @@ func (client AccountClient) RegenerateKeyResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group that contains the Batch account.
// accountName - the name of the Batch account.
func (client AccountClient) SynchronizeAutoStorageKeys(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.SynchronizeAutoStorageKeys")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -708,6 +801,16 @@ func (client AccountClient) SynchronizeAutoStorageKeysResponder(resp *http.Respo
// accountName - the name of the Batch account.
// parameters - additional parameters for account update.
func (client AccountClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountClient.Update")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/application.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/application.go
index 170e7bb1195d..f158f2e78015 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/application.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/application.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewApplicationClientWithBaseURI(baseURI string, subscriptionID string) Appl
// applicationID - the ID of the application.
// parameters - the parameters for the request.
func (client ApplicationClient) Create(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters *ApplicationCreateParameters) (result Application, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.Create")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -129,6 +140,16 @@ func (client ApplicationClient) CreateResponder(resp *http.Response) (result App
// accountName - the name of the Batch account.
// applicationID - the ID of the application.
func (client ApplicationClient) Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -205,6 +226,16 @@ func (client ApplicationClient) DeleteResponder(resp *http.Response) (result aut
// accountName - the name of the Batch account.
// applicationID - the ID of the application.
func (client ApplicationClient) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string) (result Application, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.Get")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -282,6 +313,16 @@ func (client ApplicationClient) GetResponder(resp *http.Response) (result Applic
// accountName - the name of the Batch account.
// maxresults - the maximum number of items to return in the response.
func (client ApplicationClient) List(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result ListApplicationsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.List")
+ defer func() {
+ sc := -1
+ if result.lar.Response.Response != nil {
+ sc = result.lar.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -357,8 +398,8 @@ func (client ApplicationClient) ListResponder(resp *http.Response) (result ListA
}
// listNextResults retrieves the next set of results, if any.
-func (client ApplicationClient) listNextResults(lastResults ListApplicationsResult) (result ListApplicationsResult, err error) {
- req, err := lastResults.listApplicationsResultPreparer()
+func (client ApplicationClient) listNextResults(ctx context.Context, lastResults ListApplicationsResult) (result ListApplicationsResult, err error) {
+ req, err := lastResults.listApplicationsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.ApplicationClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -379,6 +420,16 @@ func (client ApplicationClient) listNextResults(lastResults ListApplicationsResu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationClient) ListComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32) (result ListApplicationsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.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, resourceGroupName, accountName, maxresults)
return
}
@@ -390,6 +441,16 @@ func (client ApplicationClient) ListComplete(ctx context.Context, resourceGroupN
// applicationID - the ID of the application.
// parameters - the parameters for the request.
func (client ApplicationClient) Update(ctx context.Context, resourceGroupName string, accountName string, applicationID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/applicationpackage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/applicationpackage.go
index c61bb8addfc4..7b9173777c85 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/applicationpackage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/applicationpackage.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewApplicationPackageClientWithBaseURI(baseURI string, subscriptionID strin
// version - the version of the application to activate.
// parameters - the parameters for the request.
func (client ApplicationPackageClient) Activate(ctx context.Context, resourceGroupName string, accountName string, applicationID string, version string, parameters ActivateApplicationPackageParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationPackageClient.Activate")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -130,6 +141,16 @@ func (client ApplicationPackageClient) ActivateResponder(resp *http.Response) (r
// applicationID - the ID of the application.
// version - the version of the application.
func (client ApplicationPackageClient) Create(ctx context.Context, resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationPackageClient.Create")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -209,6 +230,16 @@ func (client ApplicationPackageClient) CreateResponder(resp *http.Response) (res
// applicationID - the ID of the application.
// version - the version of the application to delete.
func (client ApplicationPackageClient) Delete(ctx context.Context, resourceGroupName string, accountName string, applicationID string, version string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationPackageClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -287,6 +318,16 @@ func (client ApplicationPackageClient) DeleteResponder(resp *http.Response) (res
// applicationID - the ID of the application.
// version - the version of the application.
func (client ApplicationPackageClient) Get(ctx context.Context, resourceGroupName string, accountName string, applicationID string, version string) (result ApplicationPackage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationPackageClient.Get")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
index c9ee6f1a5b37..f9d3c6e27230 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/certificate.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) Cert
// certificateName - the identifier for the certificate. This must be made up of algorithm and thumbprint
// separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.
func (client CertificateClient) CancelDeletion(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.CancelDeletion")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -138,6 +149,16 @@ func (client CertificateClient) CancelDeletionResponder(resp *http.Response) (re
// ifNoneMatch - set to '*' to allow a new certificate to be created, but to prevent updating an existing
// certificate. Other values will be ignored.
func (client CertificateClient) Create(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, ifMatch string, ifNoneMatch string) (result CertificateCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -209,10 +230,6 @@ func (client CertificateClient) CreateSender(req *http.Request) (future Certific
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -237,6 +254,16 @@ func (client CertificateClient) CreateResponder(resp *http.Response) (result Cer
// certificateName - the identifier for the certificate. This must be made up of algorithm and thumbprint
// separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.
func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result CertificateDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -295,10 +322,6 @@ func (client CertificateClient) DeleteSender(req *http.Request) (future Certific
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -322,6 +345,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut
// certificateName - the identifier for the certificate. This must be made up of algorithm and thumbprint
// separated by a dash, and must match the certificate data in the request. For example SHA1-a3d1c5.
func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, accountName string, certificateName string) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Get")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -407,6 +440,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif
// filter - oData filter expression. Valid properties for filtering are "properties/provisioningState",
// "properties/provisioningStateTransitionTime", "name".
func (client CertificateClient) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result ListCertificatesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByBatchAccount")
+ defer func() {
+ sc := -1
+ if result.lcr.Response.Response != nil {
+ sc = result.lcr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -488,8 +531,8 @@ func (client CertificateClient) ListByBatchAccountResponder(resp *http.Response)
}
// listByBatchAccountNextResults retrieves the next set of results, if any.
-func (client CertificateClient) listByBatchAccountNextResults(lastResults ListCertificatesResult) (result ListCertificatesResult, err error) {
- req, err := lastResults.listCertificatesResultPreparer()
+func (client CertificateClient) listByBatchAccountNextResults(ctx context.Context, lastResults ListCertificatesResult) (result ListCertificatesResult, err error) {
+ req, err := lastResults.listCertificatesResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.CertificateClient", "listByBatchAccountNextResults", nil, "Failure preparing next results request")
}
@@ -510,6 +553,16 @@ func (client CertificateClient) listByBatchAccountNextResults(lastResults ListCe
// ListByBatchAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client CertificateClient) ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result ListCertificatesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByBatchAccount")
+ 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.ListByBatchAccount(ctx, resourceGroupName, accountName, maxresults, selectParameter, filter)
return
}
@@ -524,6 +577,16 @@ func (client CertificateClient) ListByBatchAccountComplete(ctx context.Context,
// ifMatch - the entity state (ETag) version of the certificate to update. This value can be omitted or set to
// "*" to apply the operation unconditionally.
func (client CertificateClient) Update(ctx context.Context, resourceGroupName string, accountName string, certificateName string, parameters CertificateCreateOrUpdateParameters, ifMatch string) (result Certificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Update")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/location.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/location.go
index 6e0b0c64411e..9d6a30cf2877 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/location.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/location.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLocationClientWithBaseURI(baseURI string, subscriptionID string) Locatio
// locationName - the desired region for the name check.
// parameters - properties needed to check the availability of a name.
func (client LocationClient) CheckNameAvailability(ctx context.Context, locationName string, parameters CheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationClient.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -119,6 +130,16 @@ func (client LocationClient) CheckNameAvailabilityResponder(resp *http.Response)
// Parameters:
// locationName - the region for which to retrieve Batch service quotas.
func (client LocationClient) GetQuotas(ctx context.Context, locationName string) (result LocationQuota, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationClient.GetQuotas")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetQuotasPreparer(ctx, locationName)
if err != nil {
err = autorest.NewErrorWithError(err, "batch.LocationClient", "GetQuotas", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
index b55c52c590d4..e3349e0a284b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/models.go
@@ -18,14 +18,19 @@ package batch
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch"
+
// AccountKeyType enumerates the values for account key type.
type AccountKeyType string
@@ -458,7 +463,8 @@ func (a *Account) UnmarshalJSON(body []byte) error {
return nil
}
-// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountCreateFuture struct {
azure.Future
}
@@ -563,7 +569,8 @@ type AccountCreateProperties struct {
KeyVaultReference *KeyVaultReference `json:"keyVaultReference,omitempty"`
}
-// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountDeleteFuture struct {
azure.Future
}
@@ -611,14 +618,24 @@ type AccountListResultIterator struct {
page AccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AccountListResultIterator) Next() error {
+func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -627,6 +644,13 @@ func (iter *AccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -646,6 +670,11 @@ func (iter AccountListResultIterator) Value() Account {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AccountListResultIterator type.
+func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
+ return AccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr AccountListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -653,11 +682,11 @@ func (alr AccountListResult) IsEmpty() bool {
// accountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (alr AccountListResult) accountListResultPreparer() (*http.Request, error) {
+func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.NextLink)))
@@ -665,14 +694,24 @@ func (alr AccountListResult) accountListResultPreparer() (*http.Request, error)
// AccountListResultPage contains a page of Account values.
type AccountListResultPage struct {
- fn func(AccountListResult) (AccountListResult, error)
+ fn func(context.Context, AccountListResult) (AccountListResult, error)
alr AccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AccountListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -680,6 +719,13 @@ func (page *AccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AccountListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -698,6 +744,11 @@ func (page AccountListResultPage) Values() []Account {
return *page.alr.Value
}
+// Creates a new instance of the AccountListResultPage type.
+func NewAccountListResultPage(getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
+ return AccountListResultPage{fn: getNextPage}
+}
+
// AccountProperties account specific properties.
type AccountProperties struct {
// AccountEndpoint - The account endpoint used to interact with the Batch service.
@@ -874,7 +925,8 @@ type AutoStorageBaseProperties struct {
StorageAccountID *string `json:"storageAccountId,omitempty"`
}
-// AutoStorageProperties contains information about the auto-storage account associated with a Batch account.
+// AutoStorageProperties contains information about the auto-storage account associated with a Batch
+// account.
type AutoStorageProperties struct {
// LastKeySync - The UTC time at which storage keys were last synchronized with the Batch account.
LastKeySync *date.Time `json:"lastKeySync,omitempty"`
@@ -996,7 +1048,8 @@ type CertificateBaseProperties struct {
Format CertificateFormat `json:"format,omitempty"`
}
-// CertificateCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CertificateCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CertificateCreateFuture struct {
azure.Future
}
@@ -1133,7 +1186,8 @@ type CertificateCreateOrUpdateProperties struct {
Format CertificateFormat `json:"format,omitempty"`
}
-// CertificateDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CertificateDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CertificateDeleteFuture struct {
azure.Future
}
@@ -1239,7 +1293,8 @@ type CloudServiceConfiguration struct {
CurrentOSVersion *string `json:"currentOSVersion,omitempty"`
}
-// DataDisk data Disk settings which will be used by the data disks associated to Compute Nodes in the pool.
+// DataDisk data Disk settings which will be used by the data disks associated to Compute Nodes in the
+// pool.
type DataDisk struct {
// Lun - The lun is used to uniquely identify each data disk. If attaching multiple disks, each should have a distinct lun.
Lun *int32 `json:"lun,omitempty"`
@@ -1357,14 +1412,24 @@ type ListApplicationsResultIterator struct {
page ListApplicationsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListApplicationsResultIterator) Next() error {
+func (iter *ListApplicationsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1373,6 +1438,13 @@ func (iter *ListApplicationsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListApplicationsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListApplicationsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1392,6 +1464,11 @@ func (iter ListApplicationsResultIterator) Value() Application {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListApplicationsResultIterator type.
+func NewListApplicationsResultIterator(page ListApplicationsResultPage) ListApplicationsResultIterator {
+ return ListApplicationsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lar ListApplicationsResult) IsEmpty() bool {
return lar.Value == nil || len(*lar.Value) == 0
@@ -1399,11 +1476,11 @@ func (lar ListApplicationsResult) IsEmpty() bool {
// listApplicationsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lar ListApplicationsResult) listApplicationsResultPreparer() (*http.Request, error) {
+func (lar ListApplicationsResult) listApplicationsResultPreparer(ctx context.Context) (*http.Request, error) {
if lar.NextLink == nil || len(to.String(lar.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lar.NextLink)))
@@ -1411,14 +1488,24 @@ func (lar ListApplicationsResult) listApplicationsResultPreparer() (*http.Reques
// ListApplicationsResultPage contains a page of Application values.
type ListApplicationsResultPage struct {
- fn func(ListApplicationsResult) (ListApplicationsResult, error)
+ fn func(context.Context, ListApplicationsResult) (ListApplicationsResult, error)
lar ListApplicationsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListApplicationsResultPage) Next() error {
- next, err := page.fn(page.lar)
+func (page *ListApplicationsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListApplicationsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lar)
if err != nil {
return err
}
@@ -1426,6 +1513,13 @@ func (page *ListApplicationsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListApplicationsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListApplicationsResultPage) NotDone() bool {
return !page.lar.IsEmpty()
@@ -1444,6 +1538,11 @@ func (page ListApplicationsResultPage) Values() []Application {
return *page.lar.Value
}
+// Creates a new instance of the ListApplicationsResultPage type.
+func NewListApplicationsResultPage(getNextPage func(context.Context, ListApplicationsResult) (ListApplicationsResult, error)) ListApplicationsResultPage {
+ return ListApplicationsResultPage{fn: getNextPage}
+}
+
// ListCertificatesResult values returned by the List operation.
type ListCertificatesResult struct {
autorest.Response `json:"-"`
@@ -1459,14 +1558,24 @@ type ListCertificatesResultIterator struct {
page ListCertificatesResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListCertificatesResultIterator) Next() error {
+func (iter *ListCertificatesResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListCertificatesResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1475,6 +1584,13 @@ func (iter *ListCertificatesResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListCertificatesResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListCertificatesResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1494,6 +1610,11 @@ func (iter ListCertificatesResultIterator) Value() Certificate {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListCertificatesResultIterator type.
+func NewListCertificatesResultIterator(page ListCertificatesResultPage) ListCertificatesResultIterator {
+ return ListCertificatesResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lcr ListCertificatesResult) IsEmpty() bool {
return lcr.Value == nil || len(*lcr.Value) == 0
@@ -1501,11 +1622,11 @@ func (lcr ListCertificatesResult) IsEmpty() bool {
// listCertificatesResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lcr ListCertificatesResult) listCertificatesResultPreparer() (*http.Request, error) {
+func (lcr ListCertificatesResult) listCertificatesResultPreparer(ctx context.Context) (*http.Request, error) {
if lcr.NextLink == nil || len(to.String(lcr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lcr.NextLink)))
@@ -1513,14 +1634,24 @@ func (lcr ListCertificatesResult) listCertificatesResultPreparer() (*http.Reques
// ListCertificatesResultPage contains a page of Certificate values.
type ListCertificatesResultPage struct {
- fn func(ListCertificatesResult) (ListCertificatesResult, error)
+ fn func(context.Context, ListCertificatesResult) (ListCertificatesResult, error)
lcr ListCertificatesResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListCertificatesResultPage) Next() error {
- next, err := page.fn(page.lcr)
+func (page *ListCertificatesResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListCertificatesResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lcr)
if err != nil {
return err
}
@@ -1528,6 +1659,13 @@ func (page *ListCertificatesResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListCertificatesResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListCertificatesResultPage) NotDone() bool {
return !page.lcr.IsEmpty()
@@ -1546,6 +1684,11 @@ func (page ListCertificatesResultPage) Values() []Certificate {
return *page.lcr.Value
}
+// Creates a new instance of the ListCertificatesResultPage type.
+func NewListCertificatesResultPage(getNextPage func(context.Context, ListCertificatesResult) (ListCertificatesResult, error)) ListCertificatesResultPage {
+ return ListCertificatesResultPage{fn: getNextPage}
+}
+
// ListPoolsResult values returned by the List operation.
type ListPoolsResult struct {
autorest.Response `json:"-"`
@@ -1561,14 +1704,24 @@ type ListPoolsResultIterator struct {
page ListPoolsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListPoolsResultIterator) Next() error {
+func (iter *ListPoolsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListPoolsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1577,6 +1730,13 @@ func (iter *ListPoolsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListPoolsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListPoolsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1596,6 +1756,11 @@ func (iter ListPoolsResultIterator) Value() Pool {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListPoolsResultIterator type.
+func NewListPoolsResultIterator(page ListPoolsResultPage) ListPoolsResultIterator {
+ return ListPoolsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lpr ListPoolsResult) IsEmpty() bool {
return lpr.Value == nil || len(*lpr.Value) == 0
@@ -1603,11 +1768,11 @@ func (lpr ListPoolsResult) IsEmpty() bool {
// listPoolsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lpr ListPoolsResult) listPoolsResultPreparer() (*http.Request, error) {
+func (lpr ListPoolsResult) listPoolsResultPreparer(ctx context.Context) (*http.Request, error) {
if lpr.NextLink == nil || len(to.String(lpr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lpr.NextLink)))
@@ -1615,14 +1780,24 @@ func (lpr ListPoolsResult) listPoolsResultPreparer() (*http.Request, error) {
// ListPoolsResultPage contains a page of Pool values.
type ListPoolsResultPage struct {
- fn func(ListPoolsResult) (ListPoolsResult, error)
+ fn func(context.Context, ListPoolsResult) (ListPoolsResult, error)
lpr ListPoolsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListPoolsResultPage) Next() error {
- next, err := page.fn(page.lpr)
+func (page *ListPoolsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListPoolsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lpr)
if err != nil {
return err
}
@@ -1630,6 +1805,13 @@ func (page *ListPoolsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListPoolsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListPoolsResultPage) NotDone() bool {
return !page.lpr.IsEmpty()
@@ -1648,6 +1830,11 @@ func (page ListPoolsResultPage) Values() []Pool {
return *page.lpr.Value
}
+// Creates a new instance of the ListPoolsResultPage type.
+func NewListPoolsResultPage(getNextPage func(context.Context, ListPoolsResult) (ListPoolsResult, error)) ListPoolsResultPage {
+ return ListPoolsResultPage{fn: getNextPage}
+}
+
// LocationQuota quotas associated with a Batch region for a particular subscription.
type LocationQuota struct {
autorest.Response `json:"-"`
@@ -1655,8 +1842,8 @@ type LocationQuota struct {
AccountQuota *int32 `json:"accountQuota,omitempty"`
}
-// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of user
-// code.
+// MetadataItem the Batch service does not assign any meaning to this metadata; it is solely for the use of
+// user code.
type MetadataItem struct {
Name *string `json:"name,omitempty"`
Value *string `json:"value,omitempty"`
@@ -1711,14 +1898,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1727,6 +1924,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1746,6 +1950,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1753,11 +1962,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1765,14 +1974,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1780,6 +1999,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1798,6 +2024,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OSDisk ...
type OSDisk struct {
// Caching - Default value is none. Possible values include: 'None', 'ReadOnly', 'ReadWrite'
@@ -2023,8 +2254,8 @@ type ResizeError struct {
Details *[]ResizeError `json:"details,omitempty"`
}
-// ResizeOperationStatus describes either the current operation (if the pool AllocationState is Resizing) or the
-// previously completed operation (if the AllocationState is Steady).
+// ResizeOperationStatus describes either the current operation (if the pool AllocationState is Resizing)
+// or the previously completed operation (if the AllocationState is Steady).
type ResizeOperationStatus struct {
TargetDedicatedNodes *int32 `json:"targetDedicatedNodes,omitempty"`
TargetLowPriorityNodes *int32 `json:"targetLowPriorityNodes,omitempty"`
@@ -2082,8 +2313,9 @@ type ResourceFile struct {
}
// ScaleSettings defines the desired size of the pool. This can either be 'fixedScale' where the requested
-// targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically reevaluated. If
-// this property is not specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
+// targetDedicatedNodes is specified, or 'autoScale' which defines a formula which is periodically
+// reevaluated. If this property is not specified, the pool will have a fixed scale with 0
+// targetDedicatedNodes.
type ScaleSettings struct {
// FixedScale - This property and autoScale are mutually exclusive and one of the properties must be specified.
FixedScale *FixedScaleSettings `json:"fixedScale,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/operations.go
index 83fa8268e4cd..d92776c57e24 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists available operations for the Microsoft.Batch provider
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
index 472fc28eb934..92e0ebc94da7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/batch/mgmt/2017-09-01/batch/pool.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewPoolClientWithBaseURI(baseURI string, subscriptionID string) PoolClient
// ifNoneMatch - set to '*' to allow a new pool to be created, but to prevent updating an existing pool. Other
// values will be ignored.
func (client PoolClient) Create(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters Pool, ifMatch string, ifNoneMatch string) (result PoolCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -145,10 +156,6 @@ func (client PoolClient) CreateSender(req *http.Request) (future PoolCreateFutur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -172,6 +179,16 @@ func (client PoolClient) CreateResponder(resp *http.Response) (result Pool, err
// accountName - the name of the Batch account.
// poolName - the pool name. This must be unique within the account.
func (client PoolClient) Delete(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result PoolDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -230,10 +247,6 @@ func (client PoolClient) DeleteSender(req *http.Request) (future PoolDeleteFutur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -256,6 +269,16 @@ func (client PoolClient) DeleteResponder(resp *http.Response) (result autorest.R
// accountName - the name of the Batch account.
// poolName - the pool name. This must be unique within the account.
func (client PoolClient) DisableAutoScale(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result Pool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.DisableAutoScale")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -337,6 +360,16 @@ func (client PoolClient) DisableAutoScaleResponder(resp *http.Response) (result
// accountName - the name of the Batch account.
// poolName - the pool name. This must be unique within the account.
func (client PoolClient) Get(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result Pool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.Get")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -433,6 +466,16 @@ func (client PoolClient) GetResponder(resp *http.Response) (result Pool, err err
// properties/scaleSettings/autoScale
// properties/scaleSettings/fixedScale
func (client PoolClient) ListByBatchAccount(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result ListPoolsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.ListByBatchAccount")
+ defer func() {
+ sc := -1
+ if result.lpr.Response.Response != nil {
+ sc = result.lpr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -514,8 +557,8 @@ func (client PoolClient) ListByBatchAccountResponder(resp *http.Response) (resul
}
// listByBatchAccountNextResults retrieves the next set of results, if any.
-func (client PoolClient) listByBatchAccountNextResults(lastResults ListPoolsResult) (result ListPoolsResult, err error) {
- req, err := lastResults.listPoolsResultPreparer()
+func (client PoolClient) listByBatchAccountNextResults(ctx context.Context, lastResults ListPoolsResult) (result ListPoolsResult, err error) {
+ req, err := lastResults.listPoolsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "batch.PoolClient", "listByBatchAccountNextResults", nil, "Failure preparing next results request")
}
@@ -536,6 +579,16 @@ func (client PoolClient) listByBatchAccountNextResults(lastResults ListPoolsResu
// ListByBatchAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client PoolClient) ListByBatchAccountComplete(ctx context.Context, resourceGroupName string, accountName string, maxresults *int32, selectParameter string, filter string) (result ListPoolsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.ListByBatchAccount")
+ 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.ListByBatchAccount(ctx, resourceGroupName, accountName, maxresults, selectParameter, filter)
return
}
@@ -550,6 +603,16 @@ func (client PoolClient) ListByBatchAccountComplete(ctx context.Context, resourc
// accountName - the name of the Batch account.
// poolName - the pool name. This must be unique within the account.
func (client PoolClient) StopResize(ctx context.Context, resourceGroupName string, accountName string, poolName string) (result Pool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.StopResize")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
@@ -635,6 +698,16 @@ func (client PoolClient) StopResizeResponder(resp *http.Response) (result Pool,
// ifMatch - the entity state (ETag) version of the pool to update. This value can be omitted or set to "*" to
// apply the operation unconditionally.
func (client PoolClient) Update(ctx context.Context, resourceGroupName string, accountName string, poolName string, parameters Pool, ifMatch string) (result Pool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoolClient.Update")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 24, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/client.go
index 4d3ba0d8914f..180732c6f4db 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/client.go
@@ -26,6 +26,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -60,6 +61,16 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
// Parameters:
// checkNameAvailabilityInput - input to check.
func (client BaseClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability")
+ 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: checkNameAvailabilityInput,
Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -130,6 +141,16 @@ func (client BaseClient) CheckNameAvailabilityResponder(resp *http.Response) (re
// Parameters:
// checkNameAvailabilityInput - input to check.
func (client BaseClient) CheckNameAvailabilityWithSubscription(ctx context.Context, checkNameAvailabilityInput CheckNameAvailabilityInput) (result CheckNameAvailabilityOutput, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailabilityWithSubscription")
+ 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: checkNameAvailabilityInput,
Constraints: []validation.Constraint{{Target: "checkNameAvailabilityInput.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -205,6 +226,16 @@ func (client BaseClient) CheckNameAvailabilityWithSubscriptionResponder(resp *ht
// Parameters:
// validateProbeInput - input to check.
func (client BaseClient) ValidateProbe(ctx context.Context, validateProbeInput ValidateProbeInput) (result ValidateProbeOutput, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ValidateProbe")
+ 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: validateProbeInput,
Constraints: []validation.Constraint{{Target: "validateProbeInput.ProbeURL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
index 54ca91f3ec7c..ae9107a9ea9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/customdomains.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewCustomDomainsClientWithBaseURI(baseURI string, subscriptionID string) Cu
// customDomainName - name of the custom domain within an endpoint.
// customDomainProperties - properties required to create a new custom domain.
func (client CustomDomainsClient) Create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string, customDomainProperties CustomDomainParameters) (result CustomDomainsCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.Create")
+ 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},
@@ -109,10 +120,6 @@ func (client CustomDomainsClient) CreateSender(req *http.Request) (future Custom
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -137,6 +144,16 @@ func (client CustomDomainsClient) CreateResponder(resp *http.Response) (result C
// endpointName - name of the endpoint under the profile which is unique globally.
// customDomainName - name of the custom domain within an endpoint.
func (client CustomDomainsClient) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomainsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.Delete")
+ 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},
@@ -192,10 +209,6 @@ func (client CustomDomainsClient) DeleteSender(req *http.Request) (future Custom
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -220,6 +233,16 @@ func (client CustomDomainsClient) DeleteResponder(resp *http.Response) (result C
// endpointName - name of the endpoint under the profile which is unique globally.
// customDomainName - name of the custom domain within an endpoint.
func (client CustomDomainsClient) DisableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.DisableCustomHTTPS")
+ 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},
@@ -299,6 +322,16 @@ func (client CustomDomainsClient) DisableCustomHTTPSResponder(resp *http.Respons
// endpointName - name of the endpoint under the profile which is unique globally.
// customDomainName - name of the custom domain within an endpoint.
func (client CustomDomainsClient) EnableCustomHTTPS(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.EnableCustomHTTPS")
+ 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},
@@ -371,13 +404,23 @@ func (client CustomDomainsClient) EnableCustomHTTPSResponder(resp *http.Response
return
}
-// Get gets an exisitng custom domain within an endpoint.
+// Get gets an existing custom domain within an endpoint.
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
// customDomainName - name of the custom domain within an endpoint.
func (client CustomDomainsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainName string) (result CustomDomain, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.Get")
+ 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},
@@ -456,6 +499,16 @@ func (client CustomDomainsClient) GetResponder(resp *http.Response) (result Cust
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client CustomDomainsClient) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result CustomDomainListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.ListByEndpoint")
+ defer func() {
+ sc := -1
+ if result.cdlr.Response.Response != nil {
+ sc = result.cdlr.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},
@@ -529,8 +582,8 @@ func (client CustomDomainsClient) ListByEndpointResponder(resp *http.Response) (
}
// listByEndpointNextResults retrieves the next set of results, if any.
-func (client CustomDomainsClient) listByEndpointNextResults(lastResults CustomDomainListResult) (result CustomDomainListResult, err error) {
- req, err := lastResults.customDomainListResultPreparer()
+func (client CustomDomainsClient) listByEndpointNextResults(ctx context.Context, lastResults CustomDomainListResult) (result CustomDomainListResult, err error) {
+ req, err := lastResults.customDomainListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.CustomDomainsClient", "listByEndpointNextResults", nil, "Failure preparing next results request")
}
@@ -551,6 +604,16 @@ func (client CustomDomainsClient) listByEndpointNextResults(lastResults CustomDo
// ListByEndpointComplete enumerates all values, automatically crossing page boundaries as required.
func (client CustomDomainsClient) ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result CustomDomainListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainsClient.ListByEndpoint")
+ 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.ListByEndpoint(ctx, resourceGroupName, profileName, endpointName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go
index 901a79b6d21a..a1353fade711 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/edgenodes.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewEdgeNodesClientWithBaseURI(baseURI string, subscriptionID string) EdgeNo
// List edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users.
func (client EdgeNodesClient) List(ctx context.Context) (result EdgenodeResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EdgeNodesClient.List")
+ defer func() {
+ sc := -1
+ if result.er.Response.Response != nil {
+ sc = result.er.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -100,8 +111,8 @@ func (client EdgeNodesClient) ListResponder(resp *http.Response) (result Edgenod
}
// listNextResults retrieves the next set of results, if any.
-func (client EdgeNodesClient) listNextResults(lastResults EdgenodeResult) (result EdgenodeResult, err error) {
- req, err := lastResults.edgenodeResultPreparer()
+func (client EdgeNodesClient) listNextResults(ctx context.Context, lastResults EdgenodeResult) (result EdgenodeResult, err error) {
+ req, err := lastResults.edgenodeResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.EdgeNodesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -122,6 +133,16 @@ func (client EdgeNodesClient) listNextResults(lastResults EdgenodeResult) (resul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client EdgeNodesClient) ListComplete(ctx context.Context) (result EdgenodeResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EdgeNodesClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
index 7e1586e57be5..70fc400153a2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/endpoints.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewEndpointsClientWithBaseURI(baseURI string, subscriptionID string) Endpoi
// endpointName - name of the endpoint under the profile which is unique globally.
// endpoint - endpoint properties
func (client EndpointsClient) Create(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpoint Endpoint) (result EndpointsCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Create")
+ 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},
@@ -108,10 +119,6 @@ func (client EndpointsClient) CreateSender(req *http.Request) (future EndpointsC
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -136,6 +143,16 @@ func (client EndpointsClient) CreateResponder(resp *http.Response) (result Endpo
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client EndpointsClient) Delete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result EndpointsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Delete")
+ 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},
@@ -190,10 +207,6 @@ func (client EndpointsClient) DeleteSender(req *http.Request) (future EndpointsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -217,6 +230,16 @@ func (client EndpointsClient) DeleteResponder(resp *http.Response) (result autor
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client EndpointsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result Endpoint, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Get")
+ 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},
@@ -293,6 +316,16 @@ func (client EndpointsClient) GetResponder(resp *http.Response) (result Endpoint
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client EndpointsClient) ListByProfile(ctx context.Context, resourceGroupName string, profileName string) (result EndpointListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.ListByProfile")
+ defer func() {
+ sc := -1
+ if result.elr.Response.Response != nil {
+ sc = result.elr.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},
@@ -365,8 +398,8 @@ func (client EndpointsClient) ListByProfileResponder(resp *http.Response) (resul
}
// listByProfileNextResults retrieves the next set of results, if any.
-func (client EndpointsClient) listByProfileNextResults(lastResults EndpointListResult) (result EndpointListResult, err error) {
- req, err := lastResults.endpointListResultPreparer()
+func (client EndpointsClient) listByProfileNextResults(ctx context.Context, lastResults EndpointListResult) (result EndpointListResult, err error) {
+ req, err := lastResults.endpointListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "listByProfileNextResults", nil, "Failure preparing next results request")
}
@@ -387,6 +420,16 @@ func (client EndpointsClient) listByProfileNextResults(lastResults EndpointListR
// ListByProfileComplete enumerates all values, automatically crossing page boundaries as required.
func (client EndpointsClient) ListByProfileComplete(ctx context.Context, resourceGroupName string, profileName string) (result EndpointListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.ListByProfile")
+ 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.ListByProfile(ctx, resourceGroupName, profileName)
return
}
@@ -397,6 +440,16 @@ func (client EndpointsClient) ListByProfileComplete(ctx context.Context, resourc
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client EndpointsClient) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result ResourceUsageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.ListResourceUsage")
+ defer func() {
+ sc := -1
+ if result.rulr.Response.Response != nil {
+ sc = result.rulr.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},
@@ -470,8 +523,8 @@ func (client EndpointsClient) ListResourceUsageResponder(resp *http.Response) (r
}
// listResourceUsageNextResults retrieves the next set of results, if any.
-func (client EndpointsClient) listResourceUsageNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
- req, err := lastResults.resourceUsageListResultPreparer()
+func (client EndpointsClient) listResourceUsageNextResults(ctx context.Context, lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
+ req, err := lastResults.resourceUsageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.EndpointsClient", "listResourceUsageNextResults", nil, "Failure preparing next results request")
}
@@ -492,6 +545,16 @@ func (client EndpointsClient) listResourceUsageNextResults(lastResults ResourceU
// ListResourceUsageComplete enumerates all values, automatically crossing page boundaries as required.
func (client EndpointsClient) ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result ResourceUsageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.ListResourceUsage")
+ 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.ListResourceUsage(ctx, resourceGroupName, profileName, endpointName)
return
}
@@ -502,8 +565,18 @@ func (client EndpointsClient) ListResourceUsageComplete(ctx context.Context, res
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
// contentFilePaths - the path to the content to be loaded. Path should be a full URL, e.g.
-// ‘/pictires/city.png' which loads a single file
+// ‘/pictures/city.png' which loads a single file
func (client EndpointsClient) LoadContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths LoadParameters) (result EndpointsLoadContentFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.LoadContent")
+ 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},
@@ -562,10 +635,6 @@ func (client EndpointsClient) LoadContentSender(req *http.Request) (future Endpo
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -591,6 +660,16 @@ func (client EndpointsClient) LoadContentResponder(resp *http.Response) (result
// which removes a single file, or a directory with a wildcard, e.g. '/pictures/*' which removes all folders
// and files in the directory.
func (client EndpointsClient) PurgeContent(ctx context.Context, resourceGroupName string, profileName string, endpointName string, contentFilePaths PurgeParameters) (result EndpointsPurgeContentFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.PurgeContent")
+ 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},
@@ -649,10 +728,6 @@ func (client EndpointsClient) PurgeContentSender(req *http.Request) (future Endp
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -675,6 +750,16 @@ func (client EndpointsClient) PurgeContentResponder(resp *http.Response) (result
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client EndpointsClient) Start(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result EndpointsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Start")
+ 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},
@@ -729,10 +814,6 @@ func (client EndpointsClient) StartSender(req *http.Request) (future EndpointsSt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -756,6 +837,16 @@ func (client EndpointsClient) StartResponder(resp *http.Response) (result Endpoi
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client EndpointsClient) Stop(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result EndpointsStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Stop")
+ 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},
@@ -810,10 +901,6 @@ func (client EndpointsClient) StopSender(req *http.Request) (future EndpointsSto
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -840,6 +927,16 @@ func (client EndpointsClient) StopResponder(resp *http.Response) (result Endpoin
// endpointName - name of the endpoint under the profile which is unique globally.
// endpointUpdateProperties - endpoint update properties
func (client EndpointsClient) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, endpointUpdateProperties EndpointUpdateParameters) (result EndpointsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.Update")
+ 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},
@@ -896,10 +993,6 @@ func (client EndpointsClient) UpdateSender(req *http.Request) (future EndpointsU
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -924,6 +1017,16 @@ func (client EndpointsClient) UpdateResponder(resp *http.Response) (result Endpo
// endpointName - name of the endpoint under the profile which is unique globally.
// customDomainProperties - custom domain to be validated.
func (client EndpointsClient) ValidateCustomDomain(ctx context.Context, resourceGroupName string, profileName string, endpointName string, customDomainProperties ValidateCustomDomainInput) (result ValidateCustomDomainOutput, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointsClient.ValidateCustomDomain")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
index ae5e88514e94..81bbd57ab47c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/models.go
@@ -18,13 +18,18 @@ package cdn
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn"
+
// CacheBehavior enumerates the values for cache behavior.
type CacheBehavior string
@@ -315,7 +320,7 @@ type CacheExpirationActionParameters struct {
CacheBehavior CacheBehavior `json:"cacheBehavior,omitempty"`
// CacheType - The level at which the content needs to be cached.
CacheType *string `json:"cacheType,omitempty"`
- // CacheDuration - The duration for which the the content needs to be cached. Allowed format is [d.]hh:mm:ss
+ // CacheDuration - The duration for which the content needs to be cached. Allowed format is [d.]hh:mm:ss
CacheDuration *string `json:"cacheDuration,omitempty"`
}
@@ -340,14 +345,14 @@ type CheckNameAvailabilityOutput struct {
// CidrIPAddress CIDR Ip address
type CidrIPAddress struct {
- // BaseIPAddress - Ip adress itself.
+ // BaseIPAddress - Ip address itself.
BaseIPAddress *string `json:"baseIpAddress,omitempty"`
// PrefixLength - The length of the prefix of the ip address.
PrefixLength *int32 `json:"prefixLength,omitempty"`
}
-// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for branding
-// purposes, e.g. www.consoto.com.
+// CustomDomain friendly domain name mapping to the endpoint hostname that the customer provides for
+// branding purposes, e.g. www.contoso.com.
type CustomDomain struct {
autorest.Response `json:"-"`
*CustomDomainProperties `json:"properties,omitempty"`
@@ -428,8 +433,8 @@ func (cd *CustomDomain) UnmarshalJSON(body []byte) error {
return nil
}
-// CustomDomainListResult result of the request to list custom domains. It contains a list of custom domain objects
-// and a URL link to get the next set of results.
+// CustomDomainListResult result of the request to list custom domains. It contains a list of custom domain
+// objects and a URL link to get the next set of results.
type CustomDomainListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN CustomDomains within an endpoint.
@@ -444,14 +449,24 @@ type CustomDomainListResultIterator struct {
page CustomDomainListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CustomDomainListResultIterator) Next() error {
+func (iter *CustomDomainListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -460,6 +475,13 @@ func (iter *CustomDomainListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CustomDomainListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CustomDomainListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -479,6 +501,11 @@ func (iter CustomDomainListResultIterator) Value() CustomDomain {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CustomDomainListResultIterator type.
+func NewCustomDomainListResultIterator(page CustomDomainListResultPage) CustomDomainListResultIterator {
+ return CustomDomainListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cdlr CustomDomainListResult) IsEmpty() bool {
return cdlr.Value == nil || len(*cdlr.Value) == 0
@@ -486,11 +513,11 @@ func (cdlr CustomDomainListResult) IsEmpty() bool {
// customDomainListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cdlr CustomDomainListResult) customDomainListResultPreparer() (*http.Request, error) {
+func (cdlr CustomDomainListResult) customDomainListResultPreparer(ctx context.Context) (*http.Request, error) {
if cdlr.NextLink == nil || len(to.String(cdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cdlr.NextLink)))
@@ -498,14 +525,24 @@ func (cdlr CustomDomainListResult) customDomainListResultPreparer() (*http.Reque
// CustomDomainListResultPage contains a page of CustomDomain values.
type CustomDomainListResultPage struct {
- fn func(CustomDomainListResult) (CustomDomainListResult, error)
+ fn func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)
cdlr CustomDomainListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CustomDomainListResultPage) Next() error {
- next, err := page.fn(page.cdlr)
+func (page *CustomDomainListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomDomainListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cdlr)
if err != nil {
return err
}
@@ -513,6 +550,13 @@ func (page *CustomDomainListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CustomDomainListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CustomDomainListResultPage) NotDone() bool {
return !page.cdlr.IsEmpty()
@@ -531,6 +575,11 @@ func (page CustomDomainListResultPage) Values() []CustomDomain {
return *page.cdlr.Value
}
+// Creates a new instance of the CustomDomainListResultPage type.
+func NewCustomDomainListResultPage(getNextPage func(context.Context, CustomDomainListResult) (CustomDomainListResult, error)) CustomDomainListResultPage {
+ return CustomDomainListResultPage{fn: getNextPage}
+}
+
// CustomDomainParameters the customDomain JSON object required for custom domain creation or update.
type CustomDomainParameters struct {
*CustomDomainPropertiesParameters `json:"properties,omitempty"`
@@ -585,13 +634,15 @@ type CustomDomainProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to create.
+// CustomDomainPropertiesParameters the JSON object that contains the properties of the custom domain to
+// create.
type CustomDomainPropertiesParameters struct {
// HostName - The host name of the custom domain. Must be a domain name.
HostName *string `json:"hostName,omitempty"`
}
-// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CustomDomainsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CustomDomainsCreateFuture struct {
azure.Future
}
@@ -619,7 +670,8 @@ func (future *CustomDomainsCreateFuture) Result(client CustomDomainsClient) (cd
return
}
-// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CustomDomainsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CustomDomainsDeleteFuture struct {
azure.Future
}
@@ -1121,8 +1173,8 @@ type EdgeNodeProperties struct {
IPAddressGroups *[]IPAddressGroup `json:"ipAddressGroups,omitempty"`
}
-// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a URL
-// link to get the next set of results.
+// EdgenodeResult result of the request to list CDN edgenodes. It contains a list of ip address group and a
+// URL link to get the next set of results.
type EdgenodeResult struct {
autorest.Response `json:"-"`
// Value - Edge node of CDN service.
@@ -1137,14 +1189,24 @@ type EdgenodeResultIterator struct {
page EdgenodeResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EdgenodeResultIterator) Next() error {
+func (iter *EdgenodeResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1153,6 +1215,13 @@ func (iter *EdgenodeResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EdgenodeResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EdgenodeResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1172,6 +1241,11 @@ func (iter EdgenodeResultIterator) Value() EdgeNode {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EdgenodeResultIterator type.
+func NewEdgenodeResultIterator(page EdgenodeResultPage) EdgenodeResultIterator {
+ return EdgenodeResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (er EdgenodeResult) IsEmpty() bool {
return er.Value == nil || len(*er.Value) == 0
@@ -1179,11 +1253,11 @@ func (er EdgenodeResult) IsEmpty() bool {
// edgenodeResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (er EdgenodeResult) edgenodeResultPreparer() (*http.Request, error) {
+func (er EdgenodeResult) edgenodeResultPreparer(ctx context.Context) (*http.Request, error) {
if er.NextLink == nil || len(to.String(er.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(er.NextLink)))
@@ -1191,14 +1265,24 @@ func (er EdgenodeResult) edgenodeResultPreparer() (*http.Request, error) {
// EdgenodeResultPage contains a page of EdgeNode values.
type EdgenodeResultPage struct {
- fn func(EdgenodeResult) (EdgenodeResult, error)
+ fn func(context.Context, EdgenodeResult) (EdgenodeResult, error)
er EdgenodeResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EdgenodeResultPage) Next() error {
- next, err := page.fn(page.er)
+func (page *EdgenodeResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EdgenodeResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.er)
if err != nil {
return err
}
@@ -1206,6 +1290,13 @@ func (page *EdgenodeResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EdgenodeResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EdgenodeResultPage) NotDone() bool {
return !page.er.IsEmpty()
@@ -1224,8 +1315,13 @@ func (page EdgenodeResultPage) Values() []EdgeNode {
return *page.er.Value
}
-// Endpoint CDN endpoint is the entity within a CDN profile containing configuration information such as origin,
-// protocol, content caching and delivery behavior. The CDN endpoint uses the URL format
+// Creates a new instance of the EdgenodeResultPage type.
+func NewEdgenodeResultPage(getNextPage func(context.Context, EdgenodeResult) (EdgenodeResult, error)) EdgenodeResultPage {
+ return EdgenodeResultPage{fn: getNextPage}
+}
+
+// Endpoint CDN endpoint is the entity within a CDN profile containing configuration information such as
+// origin, protocol, content caching and delivery behavior. The CDN endpoint uses the URL format
// .azureedge.net.
type Endpoint struct {
autorest.Response `json:"-"`
@@ -1335,8 +1431,8 @@ func (e *Endpoint) UnmarshalJSON(body []byte) error {
return nil
}
-// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a URL
-// link to get the the next set of results.
+// EndpointListResult result of the request to list endpoints. It contains a list of endpoint objects and a
+// URL link to get the next set of results.
type EndpointListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN endpoints within a profile
@@ -1351,14 +1447,24 @@ type EndpointListResultIterator struct {
page EndpointListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EndpointListResultIterator) Next() error {
+func (iter *EndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1367,6 +1473,13 @@ func (iter *EndpointListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EndpointListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EndpointListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1386,6 +1499,11 @@ func (iter EndpointListResultIterator) Value() Endpoint {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EndpointListResultIterator type.
+func NewEndpointListResultIterator(page EndpointListResultPage) EndpointListResultIterator {
+ return EndpointListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (elr EndpointListResult) IsEmpty() bool {
return elr.Value == nil || len(*elr.Value) == 0
@@ -1393,11 +1511,11 @@ func (elr EndpointListResult) IsEmpty() bool {
// endpointListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (elr EndpointListResult) endpointListResultPreparer() (*http.Request, error) {
+func (elr EndpointListResult) endpointListResultPreparer(ctx context.Context) (*http.Request, error) {
if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(elr.NextLink)))
@@ -1405,14 +1523,24 @@ func (elr EndpointListResult) endpointListResultPreparer() (*http.Request, error
// EndpointListResultPage contains a page of Endpoint values.
type EndpointListResultPage struct {
- fn func(EndpointListResult) (EndpointListResult, error)
+ fn func(context.Context, EndpointListResult) (EndpointListResult, error)
elr EndpointListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EndpointListResultPage) Next() error {
- next, err := page.fn(page.elr)
+func (page *EndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.elr)
if err != nil {
return err
}
@@ -1420,6 +1548,13 @@ func (page *EndpointListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EndpointListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EndpointListResultPage) NotDone() bool {
return !page.elr.IsEmpty()
@@ -1438,9 +1573,14 @@ func (page EndpointListResultPage) Values() []Endpoint {
return *page.elr.Value
}
+// Creates a new instance of the EndpointListResultPage type.
+func NewEndpointListResultPage(getNextPage func(context.Context, EndpointListResult) (EndpointListResult, error)) EndpointListResultPage {
+ return EndpointListResultPage{fn: getNextPage}
+}
+
// EndpointProperties the JSON object that contains the properties required to create an endpoint.
type EndpointProperties struct {
- // HostName - The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. consoto.azureedge.net
+ // HostName - The host name of the endpoint structured as {endpointName}.{DNSZone}, e.g. contoso.azureedge.net
HostName *string `json:"hostName,omitempty"`
// Origins - The source of the content being delivered via CDN.
Origins *[]DeepCreatedOrigin `json:"origins,omitempty"`
@@ -1450,7 +1590,7 @@ type EndpointProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
// OriginHostHeader - The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
OriginHostHeader *string `json:"originHostHeader,omitempty"`
- // OriginPath - A directory path on the origin that CDN can use to retreive content from, e.g. contoso.cloudapp.net/originpath.
+ // OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
OriginPath *string `json:"originPath,omitempty"`
// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
@@ -1466,7 +1606,7 @@ type EndpointProperties struct {
OptimizationType OptimizationType `json:"optimizationType,omitempty"`
// ProbePath - Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path.
ProbePath *string `json:"probePath,omitempty"`
- // GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/
+ // GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/
GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
@@ -1476,7 +1616,7 @@ type EndpointProperties struct {
type EndpointPropertiesUpdateParameters struct {
// OriginHostHeader - The host header value sent to the origin with each request. If you leave this blank, the request hostname determines this value. Azure CDN origins, such as Web Apps, Blob Storage, and Cloud Services require this host header value to match the origin hostname by default.
OriginHostHeader *string `json:"originHostHeader,omitempty"`
- // OriginPath - A directory path on the origin that CDN can use to retreive content from, e.g. contoso.cloudapp.net/originpath.
+ // OriginPath - A directory path on the origin that CDN can use to retrieve content from, e.g. contoso.cloudapp.net/originpath.
OriginPath *string `json:"originPath,omitempty"`
// ContentTypesToCompress - List of content types on which compression applies. The value should be a valid MIME type.
ContentTypesToCompress *[]string `json:"contentTypesToCompress,omitempty"`
@@ -1492,14 +1632,14 @@ type EndpointPropertiesUpdateParameters struct {
OptimizationType OptimizationType `json:"optimizationType,omitempty"`
// ProbePath - Path to a file hosted on the origin which helps accelerate delivery of the dynamic content and calculate the most optimal routes for the CDN. This is relative to the origin path.
ProbePath *string `json:"probePath,omitempty"`
- // GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an acess rule to a specified path or content, e.g. block APAC for path /pictures/
+ // GeoFilters - List of rules defining the user's geo access within a CDN endpoint. Each geo filter defines an access rule to a specified path or content, e.g. block APAC for path /pictures/
GeoFilters *[]GeoFilter `json:"geoFilters,omitempty"`
// DeliveryPolicy - A policy that specifies the delivery rules to be used for an endpoint.
DeliveryPolicy *EndpointPropertiesUpdateParametersDeliveryPolicy `json:"deliveryPolicy,omitempty"`
}
-// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used for an
-// endpoint.
+// EndpointPropertiesUpdateParametersDeliveryPolicy a policy that specifies the delivery rules to be used
+// for an endpoint.
type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
// Description - User-friendly description of the policy.
Description *string `json:"description,omitempty"`
@@ -1507,7 +1647,8 @@ type EndpointPropertiesUpdateParametersDeliveryPolicy struct {
Rules *[]DeliveryRule `json:"rules,omitempty"`
}
-// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsCreateFuture struct {
azure.Future
}
@@ -1535,7 +1676,8 @@ func (future *EndpointsCreateFuture) Result(client EndpointsClient) (e Endpoint,
return
}
-// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsDeleteFuture struct {
azure.Future
}
@@ -1557,7 +1699,8 @@ func (future *EndpointsDeleteFuture) Result(client EndpointsClient) (ar autorest
return
}
-// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsLoadContentFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsLoadContentFuture struct {
azure.Future
}
@@ -1602,7 +1745,8 @@ func (future *EndpointsPurgeContentFuture) Result(client EndpointsClient) (ar au
return
}
-// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsStartFuture struct {
azure.Future
}
@@ -1630,7 +1774,8 @@ func (future *EndpointsStartFuture) Result(client EndpointsClient) (e Endpoint,
return
}
-// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsStopFuture struct {
azure.Future
}
@@ -1658,7 +1803,8 @@ func (future *EndpointsStopFuture) Result(client EndpointsClient) (e Endpoint, e
return
}
-// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EndpointsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EndpointsUpdateFuture struct {
azure.Future
}
@@ -1738,8 +1884,8 @@ func (eup *EndpointUpdateParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// ErrorResponse error reponse indicates CDN service is not able to process the incoming request. The reason is
-// provided in the error message.
+// ErrorResponse error response indicates CDN service is not able to process the incoming request. The
+// reason is provided in the error message.
type ErrorResponse struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
@@ -1791,8 +1937,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationsListResult result of the request to list CDN operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationsListResult result of the request to list CDN operations. It contains a list of operations and
+// a URL link to get the next set of results.
type OperationsListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN operations supported by the CDN resource provider.
@@ -1807,14 +1953,24 @@ type OperationsListResultIterator struct {
page OperationsListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationsListResultIterator) Next() error {
+func (iter *OperationsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1823,6 +1979,13 @@ func (iter *OperationsListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationsListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1842,6 +2005,11 @@ func (iter OperationsListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationsListResultIterator type.
+func NewOperationsListResultIterator(page OperationsListResultPage) OperationsListResultIterator {
+ return OperationsListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationsListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1849,11 +2017,11 @@ func (olr OperationsListResult) IsEmpty() bool {
// operationsListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationsListResult) operationsListResultPreparer() (*http.Request, error) {
+func (olr OperationsListResult) operationsListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1861,14 +2029,24 @@ func (olr OperationsListResult) operationsListResultPreparer() (*http.Request, e
// OperationsListResultPage contains a page of Operation values.
type OperationsListResultPage struct {
- fn func(OperationsListResult) (OperationsListResult, error)
+ fn func(context.Context, OperationsListResult) (OperationsListResult, error)
olr OperationsListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationsListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1876,6 +2054,13 @@ func (page *OperationsListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationsListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1894,9 +2079,14 @@ func (page OperationsListResultPage) Values() []Operation {
return *page.olr.Value
}
-// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented by an
-// endpoint do not have the requested content cached, they attempt to fetch it from one or more of the configured
-// origins.
+// Creates a new instance of the OperationsListResultPage type.
+func NewOperationsListResultPage(getNextPage func(context.Context, OperationsListResult) (OperationsListResult, error)) OperationsListResultPage {
+ return OperationsListResultPage{fn: getNextPage}
+}
+
+// Origin CDN origin is the source of the content being delivered via CDN. When the edge nodes represented
+// by an endpoint do not have the requested content cached, they attempt to fetch it from one or more of
+// the configured origins.
type Origin struct {
autorest.Response `json:"-"`
*OriginProperties `json:"properties,omitempty"`
@@ -2005,8 +2195,8 @@ func (o *Origin) UnmarshalJSON(body []byte) error {
return nil
}
-// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL link to
-// get the next set of results.
+// OriginListResult result of the request to list origins. It contains a list of origin objects and a URL
+// link to get the next set of results.
type OriginListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN origins within an endpoint
@@ -2021,14 +2211,24 @@ type OriginListResultIterator struct {
page OriginListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OriginListResultIterator) Next() error {
+func (iter *OriginListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2037,6 +2237,13 @@ func (iter *OriginListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OriginListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OriginListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2056,6 +2263,11 @@ func (iter OriginListResultIterator) Value() Origin {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OriginListResultIterator type.
+func NewOriginListResultIterator(page OriginListResultPage) OriginListResultIterator {
+ return OriginListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OriginListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -2063,11 +2275,11 @@ func (olr OriginListResult) IsEmpty() bool {
// originListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OriginListResult) originListResultPreparer() (*http.Request, error) {
+func (olr OriginListResult) originListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -2075,14 +2287,24 @@ func (olr OriginListResult) originListResultPreparer() (*http.Request, error) {
// OriginListResultPage contains a page of Origin values.
type OriginListResultPage struct {
- fn func(OriginListResult) (OriginListResult, error)
+ fn func(context.Context, OriginListResult) (OriginListResult, error)
olr OriginListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OriginListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OriginListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -2090,6 +2312,13 @@ func (page *OriginListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OriginListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OriginListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -2108,6 +2337,11 @@ func (page OriginListResultPage) Values() []Origin {
return *page.olr.Value
}
+// Creates a new instance of the OriginListResultPage type.
+func NewOriginListResultPage(getNextPage func(context.Context, OriginListResult) (OriginListResult, error)) OriginListResultPage {
+ return OriginListResultPage{fn: getNextPage}
+}
+
// OriginProperties the JSON object that contains the properties of the origin.
type OriginProperties struct {
// HostName - The address of the origin. Domain names, IPv4 addresses, and IPv6 addresses are supported.
@@ -2132,7 +2366,8 @@ type OriginPropertiesParameters struct {
HTTPSPort *int32 `json:"httpsPort,omitempty"`
}
-// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// OriginsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type OriginsUpdateFuture struct {
azure.Future
}
@@ -2198,8 +2433,8 @@ func (oup *OriginUpdateParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN provider and
-// pricing tier.
+// Profile CDN profile is a logical grouping of endpoints that share the same settings, such as CDN
+// provider and pricing tier.
type Profile struct {
autorest.Response `json:"-"`
// Sku - The pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
@@ -2322,8 +2557,8 @@ func (p *Profile) UnmarshalJSON(body []byte) error {
return nil
}
-// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a URL link
-// to get the the next set of results.
+// ProfileListResult result of the request to list profiles. It contains a list of profile objects and a
+// URL link to get the next set of results.
type ProfileListResult struct {
autorest.Response `json:"-"`
// Value - List of CDN profiles within a resource group.
@@ -2338,14 +2573,24 @@ type ProfileListResultIterator struct {
page ProfileListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ProfileListResultIterator) Next() error {
+func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2354,6 +2599,13 @@ func (iter *ProfileListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProfileListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProfileListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2373,6 +2625,11 @@ func (iter ProfileListResultIterator) Value() Profile {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ProfileListResultIterator type.
+func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
+ return ProfileListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (plr ProfileListResult) IsEmpty() bool {
return plr.Value == nil || len(*plr.Value) == 0
@@ -2380,11 +2637,11 @@ func (plr ProfileListResult) IsEmpty() bool {
// profileListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (plr ProfileListResult) profileListResultPreparer() (*http.Request, error) {
+func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(plr.NextLink)))
@@ -2392,14 +2649,24 @@ func (plr ProfileListResult) profileListResultPreparer() (*http.Request, error)
// ProfileListResultPage contains a page of Profile values.
type ProfileListResultPage struct {
- fn func(ProfileListResult) (ProfileListResult, error)
+ fn func(context.Context, ProfileListResult) (ProfileListResult, error)
plr ProfileListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ProfileListResultPage) Next() error {
- next, err := page.fn(page.plr)
+func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.plr)
if err != nil {
return err
}
@@ -2407,6 +2674,13 @@ func (page *ProfileListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProfileListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProfileListResultPage) NotDone() bool {
return !page.plr.IsEmpty()
@@ -2425,6 +2699,11 @@ func (page ProfileListResultPage) Values() []Profile {
return *page.plr.Value
}
+// Creates a new instance of the ProfileListResultPage type.
+func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
+ return ProfileListResultPage{fn: getNextPage}
+}
+
// ProfileProperties the JSON object that contains the properties required to create a profile.
type ProfileProperties struct {
// ResourceState - Resource status of the profile. Possible values include: 'ProfileResourceStateCreating', 'ProfileResourceStateActive', 'ProfileResourceStateDeleting', 'ProfileResourceStateDisabled'
@@ -2433,7 +2712,8 @@ type ProfileProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ProfilesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ProfilesCreateFuture struct {
azure.Future
}
@@ -2461,7 +2741,8 @@ func (future *ProfilesCreateFuture) Result(client ProfilesClient) (p Profile, er
return
}
-// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ProfilesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ProfilesDeleteFuture struct {
azure.Future
}
@@ -2483,7 +2764,8 @@ func (future *ProfilesDeleteFuture) Result(client ProfilesClient) (ar autorest.R
return
}
-// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ProfilesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ProfilesUpdateFuture struct {
azure.Future
}
@@ -2580,14 +2862,24 @@ type ResourceUsageListResultIterator struct {
page ResourceUsageListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceUsageListResultIterator) Next() error {
+func (iter *ResourceUsageListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2596,6 +2888,13 @@ func (iter *ResourceUsageListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceUsageListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceUsageListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2615,6 +2914,11 @@ func (iter ResourceUsageListResultIterator) Value() ResourceUsage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceUsageListResultIterator type.
+func NewResourceUsageListResultIterator(page ResourceUsageListResultPage) ResourceUsageListResultIterator {
+ return ResourceUsageListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rulr ResourceUsageListResult) IsEmpty() bool {
return rulr.Value == nil || len(*rulr.Value) == 0
@@ -2622,11 +2926,11 @@ func (rulr ResourceUsageListResult) IsEmpty() bool {
// resourceUsageListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rulr ResourceUsageListResult) resourceUsageListResultPreparer() (*http.Request, error) {
+func (rulr ResourceUsageListResult) resourceUsageListResultPreparer(ctx context.Context) (*http.Request, error) {
if rulr.NextLink == nil || len(to.String(rulr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rulr.NextLink)))
@@ -2634,14 +2938,24 @@ func (rulr ResourceUsageListResult) resourceUsageListResultPreparer() (*http.Req
// ResourceUsageListResultPage contains a page of ResourceUsage values.
type ResourceUsageListResultPage struct {
- fn func(ResourceUsageListResult) (ResourceUsageListResult, error)
+ fn func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)
rulr ResourceUsageListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceUsageListResultPage) Next() error {
- next, err := page.fn(page.rulr)
+func (page *ResourceUsageListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rulr)
if err != nil {
return err
}
@@ -2649,6 +2963,13 @@ func (page *ResourceUsageListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceUsageListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceUsageListResultPage) NotDone() bool {
return !page.rulr.IsEmpty()
@@ -2667,6 +2988,11 @@ func (page ResourceUsageListResultPage) Values() []ResourceUsage {
return *page.rulr.Value
}
+// Creates a new instance of the ResourceUsageListResultPage type.
+func NewResourceUsageListResultPage(getNextPage func(context.Context, ResourceUsageListResult) (ResourceUsageListResult, error)) ResourceUsageListResultPage {
+ return ResourceUsageListResultPage{fn: getNextPage}
+}
+
// Sku the pricing tier (defines a CDN provider, feature list and rate) of the CDN profile.
type Sku struct {
// Name - Name of the pricing tier. Possible values include: 'StandardVerizon', 'PremiumVerizon', 'CustomVerizon', 'StandardAkamai', 'StandardChinaCdn', 'StandardMicrosoft'
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/operations.go
index fba17754e94e..9c713c60f6d4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available CDN REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -100,8 +111,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationsListResult) (result OperationsListResult, err error) {
- req, err := lastResults.operationsListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationsListResult) (result OperationsListResult, err error) {
+ req, err := lastResults.operationsListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -122,6 +133,16 @@ func (client OperationsClient) listNextResults(lastResults OperationsListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
index cd5121b4f277..46baa269ff54 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/origins.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewOriginsClientWithBaseURI(baseURI string, subscriptionID string) OriginsC
// endpointName - name of the endpoint under the profile which is unique globally.
// originName - name of the origin which is unique within the endpoint.
func (client OriginsClient) Get(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string) (result Origin, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginsClient.Get")
+ 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},
@@ -126,6 +137,16 @@ func (client OriginsClient) GetResponder(resp *http.Response) (result Origin, er
// profileName - name of the CDN profile which is unique within the resource group.
// endpointName - name of the endpoint under the profile which is unique globally.
func (client OriginsClient) ListByEndpoint(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result OriginListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginsClient.ListByEndpoint")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.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},
@@ -199,8 +220,8 @@ func (client OriginsClient) ListByEndpointResponder(resp *http.Response) (result
}
// listByEndpointNextResults retrieves the next set of results, if any.
-func (client OriginsClient) listByEndpointNextResults(lastResults OriginListResult) (result OriginListResult, err error) {
- req, err := lastResults.originListResultPreparer()
+func (client OriginsClient) listByEndpointNextResults(ctx context.Context, lastResults OriginListResult) (result OriginListResult, err error) {
+ req, err := lastResults.originListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.OriginsClient", "listByEndpointNextResults", nil, "Failure preparing next results request")
}
@@ -221,6 +242,16 @@ func (client OriginsClient) listByEndpointNextResults(lastResults OriginListResu
// ListByEndpointComplete enumerates all values, automatically crossing page boundaries as required.
func (client OriginsClient) ListByEndpointComplete(ctx context.Context, resourceGroupName string, profileName string, endpointName string) (result OriginListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginsClient.ListByEndpoint")
+ 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.ListByEndpoint(ctx, resourceGroupName, profileName, endpointName)
return
}
@@ -233,6 +264,16 @@ func (client OriginsClient) ListByEndpointComplete(ctx context.Context, resource
// originName - name of the origin which is unique within the endpoint.
// originUpdateProperties - origin properties
func (client OriginsClient) Update(ctx context.Context, resourceGroupName string, profileName string, endpointName string, originName string, originUpdateProperties OriginUpdateParameters) (result OriginsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OriginsClient.Update")
+ 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},
@@ -290,10 +331,6 @@ func (client OriginsClient) UpdateSender(req *http.Request) (future OriginsUpdat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
index dc17f02265b7..e7050b6ca8e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/profiles.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) Profile
// profileName - name of the CDN profile which is unique within the resource group.
// profile - profile properties needed to create a new profile.
func (client ProfilesClient) Create(ctx context.Context, resourceGroupName string, profileName string, profile Profile) (result ProfilesCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Create")
+ 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},
@@ -104,10 +115,6 @@ func (client ProfilesClient) CreateSender(req *http.Request) (future ProfilesCre
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -131,6 +138,16 @@ func (client ProfilesClient) CreateResponder(resp *http.Response) (result Profil
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, profileName string) (result ProfilesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Delete")
+ 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},
@@ -184,10 +201,6 @@ func (client ProfilesClient) DeleteSender(req *http.Request) (future ProfilesDel
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -204,7 +217,7 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore
return
}
-// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemnetal portal is
+// GenerateSsoURI generates a dynamic SSO URI used to sign in to the CDN supplemental portal. Supplemental portal is
// used to configure advanced feature capabilities that are not yet available in the Azure portal, such as core reports
// in a standard profile; rules engine, advanced HTTP reports, and real-time stats and alerts in a premium profile. The
// SSO URI changes approximately every 10 minutes.
@@ -212,6 +225,16 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client ProfilesClient) GenerateSsoURI(ctx context.Context, resourceGroupName string, profileName string) (result SsoURI, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.GenerateSsoURI")
+ 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},
@@ -287,6 +310,16 @@ func (client ProfilesClient) GenerateSsoURIResponder(resp *http.Response) (resul
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, profileName string) (result Profile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Get")
+ 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},
@@ -359,6 +392,16 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile,
// List lists all of the CDN profiles within an Azure subscription.
func (client ProfilesClient) List(ctx context.Context) (result ProfileListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.List")
+ defer func() {
+ sc := -1
+ if result.plr.Response.Response != nil {
+ sc = result.plr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -421,8 +464,8 @@ func (client ProfilesClient) ListResponder(resp *http.Response) (result ProfileL
}
// listNextResults retrieves the next set of results, if any.
-func (client ProfilesClient) listNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer()
+func (client ProfilesClient) listNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
+ req, err := lastResults.profileListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -443,6 +486,16 @@ func (client ProfilesClient) listNextResults(lastResults ProfileListResult) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListComplete(ctx context.Context) (result ProfileListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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
}
@@ -451,6 +504,16 @@ func (client ProfilesClient) ListComplete(ctx context.Context) (result ProfileLi
// Parameters:
// resourceGroupName - name of the Resource group within the Azure subscription.
func (client ProfilesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ProfileListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.plr.Response.Response != nil {
+ sc = result.plr.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},
@@ -522,8 +585,8 @@ func (client ProfilesClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ProfilesClient) listByResourceGroupNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer()
+func (client ProfilesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
+ req, err := lastResults.profileListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -544,6 +607,16 @@ func (client ProfilesClient) listByResourceGroupNextResults(lastResults ProfileL
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ProfileListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -553,6 +626,16 @@ func (client ProfilesClient) ListByResourceGroupComplete(ctx context.Context, re
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client ProfilesClient) ListResourceUsage(ctx context.Context, resourceGroupName string, profileName string) (result ResourceUsageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListResourceUsage")
+ defer func() {
+ sc := -1
+ if result.rulr.Response.Response != nil {
+ sc = result.rulr.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},
@@ -625,8 +708,8 @@ func (client ProfilesClient) ListResourceUsageResponder(resp *http.Response) (re
}
// listResourceUsageNextResults retrieves the next set of results, if any.
-func (client ProfilesClient) listResourceUsageNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
- req, err := lastResults.resourceUsageListResultPreparer()
+func (client ProfilesClient) listResourceUsageNextResults(ctx context.Context, lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
+ req, err := lastResults.resourceUsageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.ProfilesClient", "listResourceUsageNextResults", nil, "Failure preparing next results request")
}
@@ -647,6 +730,16 @@ func (client ProfilesClient) listResourceUsageNextResults(lastResults ResourceUs
// ListResourceUsageComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListResourceUsageComplete(ctx context.Context, resourceGroupName string, profileName string) (result ResourceUsageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListResourceUsage")
+ 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.ListResourceUsage(ctx, resourceGroupName, profileName)
return
}
@@ -657,6 +750,16 @@ func (client ProfilesClient) ListResourceUsageComplete(ctx context.Context, reso
// resourceGroupName - name of the Resource group within the Azure subscription.
// profileName - name of the CDN profile which is unique within the resource group.
func (client ProfilesClient) ListSupportedOptimizationTypes(ctx context.Context, resourceGroupName string, profileName string) (result SupportedOptimizationTypesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListSupportedOptimizationTypes")
+ 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},
@@ -734,6 +837,16 @@ func (client ProfilesClient) ListSupportedOptimizationTypesResponder(resp *http.
// profileName - name of the CDN profile which is unique within the resource group.
// profileUpdateParameters - profile properties needed to update an existing profile.
func (client ProfilesClient) Update(ctx context.Context, resourceGroupName string, profileName string, profileUpdateParameters ProfileUpdateParameters) (result ProfilesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Update")
+ 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},
@@ -789,10 +902,6 @@ func (client ProfilesClient) UpdateSender(req *http.Request) (future ProfilesUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go
index a62e43c1bc87..50a272617a96 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cdn/mgmt/2017-10-12/cdn/resourceusage.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewResourceUsageClientWithBaseURI(baseURI string, subscriptionID string) Re
// List check the quota and actual usage of the CDN profiles under the given subscription.
func (client ResourceUsageClient) List(ctx context.Context) (result ResourceUsageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageClient.List")
+ defer func() {
+ sc := -1
+ if result.rulr.Response.Response != nil {
+ sc = result.rulr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -104,8 +115,8 @@ func (client ResourceUsageClient) ListResponder(resp *http.Response) (result Res
}
// listNextResults retrieves the next set of results, if any.
-func (client ResourceUsageClient) listNextResults(lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
- req, err := lastResults.resourceUsageListResultPreparer()
+func (client ResourceUsageClient) listNextResults(ctx context.Context, lastResults ResourceUsageListResult) (result ResourceUsageListResult, err error) {
+ req, err := lastResults.resourceUsageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cdn.ResourceUsageClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -126,6 +137,16 @@ func (client ResourceUsageClient) listNextResults(lastResults ResourceUsageListR
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ResourceUsageClient) ListComplete(ctx context.Context) (result ResourceUsageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceUsageClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go
index d873e761f210..f34f73147f1a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/accounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,13 +48,25 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account
// accountName - the name of Cognitive Services account.
// parameters - the parameters to provide for the created account.
func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters AccountCreateParameters) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Create")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
{Target: "accountName", Name: validation.MinLength, Rule: 2, Chain: nil},
{Target: "accountName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9][a-zA-Z0-9_.-]*$`, Chain: nil}}},
{TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true, Chain: nil},
+ Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: true,
+ Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "parameters.Kind", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
return result, validation.NewError("cognitiveservices.AccountsClient", "Create", err.Error())
@@ -128,6 +141,16 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result Accoun
// resourceGroupName - the name of the resource group within the user's subscription.
// accountName - the name of Cognitive Services account.
func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -202,6 +225,16 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the name of the resource group within the user's subscription.
// accountName - the name of Cognitive Services account.
func (client AccountsClient) GetProperties(ctx context.Context, resourceGroupName string, accountName string) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetProperties")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -279,6 +312,16 @@ func (client AccountsClient) GetPropertiesResponder(resp *http.Response) (result
// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is
// name.value (name of the metric, can have an or of multiple names).
func (client AccountsClient) GetUsages(ctx context.Context, resourceGroupName string, accountName string, filter string) (result UsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.GetUsages")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -354,6 +397,16 @@ func (client AccountsClient) GetUsagesResponder(resp *http.Response) (result Usa
// List returns all the resources of a particular type belonging to a subscription.
func (client AccountsClient) List(ctx context.Context) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -416,8 +469,8 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result AccountL
}
// listNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountsClient) listNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -438,6 +491,16 @@ func (client AccountsClient) listNextResults(lastResults AccountListResult) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListComplete(ctx context.Context) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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
}
@@ -446,6 +509,16 @@ func (client AccountsClient) ListComplete(ctx context.Context) (result AccountLi
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription.
func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -509,8 +582,8 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listByResourceGroupNextResults(lastResults AccountListResult) (result AccountListResult, err error) {
- req, err := lastResults.accountListResultPreparer()
+func (client AccountsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AccountListResult) (result AccountListResult, err error) {
+ req, err := lastResults.accountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cognitiveservices.AccountsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -531,6 +604,16 @@ func (client AccountsClient) listByResourceGroupNextResults(lastResults AccountL
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -540,6 +623,16 @@ func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, re
// resourceGroupName - the name of the resource group within the user's subscription.
// accountName - the name of Cognitive Services account.
func (client AccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result AccountKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListKeys")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -615,6 +708,16 @@ func (client AccountsClient) ListKeysResponder(resp *http.Response) (result Acco
// resourceGroupName - the name of the resource group within the user's subscription.
// accountName - the name of Cognitive Services account.
func (client AccountsClient) ListSkus(ctx context.Context, resourceGroupName string, accountName string) (result AccountEnumerateSkusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListSkus")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -691,6 +794,16 @@ func (client AccountsClient) ListSkusResponder(resp *http.Response) (result Acco
// accountName - the name of Cognitive Services account.
// parameters - regenerate key parameters.
func (client AccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, parameters RegenerateKeyParameters) (result AccountKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.RegenerateKey")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
@@ -769,6 +882,16 @@ func (client AccountsClient) RegenerateKeyResponder(resp *http.Response) (result
// accountName - the name of Cognitive Services account.
// parameters - the parameters to provide for the created account.
func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters AccountUpdateParameters) (result Account, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update")
+ 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: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 64, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/checkskuavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/checkskuavailability.go
index a8bcd57afdd1..245871342ed5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/checkskuavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/checkskuavailability.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,11 +44,22 @@ func NewCheckSkuAvailabilityClientWithBaseURI(baseURI string, subscriptionID str
// List check available SKUs.
// Parameters:
// location - resource location.
-// parameters - check SKU Availablity POST body.
+// parameters - check SKU Availability POST body.
func (client CheckSkuAvailabilityClient) List(ctx context.Context, location string, parameters CheckSkuAvailabilityParameter) (result CheckSkuAvailabilityResultList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CheckSkuAvailabilityClient.List")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Skus", Name: validation.Null, Rule: true, Chain: nil},
+ {Target: "parameters.Kind", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Type", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
return result, validation.NewError("cognitiveservices.CheckSkuAvailabilityClient", "List", err.Error())
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go
index 619aeee25618..f23317d32681 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/models.go
@@ -18,12 +18,17 @@ package cognitiveservices
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices"
+
// KeyName enumerates the values for key name.
type KeyName string
@@ -39,55 +44,6 @@ func PossibleKeyNameValues() []KeyName {
return []KeyName{Key1, Key2}
}
-// Kind enumerates the values for kind.
-type Kind string
-
-const (
- // BingAutosuggestv7 ...
- BingAutosuggestv7 Kind = "Bing.Autosuggest.v7"
- // BingCustomSearch ...
- BingCustomSearch Kind = "Bing.CustomSearch"
- // BingSearchv7 ...
- BingSearchv7 Kind = "Bing.Search.v7"
- // BingSpeech ...
- BingSpeech Kind = "Bing.Speech"
- // BingSpellCheckv7 ...
- BingSpellCheckv7 Kind = "Bing.SpellCheck.v7"
- // ComputerVision ...
- ComputerVision Kind = "ComputerVision"
- // ContentModerator ...
- ContentModerator Kind = "ContentModerator"
- // CustomSpeech ...
- CustomSpeech Kind = "CustomSpeech"
- // CustomVisionPrediction ...
- CustomVisionPrediction Kind = "CustomVision.Prediction"
- // CustomVisionTraining ...
- CustomVisionTraining Kind = "CustomVision.Training"
- // Emotion ...
- Emotion Kind = "Emotion"
- // Face ...
- Face Kind = "Face"
- // LUIS ...
- LUIS Kind = "LUIS"
- // QnAMaker ...
- QnAMaker Kind = "QnAMaker"
- // SpeakerRecognition ...
- SpeakerRecognition Kind = "SpeakerRecognition"
- // SpeechTranslation ...
- SpeechTranslation Kind = "SpeechTranslation"
- // TextAnalytics ...
- TextAnalytics Kind = "TextAnalytics"
- // TextTranslation ...
- TextTranslation Kind = "TextTranslation"
- // WebLM ...
- WebLM Kind = "WebLM"
-)
-
-// PossibleKindValues returns an array of possible values for the Kind const type.
-func PossibleKindValues() []Kind {
- return []Kind{BingAutosuggestv7, BingCustomSearch, BingSearchv7, BingSpeech, BingSpellCheckv7, ComputerVision, ContentModerator, CustomSpeech, CustomVisionPrediction, CustomVisionTraining, Emotion, Face, LUIS, QnAMaker, SpeakerRecognition, SpeechTranslation, TextAnalytics, TextTranslation, WebLM}
-}
-
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
@@ -160,39 +116,6 @@ func PossibleResourceSkuRestrictionsTypeValues() []ResourceSkuRestrictionsType {
return []ResourceSkuRestrictionsType{Location, Zone}
}
-// SkuName enumerates the values for sku name.
-type SkuName string
-
-const (
- // F0 ...
- F0 SkuName = "F0"
- // P0 ...
- P0 SkuName = "P0"
- // P1 ...
- P1 SkuName = "P1"
- // P2 ...
- P2 SkuName = "P2"
- // S0 ...
- S0 SkuName = "S0"
- // S1 ...
- S1 SkuName = "S1"
- // S2 ...
- S2 SkuName = "S2"
- // S3 ...
- S3 SkuName = "S3"
- // S4 ...
- S4 SkuName = "S4"
- // S5 ...
- S5 SkuName = "S5"
- // S6 ...
- S6 SkuName = "S6"
-)
-
-// PossibleSkuNameValues returns an array of possible values for the SkuName const type.
-func PossibleSkuNameValues() []SkuName {
- return []SkuName{F0, P0, P1, P2, S0, S1, S2, S3, S4, S5, S6}
-}
-
// SkuTier enumerates the values for sku tier.
type SkuTier string
@@ -235,8 +158,8 @@ func PossibleUnitTypeValues() []UnitType {
return []UnitType{Bytes, BytesPerSecond, Count, CountPerSecond, Milliseconds, Percent, Seconds}
}
-// Account cognitive Services Account is an Azure resource representing the provisioned account, its type, location
-// and SKU.
+// Account cognitive Services Account is an Azure resource representing the provisioned account, its type,
+// location and SKU.
type Account struct {
autorest.Response `json:"-"`
// Etag - Entity Tag
@@ -392,8 +315,8 @@ func (a *Account) UnmarshalJSON(body []byte) error {
type AccountCreateParameters struct {
// Sku - Required. Gets or sets the SKU of the resource.
Sku *Sku `json:"sku,omitempty"`
- // Kind - Required. Gets or sets the Kind of the resource. Possible values include: 'BingAutosuggestv7', 'BingCustomSearch', 'BingSearchv7', 'BingSpeech', 'BingSpellCheckv7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVisionPrediction', 'CustomVisionTraining', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
- Kind Kind `json:"kind,omitempty"`
+ // Kind - Required. Gets or sets the Kind of the resource.
+ Kind *string `json:"kind,omitempty"`
// Location - Required. Gets or sets the location of the resource. This will be one of the supported and registered Azure Geo Regions (e.g. West US, East US, Southeast Asia, etc.). The geo region of a resource cannot be changed once it is created, but if an identical geo region is specified on update the request will succeed.
Location *string `json:"location,omitempty"`
// Tags - Gets or sets a list of key value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters.
@@ -408,7 +331,7 @@ func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
if acp.Sku != nil {
objectMap["sku"] = acp.Sku
}
- if acp.Kind != "" {
+ if acp.Kind != nil {
objectMap["kind"] = acp.Kind
}
if acp.Location != nil {
@@ -417,7 +340,9 @@ func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) {
if acp.Tags != nil {
objectMap["tags"] = acp.Tags
}
- objectMap["properties"] = acp.Properties
+ if acp.Properties != nil {
+ objectMap["properties"] = acp.Properties
+ }
return json.Marshal(objectMap)
}
@@ -452,14 +377,24 @@ type AccountListResultIterator struct {
page AccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AccountListResultIterator) Next() error {
+func (iter *AccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -468,6 +403,13 @@ func (iter *AccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -487,6 +429,11 @@ func (iter AccountListResultIterator) Value() Account {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AccountListResultIterator type.
+func NewAccountListResultIterator(page AccountListResultPage) AccountListResultIterator {
+ return AccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr AccountListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -494,11 +441,11 @@ func (alr AccountListResult) IsEmpty() bool {
// accountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (alr AccountListResult) accountListResultPreparer() (*http.Request, error) {
+func (alr AccountListResult) accountListResultPreparer(ctx context.Context) (*http.Request, error) {
if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.NextLink)))
@@ -506,14 +453,24 @@ func (alr AccountListResult) accountListResultPreparer() (*http.Request, error)
// AccountListResultPage contains a page of Account values.
type AccountListResultPage struct {
- fn func(AccountListResult) (AccountListResult, error)
+ fn func(context.Context, AccountListResult) (AccountListResult, error)
alr AccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AccountListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *AccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -521,6 +478,13 @@ func (page *AccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AccountListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -539,6 +503,11 @@ func (page AccountListResultPage) Values() []Account {
return *page.alr.Value
}
+// Creates a new instance of the AccountListResultPage type.
+func NewAccountListResultPage(getNextPage func(context.Context, AccountListResult) (AccountListResult, error)) AccountListResultPage {
+ return AccountListResultPage{fn: getNextPage}
+}
+
// AccountProperties properties of Cognitive Services account.
type AccountProperties struct {
// ProvisioningState - Gets the status of the cognitive services account at the time the operation was called. Possible values include: 'Creating', 'ResolvingDNS', 'Moving', 'Deleting', 'Succeeded', 'Failed'
@@ -572,21 +541,21 @@ func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) {
// CheckSkuAvailabilityParameter check SKU availability parameter.
type CheckSkuAvailabilityParameter struct {
// Skus - The SKU of the resource.
- Skus *[]SkuName `json:"skus,omitempty"`
- // Kind - The Kind of the resource. Possible values include: 'BingAutosuggestv7', 'BingCustomSearch', 'BingSearchv7', 'BingSpeech', 'BingSpellCheckv7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVisionPrediction', 'CustomVisionTraining', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
- Kind Kind `json:"kind,omitempty"`
+ Skus *[]string `json:"skus,omitempty"`
+ // Kind - The Kind of the resource.
+ Kind *string `json:"kind,omitempty"`
// Type - The Type of the resource.
Type *string `json:"type,omitempty"`
}
// CheckSkuAvailabilityResult check SKU availability result.
type CheckSkuAvailabilityResult struct {
- // Kind - The Kind of the resource. Possible values include: 'BingAutosuggestv7', 'BingCustomSearch', 'BingSearchv7', 'BingSpeech', 'BingSpellCheckv7', 'ComputerVision', 'ContentModerator', 'CustomSpeech', 'CustomVisionPrediction', 'CustomVisionTraining', 'Emotion', 'Face', 'LUIS', 'QnAMaker', 'SpeakerRecognition', 'SpeechTranslation', 'TextAnalytics', 'TextTranslation', 'WebLM'
- Kind Kind `json:"kind,omitempty"`
+ // Kind - The Kind of the resource.
+ Kind *string `json:"kind,omitempty"`
// Type - The Type of the resource.
Type *string `json:"type,omitempty"`
- // SkuName - The SKU of Cognitive Services account. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6'
- SkuName SkuName `json:"skuName,omitempty"`
+ // SkuName - The SKU of Cognitive Services account.
+ SkuName *string `json:"skuName,omitempty"`
// SkuAvailable - Indicates the given SKU is available or not.
SkuAvailable *bool `json:"skuAvailable,omitempty"`
// Reason - Reason why the SKU is not available.
@@ -663,14 +632,24 @@ type OperationEntityListResultIterator struct {
page OperationEntityListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationEntityListResultIterator) Next() error {
+func (iter *OperationEntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -679,6 +658,13 @@ func (iter *OperationEntityListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationEntityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationEntityListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -698,6 +684,11 @@ func (iter OperationEntityListResultIterator) Value() OperationEntity {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationEntityListResultIterator type.
+func NewOperationEntityListResultIterator(page OperationEntityListResultPage) OperationEntityListResultIterator {
+ return OperationEntityListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (oelr OperationEntityListResult) IsEmpty() bool {
return oelr.Value == nil || len(*oelr.Value) == 0
@@ -705,11 +696,11 @@ func (oelr OperationEntityListResult) IsEmpty() bool {
// operationEntityListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (oelr OperationEntityListResult) operationEntityListResultPreparer() (*http.Request, error) {
+func (oelr OperationEntityListResult) operationEntityListResultPreparer(ctx context.Context) (*http.Request, error) {
if oelr.NextLink == nil || len(to.String(oelr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(oelr.NextLink)))
@@ -717,14 +708,24 @@ func (oelr OperationEntityListResult) operationEntityListResultPreparer() (*http
// OperationEntityListResultPage contains a page of OperationEntity values.
type OperationEntityListResultPage struct {
- fn func(OperationEntityListResult) (OperationEntityListResult, error)
+ fn func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)
oelr OperationEntityListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationEntityListResultPage) Next() error {
- next, err := page.fn(page.oelr)
+func (page *OperationEntityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationEntityListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.oelr)
if err != nil {
return err
}
@@ -732,6 +733,13 @@ func (page *OperationEntityListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationEntityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationEntityListResultPage) NotDone() bool {
return !page.oelr.IsEmpty()
@@ -750,6 +758,11 @@ func (page OperationEntityListResultPage) Values() []OperationEntity {
return *page.oelr.Value
}
+// Creates a new instance of the OperationEntityListResultPage type.
+func NewOperationEntityListResultPage(getNextPage func(context.Context, OperationEntityListResult) (OperationEntityListResult, error)) OperationEntityListResultPage {
+ return OperationEntityListResultPage{fn: getNextPage}
+}
+
// RegenerateKeyParameters regenerate key parameters.
type RegenerateKeyParameters struct {
// KeyName - key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
@@ -815,14 +828,24 @@ type ResourceSkusResultIterator struct {
page ResourceSkusResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceSkusResultIterator) Next() error {
+func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -831,6 +854,13 @@ func (iter *ResourceSkusResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceSkusResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -850,6 +880,11 @@ func (iter ResourceSkusResultIterator) Value() ResourceSku {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceSkusResultIterator type.
+func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
+ return ResourceSkusResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rsr ResourceSkusResult) IsEmpty() bool {
return rsr.Value == nil || len(*rsr.Value) == 0
@@ -857,11 +892,11 @@ func (rsr ResourceSkusResult) IsEmpty() bool {
// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rsr ResourceSkusResult) resourceSkusResultPreparer() (*http.Request, error) {
+func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rsr.NextLink)))
@@ -869,14 +904,24 @@ func (rsr ResourceSkusResult) resourceSkusResultPreparer() (*http.Request, error
// ResourceSkusResultPage contains a page of ResourceSku values.
type ResourceSkusResultPage struct {
- fn func(ResourceSkusResult) (ResourceSkusResult, error)
+ fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
rsr ResourceSkusResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceSkusResultPage) Next() error {
- next, err := page.fn(page.rsr)
+func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rsr)
if err != nil {
return err
}
@@ -884,6 +929,13 @@ func (page *ResourceSkusResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceSkusResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceSkusResultPage) NotDone() bool {
return !page.rsr.IsEmpty()
@@ -902,10 +954,15 @@ func (page ResourceSkusResultPage) Values() []ResourceSku {
return *page.rsr.Value
}
+// Creates a new instance of the ResourceSkusResultPage type.
+func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return ResourceSkusResultPage{fn: getNextPage}
+}
+
// Sku the SKU of the cognitive services account.
type Sku struct {
- // Name - Gets or sets the sku name. Required for account creation, optional for update. Possible values include: 'F0', 'P0', 'P1', 'P2', 'S0', 'S1', 'S2', 'S3', 'S4', 'S5', 'S6'
- Name SkuName `json:"name,omitempty"`
+ // Name - Gets or sets the sku name. Required for account creation, optional for update.
+ Name *string `json:"name,omitempty"`
// Tier - Gets the sku tier. This is based on the SKU name. Possible values include: 'Free', 'Standard', 'Premium'
Tier SkuTier `json:"tier,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go
index 997e891b497a..7d5498fc467e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all the available Cognitive Services account operations.
func (client OperationsClient) List(ctx context.Context) (result OperationEntityListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.oelr.Response.Response != nil {
+ sc = result.oelr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationEntityListResult) (result OperationEntityListResult, err error) {
- req, err := lastResults.operationEntityListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationEntityListResult) (result OperationEntityListResult, err error) {
+ req, err := lastResults.operationEntityListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cognitiveservices.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationEntityListRe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationEntityListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go
index fe790c3e09cc..9b939223a3e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cognitiveservices/mgmt/2017-04-18/cognitiveservices/resourceskus.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) Res
// List gets the list of Microsoft.CognitiveServices SKUs available for your Subscription.
func (client ResourceSkusClient) List(ctx context.Context) (result ResourceSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -103,8 +114,8 @@ func (client ResourceSkusClient) ListResponder(resp *http.Response) (result Reso
}
// listNextResults retrieves the next set of results, if any.
-func (client ResourceSkusClient) listNextResults(lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
- req, err := lastResults.resourceSkusResultPreparer()
+func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
+ req, err := lastResults.resourceSkusResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "cognitiveservices.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -125,6 +136,16 @@ func (client ResourceSkusClient) listNextResults(lastResults ResourceSkusResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ResourceSkusClient) ListComplete(ctx context.Context) (result ResourceSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/availabilitysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/availabilitysets.go
index 2c4aa6769436..1827cece9ab6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/availabilitysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/availabilitysets.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAvailabilitySetsClientWithBaseURI(baseURI string, subscriptionID string)
// availabilitySetName - the name of the availability set.
// parameters - parameters supplied to the Create Availability Set operation.
func (client AvailabilitySetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySet) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client AvailabilitySetsClient) CreateOrUpdateResponder(resp *http.Response
// resourceGroupName - the name of the resource group.
// availabilitySetName - the name of the availability set.
func (client AvailabilitySetsClient) Delete(ctx context.Context, resourceGroupName string, availabilitySetName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, availabilitySetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client AvailabilitySetsClient) DeleteResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// availabilitySetName - the name of the availability set.
func (client AvailabilitySetsClient) Get(ctx context.Context, resourceGroupName string, availabilitySetName string) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, availabilitySetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Get", nil, "Failure preparing request")
@@ -246,6 +277,16 @@ func (client AvailabilitySetsClient) GetResponder(resp *http.Response) (result A
// Parameters:
// resourceGroupName - the name of the resource group.
func (client AvailabilitySetsClient) List(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.List")
+ defer func() {
+ sc := -1
+ if result.aslr.Response.Response != nil {
+ sc = result.aslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -309,8 +350,8 @@ func (client AvailabilitySetsClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client AvailabilitySetsClient) listNextResults(lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
- req, err := lastResults.availabilitySetListResultPreparer()
+func (client AvailabilitySetsClient) listNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
+ req, err := lastResults.availabilitySetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -331,6 +372,16 @@ func (client AvailabilitySetsClient) listNextResults(lastResults AvailabilitySet
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AvailabilitySetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AvailabilitySetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.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, resourceGroupName)
return
}
@@ -341,6 +392,16 @@ func (client AvailabilitySetsClient) ListComplete(ctx context.Context, resourceG
// resourceGroupName - the name of the resource group.
// availabilitySetName - the name of the availability set.
func (client AvailabilitySetsClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, availabilitySetName string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListAvailableSizes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, availabilitySetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "ListAvailableSizes", nil, "Failure preparing request")
@@ -405,6 +466,16 @@ func (client AvailabilitySetsClient) ListAvailableSizesResponder(resp *http.Resp
// ListBySubscription lists all availability sets in a subscription.
func (client AvailabilitySetsClient) ListBySubscription(ctx context.Context) (result AvailabilitySetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.aslr.Response.Response != nil {
+ sc = result.aslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -467,8 +538,8 @@ func (client AvailabilitySetsClient) ListBySubscriptionResponder(resp *http.Resp
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client AvailabilitySetsClient) listBySubscriptionNextResults(lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
- req, err := lastResults.availabilitySetListResultPreparer()
+func (client AvailabilitySetsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AvailabilitySetListResult) (result AvailabilitySetListResult, err error) {
+ req, err := lastResults.availabilitySetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -489,6 +560,16 @@ func (client AvailabilitySetsClient) listBySubscriptionNextResults(lastResults A
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Context) (result AvailabilitySetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -499,6 +580,16 @@ func (client AvailabilitySetsClient) ListBySubscriptionComplete(ctx context.Cont
// availabilitySetName - the name of the availability set.
// parameters - parameters supplied to the Update Availability Set operation.
func (client AvailabilitySetsClient) Update(ctx context.Context, resourceGroupName string, availabilitySetName string, parameters AvailabilitySetUpdate) (result AvailabilitySet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, availabilitySetName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.AvailabilitySetsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/containerservices.go
index b16788bfa558..24fdc080165d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/containerservices.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string
// containerServiceName - the name of the container service in the specified subscription and resource group.
// parameters - parameters supplied to the Create or Update a Container Service operation.
func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ContainerServiceProperties", Name: validation.Null, Rule: false,
@@ -125,10 +136,6 @@ func (client ContainerServicesClient) CreateOrUpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -154,6 +161,16 @@ func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// containerServiceName - the name of the container service in the specified subscription and resource group.
func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Delete", nil, "Failure preparing request")
@@ -199,10 +216,6 @@ func (client ContainerServicesClient) DeleteSender(req *http.Request) (future Co
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -226,6 +239,16 @@ func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// containerServiceName - the name of the container service in the specified subscription and resource group.
func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, containerServiceName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "Get", nil, "Failure preparing request")
@@ -291,6 +314,16 @@ func (client ContainerServicesClient) GetResponder(resp *http.Response) (result
// List gets a list of container services in the specified subscription. The operation returns properties of each
// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
func (client ContainerServicesClient) List(ctx context.Context) (result ContainerServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -353,8 +386,8 @@ func (client ContainerServicesClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client ContainerServicesClient) listNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
- req, err := lastResults.containerServiceListResultPreparer()
+func (client ContainerServicesClient) listNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
+ req, err := lastResults.containerServiceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -375,6 +408,16 @@ func (client ContainerServicesClient) listNextResults(lastResults ContainerServi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ContainerServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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
}
@@ -385,6 +428,16 @@ func (client ContainerServicesClient) ListComplete(ctx context.Context) (result
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.cslr.Response.Response != nil {
+ sc = result.cslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -448,8 +501,8 @@ func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
- req, err := lastResults.containerServiceListResultPreparer()
+func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ContainerServiceListResult) (result ContainerServiceListResult, err error) {
+ req, err := lastResults.containerServiceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -470,6 +523,16 @@ func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ContainerServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/disks.go
index 9cbbd79fd6fc..3de3e1d5a01e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/disks.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClien
// characters.
// disk - disk object supplied in the body of the Put disk operation.
func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, diskName string, disk Disk) (result DisksCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: disk,
Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: false,
@@ -116,10 +127,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -144,6 +151,16 @@ func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result D
// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
// characters.
func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, diskName string) (result DisksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, diskName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Delete", nil, "Failure preparing request")
@@ -189,10 +206,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -216,6 +229,16 @@ func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.
// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
// characters.
func (client DisksClient) Get(ctx context.Context, resourceGroupName string, diskName string) (result Disk, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, diskName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Get", nil, "Failure preparing request")
@@ -286,6 +309,16 @@ func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err er
// characters.
// grantAccessData - access data object supplied in the body of the get disk access operation.
func (client DisksClient) GrantAccess(ctx context.Context, resourceGroupName string, diskName string, grantAccessData GrantAccessData) (result DisksGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: grantAccessData,
Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -339,10 +372,6 @@ func (client DisksClient) GrantAccessSender(req *http.Request) (future DisksGran
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -362,6 +391,16 @@ func (client DisksClient) GrantAccessResponder(resp *http.Response) (result Acce
// List lists all the disks under a subscription.
func (client DisksClient) List(ctx context.Context) (result DiskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List")
+ defer func() {
+ sc := -1
+ if result.dl.Response.Response != nil {
+ sc = result.dl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -424,8 +463,8 @@ func (client DisksClient) ListResponder(resp *http.Response) (result DiskList, e
}
// listNextResults retrieves the next set of results, if any.
-func (client DisksClient) listNextResults(lastResults DiskList) (result DiskList, err error) {
- req, err := lastResults.diskListPreparer()
+func (client DisksClient) listNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) {
+ req, err := lastResults.diskListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -446,6 +485,16 @@ func (client DisksClient) listNextResults(lastResults DiskList) (result DiskList
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DisksClient) ListComplete(ctx context.Context) (result DiskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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
}
@@ -454,6 +503,16 @@ func (client DisksClient) ListComplete(ctx context.Context) (result DiskListIter
// Parameters:
// resourceGroupName - the name of the resource group.
func (client DisksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DiskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dl.Response.Response != nil {
+ sc = result.dl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -517,8 +576,8 @@ func (client DisksClient) ListByResourceGroupResponder(resp *http.Response) (res
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client DisksClient) listByResourceGroupNextResults(lastResults DiskList) (result DiskList, err error) {
- req, err := lastResults.diskListPreparer()
+func (client DisksClient) listByResourceGroupNextResults(ctx context.Context, lastResults DiskList) (result DiskList, err error) {
+ req, err := lastResults.diskListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.DisksClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -539,6 +598,16 @@ func (client DisksClient) listByResourceGroupNextResults(lastResults DiskList) (
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DiskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -550,6 +619,16 @@ func (client DisksClient) ListByResourceGroupComplete(ctx context.Context, resou
// created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80
// characters.
func (client DisksClient) RevokeAccess(ctx context.Context, resourceGroupName string, diskName string) (result DisksRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, diskName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "RevokeAccess", nil, "Failure preparing request")
@@ -595,10 +674,6 @@ func (client DisksClient) RevokeAccessSender(req *http.Request) (future DisksRev
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -623,6 +698,16 @@ func (client DisksClient) RevokeAccessResponder(resp *http.Response) (result aut
// characters.
// disk - disk object supplied in the body of the Patch disk operation.
func (client DisksClient) Update(ctx context.Context, resourceGroupName string, diskName string, disk DiskUpdate) (result DisksUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, diskName, disk)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.DisksClient", "Update", nil, "Failure preparing request")
@@ -670,10 +755,6 @@ func (client DisksClient) UpdateSender(req *http.Request) (future DisksUpdateFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleries.go
index bc550686859f..7241cb86b88a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleries.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewGalleriesClientWithBaseURI(baseURI string, subscriptionID string) Galler
// dots and periods allowed in the middle. The maximum length is 80 characters.
// gallery - parameters supplied to the create or update Shared Image Gallery operation.
func (client GalleriesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, gallery Gallery) (result GalleriesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, galleryName, gallery)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -93,10 +104,6 @@ func (client GalleriesClient) CreateOrUpdateSender(req *http.Request) (future Ga
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -119,6 +126,16 @@ func (client GalleriesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Image Gallery to be deleted.
func (client GalleriesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleriesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Delete", nil, "Failure preparing request")
@@ -164,10 +181,6 @@ func (client GalleriesClient) DeleteSender(req *http.Request) (future GalleriesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -189,6 +202,16 @@ func (client GalleriesClient) DeleteResponder(resp *http.Response) (result autor
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Image Gallery.
func (client GalleriesClient) Get(ctx context.Context, resourceGroupName string, galleryName string) (result Gallery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, galleryName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleriesClient", "Get", nil, "Failure preparing request")
@@ -253,6 +276,16 @@ func (client GalleriesClient) GetResponder(resp *http.Response) (result Gallery,
// List list galleries under a subscription.
func (client GalleriesClient) List(ctx context.Context) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.List")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -315,8 +348,8 @@ func (client GalleriesClient) ListResponder(resp *http.Response) (result Gallery
}
// listNextResults retrieves the next set of results, if any.
-func (client GalleriesClient) listNextResults(lastResults GalleryList) (result GalleryList, err error) {
- req, err := lastResults.galleryListPreparer()
+func (client GalleriesClient) listNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -337,6 +370,16 @@ func (client GalleriesClient) listNextResults(lastResults GalleryList) (result G
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.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
}
@@ -345,6 +388,16 @@ func (client GalleriesClient) ListComplete(ctx context.Context) (result GalleryL
// Parameters:
// resourceGroupName - the name of the resource group.
func (client GalleriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result GalleryListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.gl.Response.Response != nil {
+ sc = result.gl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -408,8 +461,8 @@ func (client GalleriesClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client GalleriesClient) listByResourceGroupNextResults(lastResults GalleryList) (result GalleryList, err error) {
- req, err := lastResults.galleryListPreparer()
+func (client GalleriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults GalleryList) (result GalleryList, err error) {
+ req, err := lastResults.galleryListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.GalleriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -430,6 +483,16 @@ func (client GalleriesClient) listByResourceGroupNextResults(lastResults Gallery
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client GalleriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result GalleryListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleriesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimages.go
index 670ea7ee29a3..22a525bee864 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimages.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) Ga
// characters.
// galleryImage - parameters supplied to the create or update gallery image operation.
func (client GalleryImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImage GalleryImage) (result GalleryImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: galleryImage,
Constraints: []validation.Constraint{{Target: "galleryImage.GalleryImageProperties", Name: validation.Null, Rule: false,
@@ -109,10 +120,6 @@ func (client GalleryImagesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -136,6 +143,16 @@ func (client GalleryImagesClient) CreateOrUpdateResponder(resp *http.Response) (
// galleryName - the name of the Shared Image Gallery in which the Image Definition is to be deleted.
// galleryImageName - the name of the gallery Image Definition to be deleted.
func (client GalleryImagesClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Delete", nil, "Failure preparing request")
@@ -182,10 +199,6 @@ func (client GalleryImagesClient) DeleteSender(req *http.Request) (future Galler
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -208,6 +221,16 @@ func (client GalleryImagesClient) DeleteResponder(resp *http.Response) (result a
// galleryName - the name of the Shared Image Gallery from which the Image Definitions are to be retrieved.
// galleryImageName - the name of the gallery Image Definition to be retrieved.
func (client GalleryImagesClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "Get", nil, "Failure preparing request")
@@ -276,6 +299,16 @@ func (client GalleryImagesClient) GetResponder(resp *http.Response) (result Gall
// resourceGroupName - the name of the resource group.
// galleryName - the name of the Shared Image Gallery from which Image Definitions are to be listed.
func (client GalleryImagesClient) ListByGallery(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ defer func() {
+ sc := -1
+ if result.gil.Response.Response != nil {
+ sc = result.gil.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByGalleryNextResults
req, err := client.ListByGalleryPreparer(ctx, resourceGroupName, galleryName)
if err != nil {
@@ -340,8 +373,8 @@ func (client GalleryImagesClient) ListByGalleryResponder(resp *http.Response) (r
}
// listByGalleryNextResults retrieves the next set of results, if any.
-func (client GalleryImagesClient) listByGalleryNextResults(lastResults GalleryImageList) (result GalleryImageList, err error) {
- req, err := lastResults.galleryImageListPreparer()
+func (client GalleryImagesClient) listByGalleryNextResults(ctx context.Context, lastResults GalleryImageList) (result GalleryImageList, err error) {
+ req, err := lastResults.galleryImageListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.GalleryImagesClient", "listByGalleryNextResults", nil, "Failure preparing next results request")
}
@@ -362,6 +395,16 @@ func (client GalleryImagesClient) listByGalleryNextResults(lastResults GalleryIm
// ListByGalleryComplete enumerates all values, automatically crossing page boundaries as required.
func (client GalleryImagesClient) ListByGalleryComplete(ctx context.Context, resourceGroupName string, galleryName string) (result GalleryImageListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.ListByGallery")
+ 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.ListByGallery(ctx, resourceGroupName, galleryName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
index d179443ade51..d645f541a275 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/galleryimageversions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewGalleryImageVersionsClientWithBaseURI(baseURI string, subscriptionID str
// 32-bit integer. Format: ..
// galleryImageVersion - parameters supplied to the create or update gallery Image Version operation.
func (client GalleryImageVersionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, galleryImageVersion GalleryImageVersion) (result GalleryImageVersionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: galleryImageVersion,
Constraints: []validation.Constraint{{Target: "galleryImageVersion.GalleryImageVersionProperties", Name: validation.Null, Rule: false,
@@ -106,10 +117,6 @@ func (client GalleryImageVersionsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -134,6 +141,16 @@ func (client GalleryImageVersionsClient) CreateOrUpdateResponder(resp *http.Resp
// galleryImageName - the name of the gallery Image Definition in which the Image Version resides.
// galleryImageVersionName - the name of the gallery Image Version to be deleted.
func (client GalleryImageVersionsClient) Delete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string) (result GalleryImageVersionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Delete", nil, "Failure preparing request")
@@ -181,10 +198,6 @@ func (client GalleryImageVersionsClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -209,6 +222,16 @@ func (client GalleryImageVersionsClient) DeleteResponder(resp *http.Response) (r
// galleryImageVersionName - the name of the gallery Image Version to be retrieved.
// expand - the expand expression to apply on the operation.
func (client GalleryImageVersionsClient) Get(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string, galleryImageVersionName string, expand ReplicationStatusTypes) (result GalleryImageVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, galleryName, galleryImageName, galleryImageVersionName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "Get", nil, "Failure preparing request")
@@ -283,6 +306,16 @@ func (client GalleryImageVersionsClient) GetResponder(resp *http.Response) (resu
// galleryImageName - the name of the Shared Image Gallery Image Definition from which the Image Versions are
// to be listed.
func (client GalleryImageVersionsClient) ListByGalleryImage(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ defer func() {
+ sc := -1
+ if result.givl.Response.Response != nil {
+ sc = result.givl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByGalleryImageNextResults
req, err := client.ListByGalleryImagePreparer(ctx, resourceGroupName, galleryName, galleryImageName)
if err != nil {
@@ -348,8 +381,8 @@ func (client GalleryImageVersionsClient) ListByGalleryImageResponder(resp *http.
}
// listByGalleryImageNextResults retrieves the next set of results, if any.
-func (client GalleryImageVersionsClient) listByGalleryImageNextResults(lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) {
- req, err := lastResults.galleryImageVersionListPreparer()
+func (client GalleryImageVersionsClient) listByGalleryImageNextResults(ctx context.Context, lastResults GalleryImageVersionList) (result GalleryImageVersionList, err error) {
+ req, err := lastResults.galleryImageVersionListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.GalleryImageVersionsClient", "listByGalleryImageNextResults", nil, "Failure preparing next results request")
}
@@ -370,6 +403,16 @@ func (client GalleryImageVersionsClient) listByGalleryImageNextResults(lastResul
// ListByGalleryImageComplete enumerates all values, automatically crossing page boundaries as required.
func (client GalleryImageVersionsClient) ListByGalleryImageComplete(ctx context.Context, resourceGroupName string, galleryName string, galleryImageName string) (result GalleryImageVersionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionsClient.ListByGalleryImage")
+ 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.ListByGalleryImage(ctx, resourceGroupName, galleryName, galleryImageName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/images.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/images.go
index 9284cace06c0..464bd3fcfc5d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/images.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/images.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewImagesClientWithBaseURI(baseURI string, subscriptionID string) ImagesCli
// imageName - the name of the image.
// parameters - parameters supplied to the Create Image operation.
func (client ImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, imageName string, parameters Image) (result ImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, imageName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -92,10 +103,6 @@ func (client ImagesClient) CreateOrUpdateSender(req *http.Request) (future Image
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -118,6 +125,16 @@ func (client ImagesClient) CreateOrUpdateResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// imageName - the name of the image.
func (client ImagesClient) Delete(ctx context.Context, resourceGroupName string, imageName string) (result ImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, imageName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Delete", nil, "Failure preparing request")
@@ -163,10 +180,6 @@ func (client ImagesClient) DeleteSender(req *http.Request) (future ImagesDeleteF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -189,6 +202,16 @@ func (client ImagesClient) DeleteResponder(resp *http.Response) (result autorest
// imageName - the name of the image.
// expand - the expand expression to apply on the operation.
func (client ImagesClient) Get(ctx context.Context, resourceGroupName string, imageName string, expand string) (result Image, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, imageName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Get", nil, "Failure preparing request")
@@ -257,6 +280,16 @@ func (client ImagesClient) GetResponder(resp *http.Response) (result Image, err
// List gets the list of Images in the subscription. Use nextLink property in the response to get the next page of
// Images. Do this till nextLink is null to fetch all the Images.
func (client ImagesClient) List(ctx context.Context) (result ImageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -319,8 +352,8 @@ func (client ImagesClient) ListResponder(resp *http.Response) (result ImageListR
}
// listNextResults retrieves the next set of results, if any.
-func (client ImagesClient) listNextResults(lastResults ImageListResult) (result ImageListResult, err error) {
- req, err := lastResults.imageListResultPreparer()
+func (client ImagesClient) listNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) {
+ req, err := lastResults.imageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -341,6 +374,16 @@ func (client ImagesClient) listNextResults(lastResults ImageListResult) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ImagesClient) ListComplete(ctx context.Context) (result ImageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.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
}
@@ -349,6 +392,16 @@ func (client ImagesClient) ListComplete(ctx context.Context) (result ImageListRe
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ImagesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ImageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -412,8 +465,8 @@ func (client ImagesClient) ListByResourceGroupResponder(resp *http.Response) (re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ImagesClient) listByResourceGroupNextResults(lastResults ImageListResult) (result ImageListResult, err error) {
- req, err := lastResults.imageListResultPreparer()
+func (client ImagesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ImageListResult) (result ImageListResult, err error) {
+ req, err := lastResults.imageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ImagesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -434,6 +487,16 @@ func (client ImagesClient) listByResourceGroupNextResults(lastResults ImageListR
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ImageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -444,6 +507,16 @@ func (client ImagesClient) ListByResourceGroupComplete(ctx context.Context, reso
// imageName - the name of the image.
// parameters - parameters supplied to the Update Image operation.
func (client ImagesClient) Update(ctx context.Context, resourceGroupName string, imageName string, parameters ImageUpdate) (result ImagesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImagesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, imageName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.ImagesClient", "Update", nil, "Failure preparing request")
@@ -491,10 +564,6 @@ func (client ImagesClient) UpdateSender(req *http.Request) (future ImagesUpdateF
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/loganalytics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/loganalytics.go
index 6d41e89c385e..13e79aae4491 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/loganalytics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/loganalytics.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLogAnalyticsClientWithBaseURI(baseURI string, subscriptionID string) Log
// parameters - parameters supplied to the LogAnalytics getRequestRateByInterval Api.
// location - the location upon which virtual-machine-sizes is queried.
func (client LogAnalyticsClient) ExportRequestRateByInterval(ctx context.Context, parameters RequestRateByIntervalInput, location string) (result LogAnalyticsExportRequestRateByIntervalFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportRequestRateByInterval")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
@@ -98,10 +109,6 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalSender(req *http.Req
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client LogAnalyticsClient) ExportRequestRateByIntervalResponder(resp *http
// parameters - parameters supplied to the LogAnalytics getThrottledRequests Api.
// location - the location upon which virtual-machine-sizes is queried.
func (client LogAnalyticsClient) ExportThrottledRequests(ctx context.Context, parameters ThrottledRequestsInput, location string) (result LogAnalyticsExportThrottledRequestsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogAnalyticsClient.ExportThrottledRequests")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
@@ -177,10 +194,6 @@ func (client LogAnalyticsClient) ExportThrottledRequestsSender(req *http.Request
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/models.go
index 8050ddc95949..298107b8cb58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/models.go
@@ -18,14 +18,19 @@ package compute
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute"
+
// AccessLevel enumerates the values for access level.
type AccessLevel string
@@ -1159,15 +1164,16 @@ type AccessURI struct {
AccessSAS *string `json:"accessSAS,omitempty"`
}
-// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale set.
+// AdditionalCapabilities enables or disables a capability on the virtual machine or virtual machine scale
+// set.
type AdditionalCapabilities struct {
// UltraSSDEnabled - The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage account type on the VM or VMSS. Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale set only if this property is enabled.
UltraSSDEnabled *bool `json:"ultraSSDEnabled,omitempty"`
}
// AdditionalUnattendContent specifies additional XML formatted information that can be included in the
-// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name, and the
-// pass in which the content is applied.
+// Unattend.xml file, which is used by Windows Setup. Contents are defined by setting name, component name,
+// and the pass in which the content is applied.
type AdditionalUnattendContent struct {
// PassName - The pass name. Currently, the only allowable value is OobeSystem. Possible values include: 'OobeSystem'
PassName PassNames `json:"passName,omitempty"`
@@ -1181,7 +1187,7 @@ type AdditionalUnattendContent struct {
// APIEntityReference the API entity reference.
type APIEntityReference struct {
- // ID - The ARM resource id in the form of /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/...
+ // ID - The ARM resource id in the form of /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/...
ID *string `json:"id,omitempty"`
}
@@ -1215,14 +1221,16 @@ type AutoOSUpgradePolicy struct {
DisableAutoRollback *bool `json:"disableAutoRollback,omitempty"`
}
-// AvailabilitySet specifies information about the availability set that the virtual machine should be assigned to.
-// Virtual machines specified in the same availability set are allocated to different nodes to maximize
-// availability. For more information about availability sets, see [Manage the availability of virtual
+// AvailabilitySet specifies information about the availability set that the virtual machine should be
+// assigned to. Virtual machines specified in the same availability set are allocated to different nodes to
+// maximize availability. For more information about availability sets, see [Manage the availability of
+// virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
-//
For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in
+//
For more information on Azure planned maintenance, see [Planned maintenance for virtual
+// machines in
// Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
-//
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added
-// to an availability set.
+//
Currently, a VM can only be added to availability set at creation time. An existing VM cannot
+// be added to an availability set.
type AvailabilitySet struct {
autorest.Response `json:"-"`
*AvailabilitySetProperties `json:"properties,omitempty"`
@@ -1360,14 +1368,24 @@ type AvailabilitySetListResultIterator struct {
page AvailabilitySetListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AvailabilitySetListResultIterator) Next() error {
+func (iter *AvailabilitySetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1376,6 +1394,13 @@ func (iter *AvailabilitySetListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AvailabilitySetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AvailabilitySetListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1395,6 +1420,11 @@ func (iter AvailabilitySetListResultIterator) Value() AvailabilitySet {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AvailabilitySetListResultIterator type.
+func NewAvailabilitySetListResultIterator(page AvailabilitySetListResultPage) AvailabilitySetListResultIterator {
+ return AvailabilitySetListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (aslr AvailabilitySetListResult) IsEmpty() bool {
return aslr.Value == nil || len(*aslr.Value) == 0
@@ -1402,11 +1432,11 @@ func (aslr AvailabilitySetListResult) IsEmpty() bool {
// availabilitySetListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer() (*http.Request, error) {
+func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer(ctx context.Context) (*http.Request, error) {
if aslr.NextLink == nil || len(to.String(aslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(aslr.NextLink)))
@@ -1414,14 +1444,24 @@ func (aslr AvailabilitySetListResult) availabilitySetListResultPreparer() (*http
// AvailabilitySetListResultPage contains a page of AvailabilitySet values.
type AvailabilitySetListResultPage struct {
- fn func(AvailabilitySetListResult) (AvailabilitySetListResult, error)
+ fn func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)
aslr AvailabilitySetListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AvailabilitySetListResultPage) Next() error {
- next, err := page.fn(page.aslr)
+func (page *AvailabilitySetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailabilitySetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.aslr)
if err != nil {
return err
}
@@ -1429,6 +1469,13 @@ func (page *AvailabilitySetListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AvailabilitySetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AvailabilitySetListResultPage) NotDone() bool {
return !page.aslr.IsEmpty()
@@ -1447,6 +1494,11 @@ func (page AvailabilitySetListResultPage) Values() []AvailabilitySet {
return *page.aslr.Value
}
+// Creates a new instance of the AvailabilitySetListResultPage type.
+func NewAvailabilitySetListResultPage(getNextPage func(context.Context, AvailabilitySetListResult) (AvailabilitySetListResult, error)) AvailabilitySetListResultPage {
+ return AvailabilitySetListResultPage{fn: getNextPage}
+}
+
// AvailabilitySetProperties the instance view of a resource.
type AvailabilitySetProperties struct {
// PlatformUpdateDomainCount - Update Domain count.
@@ -1459,8 +1511,8 @@ type AvailabilitySetProperties struct {
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
}
-// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should be
-// assigned to. Only tags may be updated.
+// AvailabilitySetUpdate specifies information about the availability set that the virtual machine should
+// be assigned to. Only tags may be updated.
type AvailabilitySetUpdate struct {
*AvailabilitySetProperties `json:"properties,omitempty"`
// Sku - Sku of the availability set
@@ -1526,10 +1578,9 @@ func (asu *AvailabilitySetUpdate) UnmarshalJSON(body []byte) error {
return nil
}
-// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot
-// to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
-//
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from
-// the hypervisor.
+// BootDiagnostics boot Diagnostics is a debugging feature which allows you to view Console Output and
+// Screenshot to diagnose VM status.
You can easily view the output of your console log.
+// Azure also enables you to see a screenshot of the VM from the hypervisor.
type BootDiagnostics struct {
// Enabled - Whether boot diagnostics should be enabled on the Virtual Machine.
Enabled *bool `json:"enabled,omitempty"`
@@ -1543,6 +1594,8 @@ type BootDiagnosticsInstanceView struct {
ConsoleScreenshotBlobURI *string `json:"consoleScreenshotBlobUri,omitempty"`
// SerialConsoleLogBlobURI - The Linux serial console log blob Uri.
SerialConsoleLogBlobURI *string `json:"serialConsoleLogBlobUri,omitempty"`
+ // Status - The boot diagnostics status information for the VM.
NOTE: It will be set only if there are errors encountered in enabling boot diagnostics.
+ Status *InstanceViewStatus `json:"status,omitempty"`
}
// CloudError an error response from the Gallery service.
@@ -1669,7 +1722,7 @@ type ContainerServiceAgentPoolProfile struct {
VMSize ContainerServiceVMSizeTypes `json:"vmSize,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the agent pool.
+ // Fqdn - FQDN for the agent pool.
Fqdn *string `json:"fqdn,omitempty"`
}
@@ -1708,14 +1761,24 @@ type ContainerServiceListResultIterator struct {
page ContainerServiceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ContainerServiceListResultIterator) Next() error {
+func (iter *ContainerServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1724,6 +1787,13 @@ func (iter *ContainerServiceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ContainerServiceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ContainerServiceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1743,6 +1813,11 @@ func (iter ContainerServiceListResultIterator) Value() ContainerService {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ContainerServiceListResultIterator type.
+func NewContainerServiceListResultIterator(page ContainerServiceListResultPage) ContainerServiceListResultIterator {
+ return ContainerServiceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cslr ContainerServiceListResult) IsEmpty() bool {
return cslr.Value == nil || len(*cslr.Value) == 0
@@ -1750,11 +1825,11 @@ func (cslr ContainerServiceListResult) IsEmpty() bool {
// containerServiceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cslr ContainerServiceListResult) containerServiceListResultPreparer() (*http.Request, error) {
+func (cslr ContainerServiceListResult) containerServiceListResultPreparer(ctx context.Context) (*http.Request, error) {
if cslr.NextLink == nil || len(to.String(cslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cslr.NextLink)))
@@ -1762,14 +1837,24 @@ func (cslr ContainerServiceListResult) containerServiceListResultPreparer() (*ht
// ContainerServiceListResultPage contains a page of ContainerService values.
type ContainerServiceListResultPage struct {
- fn func(ContainerServiceListResult) (ContainerServiceListResult, error)
+ fn func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)
cslr ContainerServiceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ContainerServiceListResultPage) Next() error {
- next, err := page.fn(page.cslr)
+func (page *ContainerServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServiceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cslr)
if err != nil {
return err
}
@@ -1777,6 +1862,13 @@ func (page *ContainerServiceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ContainerServiceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ContainerServiceListResultPage) NotDone() bool {
return !page.cslr.IsEmpty()
@@ -1795,13 +1887,18 @@ func (page ContainerServiceListResultPage) Values() []ContainerService {
return *page.cslr.Value
}
+// Creates a new instance of the ContainerServiceListResultPage type.
+func NewContainerServiceListResultPage(getNextPage func(context.Context, ContainerServiceListResult) (ContainerServiceListResult, error)) ContainerServiceListResultPage {
+ return ContainerServiceListResultPage{fn: getNextPage}
+}
+
// ContainerServiceMasterProfile profile for the container service master.
type ContainerServiceMasterProfile struct {
// Count - Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.
Count *int32 `json:"count,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for master.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the master.
+ // Fqdn - FQDN for the master.
Fqdn *string `json:"fqdn,omitempty"`
}
@@ -1833,8 +1930,8 @@ type ContainerServiceProperties struct {
DiagnosticsProfile *ContainerServiceDiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
}
-// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ContainerServicesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ContainerServicesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1885,8 +1982,8 @@ func (future *ContainerServicesDeleteFuture) Result(client ContainerServicesClie
return
}
-// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster to use
-// for manipulating Azure APIs.
+// ContainerServiceServicePrincipalProfile information about a service principal identity for the cluster
+// to use for manipulating Azure APIs.
type ContainerServiceServicePrincipalProfile struct {
// ClientID - The ID for the service principal.
ClientID *string `json:"clientId,omitempty"`
@@ -1964,16 +2061,17 @@ type DataDiskImage struct {
Lun *int32 `json:"lun,omitempty"`
}
-// DiagnosticsProfile specifies the boot diagnostic settings state.
Minimum api-version:
+// 2015-06-15.
type DiagnosticsProfile struct {
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnostics `json:"bootDiagnostics,omitempty"`
}
-// DiffDiskSettings describes the parameters of differencing disk settings that can be be specified for operating
-// system disk.
NOTE: The differencing disk settings can only be specified for managed disk.
+// DiffDiskSettings describes the parameters of ephemeral disk settings that can be specified for operating
+// system disk.
NOTE: The ephemeral disk settings can only be specified for managed disk.
type DiffDiskSettings struct {
- // Option - Specifies the differencing disk settings for operating system disk. Possible values include: 'Local'
+ // Option - Specifies the ephemeral disk settings for operating system disk. Possible values include: 'Local'
Option DiffDiskOptions `json:"option,omitempty"`
}
@@ -2168,14 +2266,24 @@ type DiskListIterator struct {
page DiskListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DiskListIterator) Next() error {
+func (iter *DiskListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2184,6 +2292,13 @@ func (iter *DiskListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiskListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DiskListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2203,6 +2318,11 @@ func (iter DiskListIterator) Value() Disk {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DiskListIterator type.
+func NewDiskListIterator(page DiskListPage) DiskListIterator {
+ return DiskListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dl DiskList) IsEmpty() bool {
return dl.Value == nil || len(*dl.Value) == 0
@@ -2210,11 +2330,11 @@ func (dl DiskList) IsEmpty() bool {
// diskListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dl DiskList) diskListPreparer() (*http.Request, error) {
+func (dl DiskList) diskListPreparer(ctx context.Context) (*http.Request, error) {
if dl.NextLink == nil || len(to.String(dl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dl.NextLink)))
@@ -2222,14 +2342,24 @@ func (dl DiskList) diskListPreparer() (*http.Request, error) {
// DiskListPage contains a page of Disk values.
type DiskListPage struct {
- fn func(DiskList) (DiskList, error)
+ fn func(context.Context, DiskList) (DiskList, error)
dl DiskList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DiskListPage) Next() error {
- next, err := page.fn(page.dl)
+func (page *DiskListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiskListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dl)
if err != nil {
return err
}
@@ -2237,6 +2367,13 @@ func (page *DiskListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiskListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DiskListPage) NotDone() bool {
return !page.dl.IsEmpty()
@@ -2255,6 +2392,11 @@ func (page DiskListPage) Values() []Disk {
return *page.dl.Value
}
+// Creates a new instance of the DiskListPage type.
+func NewDiskListPage(getNextPage func(context.Context, DiskList) (DiskList, error)) DiskListPage {
+ return DiskListPage{fn: getNextPage}
+}
+
// DiskProperties disk resource properties.
type DiskProperties struct {
// TimeCreated - The time when the disk was created.
@@ -2275,7 +2417,8 @@ type DiskProperties struct {
DiskMBpsReadWrite *int32 `json:"diskMBpsReadWrite,omitempty"`
}
-// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
}
@@ -2325,7 +2468,8 @@ func (future *DisksDeleteFuture) Result(client DisksClient) (ar autorest.Respons
return
}
-// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksGrantAccessFuture struct {
azure.Future
}
@@ -2361,7 +2505,8 @@ type DiskSku struct {
Tier *string `json:"tier,omitempty"`
}
-// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksRevokeAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksRevokeAccessFuture struct {
azure.Future
}
@@ -2529,7 +2674,8 @@ func (future *GalleriesCreateOrUpdateFuture) Result(client GalleriesClient) (g G
return
}
-// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// GalleriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type GalleriesDeleteFuture struct {
azure.Future
}
@@ -2662,7 +2808,7 @@ func (g *Gallery) UnmarshalJSON(body []byte) error {
// GalleryArtifactPublishingProfileBase describes the basic gallery artifact publishing profile.
type GalleryArtifactPublishingProfileBase struct {
- // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable.
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
Source *GalleryArtifactSource `json:"source,omitempty"`
}
@@ -2830,14 +2976,24 @@ type GalleryImageListIterator struct {
page GalleryImageListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *GalleryImageListIterator) Next() error {
+func (iter *GalleryImageListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2846,6 +3002,13 @@ func (iter *GalleryImageListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter GalleryImageListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2865,6 +3028,11 @@ func (iter GalleryImageListIterator) Value() GalleryImage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the GalleryImageListIterator type.
+func NewGalleryImageListIterator(page GalleryImageListPage) GalleryImageListIterator {
+ return GalleryImageListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (gil GalleryImageList) IsEmpty() bool {
return gil.Value == nil || len(*gil.Value) == 0
@@ -2872,11 +3040,11 @@ func (gil GalleryImageList) IsEmpty() bool {
// galleryImageListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (gil GalleryImageList) galleryImageListPreparer() (*http.Request, error) {
+func (gil GalleryImageList) galleryImageListPreparer(ctx context.Context) (*http.Request, error) {
if gil.NextLink == nil || len(to.String(gil.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(gil.NextLink)))
@@ -2884,14 +3052,24 @@ func (gil GalleryImageList) galleryImageListPreparer() (*http.Request, error) {
// GalleryImageListPage contains a page of GalleryImage values.
type GalleryImageListPage struct {
- fn func(GalleryImageList) (GalleryImageList, error)
+ fn func(context.Context, GalleryImageList) (GalleryImageList, error)
gil GalleryImageList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *GalleryImageListPage) Next() error {
- next, err := page.fn(page.gil)
+func (page *GalleryImageListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gil)
if err != nil {
return err
}
@@ -2899,6 +3077,13 @@ func (page *GalleryImageListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page GalleryImageListPage) NotDone() bool {
return !page.gil.IsEmpty()
@@ -2917,9 +3102,14 @@ func (page GalleryImageListPage) Values() []GalleryImage {
return *page.gil.Value
}
+// Creates a new instance of the GalleryImageListPage type.
+func NewGalleryImageListPage(getNextPage func(context.Context, GalleryImageList) (GalleryImageList, error)) GalleryImageListPage {
+ return GalleryImageListPage{fn: getNextPage}
+}
+
// GalleryImageProperties describes the properties of a gallery Image Definition.
type GalleryImageProperties struct {
- // Description - The description of this gallery Image Definition resource. This property is updateable.
+ // Description - The description of this gallery Image Definition resource. This property is updatable.
Description *string `json:"description,omitempty"`
// Eula - The Eula agreement for the gallery Image Definition.
Eula *string `json:"eula,omitempty"`
@@ -2931,7 +3121,7 @@ type GalleryImageProperties struct {
OsType OperatingSystemTypes `json:"osType,omitempty"`
// OsState - The allowed values for OS State are 'Generalized'. Possible values include: 'Generalized', 'Specialized'
OsState OperatingSystemStateTypes `json:"osState,omitempty"`
- // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updateable.
+ // EndOfLifeDate - The end of life date of the gallery Image Definition. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
Identifier *GalleryImageIdentifier `json:"identifier,omitempty"`
Recommended *RecommendedMachineConfiguration `json:"recommended,omitempty"`
@@ -2941,8 +3131,8 @@ type GalleryImageProperties struct {
ProvisioningState ProvisioningState1 `json:"provisioningState,omitempty"`
}
-// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImagesCreateOrUpdateFuture struct {
azure.Future
}
@@ -2970,7 +3160,8 @@ func (future *GalleryImagesCreateOrUpdateFuture) Result(client GalleryImagesClie
return
}
-// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// GalleryImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type GalleryImagesDeleteFuture struct {
azure.Future
}
@@ -2992,7 +3183,8 @@ func (future *GalleryImagesDeleteFuture) Result(client GalleryImagesClient) (ar
return
}
-// GalleryImageVersion specifies information about the gallery Image Version that you want to create or update.
+// GalleryImageVersion specifies information about the gallery Image Version that you want to create or
+// update.
type GalleryImageVersion struct {
autorest.Response `json:"-"`
*GalleryImageVersionProperties `json:"properties,omitempty"`
@@ -3116,14 +3308,24 @@ type GalleryImageVersionListIterator struct {
page GalleryImageVersionListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *GalleryImageVersionListIterator) Next() error {
+func (iter *GalleryImageVersionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3132,6 +3334,13 @@ func (iter *GalleryImageVersionListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryImageVersionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter GalleryImageVersionListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3151,6 +3360,11 @@ func (iter GalleryImageVersionListIterator) Value() GalleryImageVersion {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the GalleryImageVersionListIterator type.
+func NewGalleryImageVersionListIterator(page GalleryImageVersionListPage) GalleryImageVersionListIterator {
+ return GalleryImageVersionListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (givl GalleryImageVersionList) IsEmpty() bool {
return givl.Value == nil || len(*givl.Value) == 0
@@ -3158,11 +3372,11 @@ func (givl GalleryImageVersionList) IsEmpty() bool {
// galleryImageVersionListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (givl GalleryImageVersionList) galleryImageVersionListPreparer() (*http.Request, error) {
+func (givl GalleryImageVersionList) galleryImageVersionListPreparer(ctx context.Context) (*http.Request, error) {
if givl.NextLink == nil || len(to.String(givl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(givl.NextLink)))
@@ -3170,14 +3384,24 @@ func (givl GalleryImageVersionList) galleryImageVersionListPreparer() (*http.Req
// GalleryImageVersionListPage contains a page of GalleryImageVersion values.
type GalleryImageVersionListPage struct {
- fn func(GalleryImageVersionList) (GalleryImageVersionList, error)
+ fn func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)
givl GalleryImageVersionList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *GalleryImageVersionListPage) Next() error {
- next, err := page.fn(page.givl)
+func (page *GalleryImageVersionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImageVersionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.givl)
if err != nil {
return err
}
@@ -3185,6 +3409,13 @@ func (page *GalleryImageVersionListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryImageVersionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page GalleryImageVersionListPage) NotDone() bool {
return !page.givl.IsEmpty()
@@ -3203,6 +3434,11 @@ func (page GalleryImageVersionListPage) Values() []GalleryImageVersion {
return *page.givl.Value
}
+// Creates a new instance of the GalleryImageVersionListPage type.
+func NewGalleryImageVersionListPage(getNextPage func(context.Context, GalleryImageVersionList) (GalleryImageVersionList, error)) GalleryImageVersionListPage {
+ return GalleryImageVersionListPage{fn: getNextPage}
+}
+
// GalleryImageVersionProperties describes the properties of a gallery Image Version.
type GalleryImageVersionProperties struct {
PublishingProfile *GalleryImageVersionPublishingProfile `json:"publishingProfile,omitempty"`
@@ -3214,15 +3450,15 @@ type GalleryImageVersionProperties struct {
// GalleryImageVersionPublishingProfile the publishing profile of a gallery Image Version.
type GalleryImageVersionPublishingProfile struct {
- // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updateable.
+ // ReplicaCount - The number of replicas of the Image Version to be created per region. This property would take effect for a region when regionalReplicaCount is not specified. This property is updatable.
ReplicaCount *int32 `json:"replicaCount,omitempty"`
// ExcludeFromLatest - If set to true, Virtual Machines deployed from the latest version of the Image Definition won't use this Image Version.
ExcludeFromLatest *bool `json:"excludeFromLatest,omitempty"`
// PublishedDate - The timestamp for when the gallery Image Version is published.
PublishedDate *date.Time `json:"publishedDate,omitempty"`
- // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updateable.
+ // EndOfLifeDate - The end of life date of the gallery Image Version. This property can be used for decommissioning purposes. This property is updatable.
EndOfLifeDate *date.Time `json:"endOfLifeDate,omitempty"`
- // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updateable.
+ // TargetRegions - The target regions where the Image Version is going to be replicated to. This property is updatable.
TargetRegions *[]TargetRegion `json:"targetRegions,omitempty"`
Source *GalleryArtifactSource `json:"source,omitempty"`
}
@@ -3256,8 +3492,8 @@ func (future *GalleryImageVersionsCreateOrUpdateFuture) Result(client GalleryIma
return
}
-// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// GalleryImageVersionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type GalleryImageVersionsDeleteFuture struct {
azure.Future
}
@@ -3301,14 +3537,24 @@ type GalleryListIterator struct {
page GalleryListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *GalleryListIterator) Next() error {
+func (iter *GalleryListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3317,6 +3563,13 @@ func (iter *GalleryListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GalleryListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter GalleryListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3336,6 +3589,11 @@ func (iter GalleryListIterator) Value() Gallery {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the GalleryListIterator type.
+func NewGalleryListIterator(page GalleryListPage) GalleryListIterator {
+ return GalleryListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (gl GalleryList) IsEmpty() bool {
return gl.Value == nil || len(*gl.Value) == 0
@@ -3343,11 +3601,11 @@ func (gl GalleryList) IsEmpty() bool {
// galleryListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (gl GalleryList) galleryListPreparer() (*http.Request, error) {
+func (gl GalleryList) galleryListPreparer(ctx context.Context) (*http.Request, error) {
if gl.NextLink == nil || len(to.String(gl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(gl.NextLink)))
@@ -3355,14 +3613,24 @@ func (gl GalleryList) galleryListPreparer() (*http.Request, error) {
// GalleryListPage contains a page of Gallery values.
type GalleryListPage struct {
- fn func(GalleryList) (GalleryList, error)
+ fn func(context.Context, GalleryList) (GalleryList, error)
gl GalleryList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *GalleryListPage) Next() error {
- next, err := page.fn(page.gl)
+func (page *GalleryListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gl)
if err != nil {
return err
}
@@ -3370,6 +3638,13 @@ func (page *GalleryListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GalleryListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page GalleryListPage) NotDone() bool {
return !page.gl.IsEmpty()
@@ -3388,6 +3663,11 @@ func (page GalleryListPage) Values() []Gallery {
return *page.gl.Value
}
+// Creates a new instance of the GalleryListPage type.
+func NewGalleryListPage(getNextPage func(context.Context, GalleryList) (GalleryList, error)) GalleryListPage {
+ return GalleryListPage{fn: getNextPage}
+}
+
// GalleryOSDiskImage this is the OS disk image.
type GalleryOSDiskImage struct {
// SizeInGB - This property indicates the size of the VHD to be created.
@@ -3398,7 +3678,7 @@ type GalleryOSDiskImage struct {
// GalleryProperties describes the properties of a Shared Image Gallery.
type GalleryProperties struct {
- // Description - The description of this Shared Image Gallery resource. This property is updateable.
+ // Description - The description of this Shared Image Gallery resource. This property is updatable.
Description *string `json:"description,omitempty"`
Identifier *GalleryIdentifier `json:"identifier,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response. Possible values include: 'ProvisioningStateCreating', 'ProvisioningStateUpdating', 'ProvisioningStateFailed', 'ProvisioningStateSucceeded', 'ProvisioningStateDeleting', 'ProvisioningStateMigrating'
@@ -3419,8 +3699,9 @@ type HardwareProfile struct {
VMSize VirtualMachineSizeTypes `json:"vmSize,omitempty"`
}
-// Image the source user image virtual hard disk. The virtual hard disk will be copied before being attached to the
-// virtual machine. If SourceImage is provided, the destination virtual hard drive must not exist.
+// Image the source user image virtual hard disk. The virtual hard disk will be copied before being
+// attached to the virtual machine. If SourceImage is provided, the destination virtual hard drive must not
+// exist.
type Image struct {
autorest.Response `json:"-"`
*ImageProperties `json:"properties,omitempty"`
@@ -3549,7 +3830,7 @@ type ImageDataDisk struct {
// ImageDiskReference the source image used for creating the disk.
type ImageDiskReference struct {
- // ID - A relative uri containing either a Platform Imgage Repository or user image reference.
+ // ID - A relative uri containing either a Platform Image Repository or user image reference.
ID *string `json:"id,omitempty"`
// Lun - If the disk is created from an image's data disk, this is an index that indicates which of the data disks in the image to use. For OS disks, this field is null.
Lun *int32 `json:"lun,omitempty"`
@@ -3570,14 +3851,24 @@ type ImageListResultIterator struct {
page ImageListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ImageListResultIterator) Next() error {
+func (iter *ImageListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3586,6 +3877,13 @@ func (iter *ImageListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ImageListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ImageListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3605,6 +3903,11 @@ func (iter ImageListResultIterator) Value() Image {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ImageListResultIterator type.
+func NewImageListResultIterator(page ImageListResultPage) ImageListResultIterator {
+ return ImageListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ilr ImageListResult) IsEmpty() bool {
return ilr.Value == nil || len(*ilr.Value) == 0
@@ -3612,11 +3915,11 @@ func (ilr ImageListResult) IsEmpty() bool {
// imageListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ilr ImageListResult) imageListResultPreparer() (*http.Request, error) {
+func (ilr ImageListResult) imageListResultPreparer(ctx context.Context) (*http.Request, error) {
if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ilr.NextLink)))
@@ -3624,14 +3927,24 @@ func (ilr ImageListResult) imageListResultPreparer() (*http.Request, error) {
// ImageListResultPage contains a page of Image values.
type ImageListResultPage struct {
- fn func(ImageListResult) (ImageListResult, error)
+ fn func(context.Context, ImageListResult) (ImageListResult, error)
ilr ImageListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ImageListResultPage) Next() error {
- next, err := page.fn(page.ilr)
+func (page *ImageListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ImageListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ilr)
if err != nil {
return err
}
@@ -3639,6 +3952,13 @@ func (page *ImageListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ImageListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ImageListResultPage) NotDone() bool {
return !page.ilr.IsEmpty()
@@ -3657,6 +3977,11 @@ func (page ImageListResultPage) Values() []Image {
return *page.ilr.Value
}
+// Creates a new instance of the ImageListResultPage type.
+func NewImageListResultPage(getNextPage func(context.Context, ImageListResult) (ImageListResult, error)) ImageListResultPage {
+ return ImageListResultPage{fn: getNextPage}
+}
+
// ImageOSDisk describes an Operating System disk.
type ImageOSDisk struct {
// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from a custom image.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
@@ -3687,7 +4012,8 @@ type ImageProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace images.
+// ImagePurchasePlan describes the gallery Image Definition purchase plan. This is used by marketplace
+// images.
type ImagePurchasePlan struct {
// Name - The plan ID.
Name *string `json:"name,omitempty"`
@@ -3697,9 +4023,10 @@ type ImagePurchasePlan struct {
Product *string `json:"product,omitempty"`
}
-// ImageReference specifies information about the image to use. You can specify information about platform images,
-// marketplace images, or virtual machine images. This element is required when you want to use a platform image,
-// marketplace image, or virtual machine image, but is not used in other creation operations.
+// ImageReference specifies information about the image to use. You can specify information about platform
+// images, marketplace images, or virtual machine images. This element is required when you want to use a
+// platform image, marketplace image, or virtual machine image, but is not used in other creation
+// operations.
type ImageReference struct {
// Publisher - The image publisher.
Publisher *string `json:"publisher,omitempty"`
@@ -3713,7 +4040,8 @@ type ImageReference struct {
ID *string `json:"id,omitempty"`
}
-// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ImagesCreateOrUpdateFuture struct {
azure.Future
}
@@ -3875,8 +4203,8 @@ type InstanceViewStatus struct {
Time *date.Time `json:"time,omitempty"`
}
-// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to
-// unwrap the encryptionKey
+// KeyVaultAndKeyReference key Vault Key Url and vault id of KeK, KeK is optional and when provided is used
+// to unwrap the encryptionKey
type KeyVaultAndKeyReference struct {
// SourceVault - Resource id of the KeyVault containing the key or secret
SourceVault *SourceVault `json:"sourceVault,omitempty"`
@@ -3908,8 +4236,8 @@ type KeyVaultSecretReference struct {
SourceVault *SubResource `json:"sourceVault,omitempty"`
}
-// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.
For a list of
-// supported Linux distributions, see [Linux on Azure-Endorsed
+// LinuxConfiguration specifies the Linux operating system settings on the virtual machine.
For a
+// list of supported Linux distributions, see [Linux on Azure-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-endorsed-distros?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json)
//
For running non-endorsed distributions, see [Information for Non-Endorsed
// Distributions](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-linux-create-upload-generic?toc=%2fazure%2fvirtual-machines%2flinux%2ftoc.json).
@@ -3937,14 +4265,24 @@ type ListUsagesResultIterator struct {
page ListUsagesResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListUsagesResultIterator) Next() error {
+func (iter *ListUsagesResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3953,6 +4291,13 @@ func (iter *ListUsagesResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListUsagesResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListUsagesResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3972,6 +4317,11 @@ func (iter ListUsagesResultIterator) Value() Usage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListUsagesResultIterator type.
+func NewListUsagesResultIterator(page ListUsagesResultPage) ListUsagesResultIterator {
+ return ListUsagesResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lur ListUsagesResult) IsEmpty() bool {
return lur.Value == nil || len(*lur.Value) == 0
@@ -3979,11 +4329,11 @@ func (lur ListUsagesResult) IsEmpty() bool {
// listUsagesResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lur ListUsagesResult) listUsagesResultPreparer() (*http.Request, error) {
+func (lur ListUsagesResult) listUsagesResultPreparer(ctx context.Context) (*http.Request, error) {
if lur.NextLink == nil || len(to.String(lur.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lur.NextLink)))
@@ -3991,14 +4341,24 @@ func (lur ListUsagesResult) listUsagesResultPreparer() (*http.Request, error) {
// ListUsagesResultPage contains a page of Usage values.
type ListUsagesResultPage struct {
- fn func(ListUsagesResult) (ListUsagesResult, error)
+ fn func(context.Context, ListUsagesResult) (ListUsagesResult, error)
lur ListUsagesResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListUsagesResultPage) Next() error {
- next, err := page.fn(page.lur)
+func (page *ListUsagesResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListUsagesResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lur)
if err != nil {
return err
}
@@ -4006,6 +4366,13 @@ func (page *ListUsagesResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListUsagesResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListUsagesResultPage) NotDone() bool {
return !page.lur.IsEmpty()
@@ -4024,6 +4391,11 @@ func (page ListUsagesResultPage) Values() []Usage {
return *page.lur.Value
}
+// Creates a new instance of the ListUsagesResultPage type.
+func NewListUsagesResultPage(getNextPage func(context.Context, ListUsagesResult) (ListUsagesResult, error)) ListUsagesResultPage {
+ return ListUsagesResultPage{fn: getNextPage}
+}
+
// ListVirtualMachineExtensionImage ...
type ListVirtualMachineExtensionImage struct {
autorest.Response `json:"-"`
@@ -4036,8 +4408,8 @@ type ListVirtualMachineImageResource struct {
Value *[]VirtualMachineImageResource `json:"value,omitempty"`
}
-// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// LogAnalyticsExportRequestRateByIntervalFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type LogAnalyticsExportRequestRateByIntervalFuture struct {
azure.Future
}
@@ -4104,7 +4476,7 @@ type LogAnalyticsInputBase struct {
ToTime *date.Time `json:"toTime,omitempty"`
// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
- // GroupByOperationName - Group query result by by Operation Name.
+ // GroupByOperationName - Group query result by Operation Name.
GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
// GroupByResourceName - Group query result by Resource Name.
GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
@@ -4304,8 +4676,8 @@ type OperationValueDisplay struct {
Provider *string `json:"provider,omitempty"`
}
-// OSDisk specifies information about the operating system disk used by the virtual machine.
For more
-// information about disks, see [About disks and VHDs for Azure virtual
+// OSDisk specifies information about the operating system disk used by the virtual machine.
For
+// more information about disks, see [About disks and VHDs for Azure virtual
// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-about-disks-vhds?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
type OSDisk struct {
// OsType - This property allows you to specify the type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Possible values are:
**Windows**
**Linux**. Possible values include: 'Windows', 'Linux'
@@ -4322,7 +4694,7 @@ type OSDisk struct {
Caching CachingTypes `json:"caching,omitempty"`
// WriteAcceleratorEnabled - Specifies whether writeAccelerator should be enabled or disabled on the disk.
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
- // DiffDiskSettings - Specifies the differencing Disk Settings for the operating system disk used by the virtual machine.
+ // DiffDiskSettings - Specifies the ephemeral Disk Settings for the operating system disk used by the virtual machine.
DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
// CreateOption - Specifies how the virtual machine should be created.
Possible values are:
**Attach** \u2013 This value is used when you are using a specialized disk to create the virtual machine.
**FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
@@ -4358,10 +4730,11 @@ type OSProfile struct {
AllowExtensionOperations *bool `json:"allowExtensionOperations,omitempty"`
}
-// Plan specifies information about the marketplace image used to create the virtual machine. This element is only
-// used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for
-// programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to
-// deploy programmatically, Get Started ->**. Enter any required information and then click **Save**.
+// Plan specifies information about the marketplace image used to create the virtual machine. This element
+// is only used for marketplace images. Before you can use a marketplace image from an API, you must enable
+// the image for programmatic use. In the Azure portal, find the marketplace image that you want to use
+// and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and
+// then click **Save**.
type Plan struct {
// Name - The plan ID.
Name *string `json:"name,omitempty"`
@@ -4383,8 +4756,8 @@ type PurchasePlan struct {
Product *string `json:"product,omitempty"`
}
-// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this Image
-// Definition. These properties are updateable.
+// RecommendedMachineConfiguration the properties describe the recommended machine configuration for this
+// Image Definition. These properties are updatable.
type RecommendedMachineConfiguration struct {
VCPUs *ResourceRange `json:"vCPUs,omitempty"`
Memory *ResourceRange `json:"memory,omitempty"`
@@ -4431,7 +4804,7 @@ type RequestRateByIntervalInput struct {
ToTime *date.Time `json:"toTime,omitempty"`
// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
- // GroupByOperationName - Group query result by by Operation Name.
+ // GroupByOperationName - Group query result by Operation Name.
GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
// GroupByResourceName - Group query result by Resource Name.
GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
@@ -4510,7 +4883,7 @@ type ResourceSku struct {
Restrictions *[]ResourceSkuRestrictions `json:"restrictions,omitempty"`
}
-// ResourceSkuCapabilities describes The SKU capabilites object.
+// ResourceSkuCapabilities describes The SKU capabilities object.
type ResourceSkuCapabilities struct {
// Name - An invariant to describe the feature.
Name *string `json:"name,omitempty"`
@@ -4583,14 +4956,24 @@ type ResourceSkusResultIterator struct {
page ResourceSkusResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceSkusResultIterator) Next() error {
+func (iter *ResourceSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4599,6 +4982,13 @@ func (iter *ResourceSkusResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceSkusResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4618,6 +5008,11 @@ func (iter ResourceSkusResultIterator) Value() ResourceSku {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceSkusResultIterator type.
+func NewResourceSkusResultIterator(page ResourceSkusResultPage) ResourceSkusResultIterator {
+ return ResourceSkusResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rsr ResourceSkusResult) IsEmpty() bool {
return rsr.Value == nil || len(*rsr.Value) == 0
@@ -4625,11 +5020,11 @@ func (rsr ResourceSkusResult) IsEmpty() bool {
// resourceSkusResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rsr ResourceSkusResult) resourceSkusResultPreparer() (*http.Request, error) {
+func (rsr ResourceSkusResult) resourceSkusResultPreparer(ctx context.Context) (*http.Request, error) {
if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rsr.NextLink)))
@@ -4637,14 +5032,24 @@ func (rsr ResourceSkusResult) resourceSkusResultPreparer() (*http.Request, error
// ResourceSkusResultPage contains a page of ResourceSku values.
type ResourceSkusResultPage struct {
- fn func(ResourceSkusResult) (ResourceSkusResult, error)
+ fn func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)
rsr ResourceSkusResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceSkusResultPage) Next() error {
- next, err := page.fn(page.rsr)
+func (page *ResourceSkusResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rsr)
if err != nil {
return err
}
@@ -4652,6 +5057,13 @@ func (page *ResourceSkusResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceSkusResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceSkusResultPage) NotDone() bool {
return !page.rsr.IsEmpty()
@@ -4670,6 +5082,11 @@ func (page ResourceSkusResultPage) Values() []ResourceSku {
return *page.rsr.Value
}
+// Creates a new instance of the ResourceSkusResultPage type.
+func NewResourceSkusResultPage(getNextPage func(context.Context, ResourceSkusResult) (ResourceSkusResult, error)) ResourceSkusResultPage {
+ return ResourceSkusResultPage{fn: getNextPage}
+}
+
// RollbackStatusInfo information about rollback on failed VM instances after a OS Upgrade operation.
type RollbackStatusInfo struct {
// SuccessfullyRolledbackInstanceCount - The number of instances which have been successfully rolled back.
@@ -4692,7 +5109,8 @@ type RollingUpgradePolicy struct {
PauseTimeBetweenBatches *string `json:"pauseTimeBetweenBatches,omitempty"`
}
-// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade state.
+// RollingUpgradeProgressInfo information about the number of virtual machine instances in each upgrade
+// state.
type RollingUpgradeProgressInfo struct {
// SuccessfulInstanceCount - The number of instances that have been successfully upgraded.
SuccessfulInstanceCount *int32 `json:"successfulInstanceCount,omitempty"`
@@ -4903,14 +5321,24 @@ type RunCommandListResultIterator struct {
page RunCommandListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RunCommandListResultIterator) Next() error {
+func (iter *RunCommandListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4919,6 +5347,13 @@ func (iter *RunCommandListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RunCommandListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RunCommandListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4938,6 +5373,11 @@ func (iter RunCommandListResultIterator) Value() RunCommandDocumentBase {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RunCommandListResultIterator type.
+func NewRunCommandListResultIterator(page RunCommandListResultPage) RunCommandListResultIterator {
+ return RunCommandListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rclr RunCommandListResult) IsEmpty() bool {
return rclr.Value == nil || len(*rclr.Value) == 0
@@ -4945,11 +5385,11 @@ func (rclr RunCommandListResult) IsEmpty() bool {
// runCommandListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rclr RunCommandListResult) runCommandListResultPreparer() (*http.Request, error) {
+func (rclr RunCommandListResult) runCommandListResultPreparer(ctx context.Context) (*http.Request, error) {
if rclr.NextLink == nil || len(to.String(rclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rclr.NextLink)))
@@ -4957,14 +5397,24 @@ func (rclr RunCommandListResult) runCommandListResultPreparer() (*http.Request,
// RunCommandListResultPage contains a page of RunCommandDocumentBase values.
type RunCommandListResultPage struct {
- fn func(RunCommandListResult) (RunCommandListResult, error)
+ fn func(context.Context, RunCommandListResult) (RunCommandListResult, error)
rclr RunCommandListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RunCommandListResultPage) Next() error {
- next, err := page.fn(page.rclr)
+func (page *RunCommandListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RunCommandListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rclr)
if err != nil {
return err
}
@@ -4972,6 +5422,13 @@ func (page *RunCommandListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RunCommandListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RunCommandListResultPage) NotDone() bool {
return !page.rclr.IsEmpty()
@@ -4990,6 +5447,11 @@ func (page RunCommandListResultPage) Values() []RunCommandDocumentBase {
return *page.rclr.Value
}
+// Creates a new instance of the RunCommandListResultPage type.
+func NewRunCommandListResultPage(getNextPage func(context.Context, RunCommandListResult) (RunCommandListResult, error)) RunCommandListResultPage {
+ return RunCommandListResultPage{fn: getNextPage}
+}
+
// RunCommandParameterDefinition describes the properties of a run command parameter.
type RunCommandParameterDefinition struct {
// Name - The run command parameter name.
@@ -5170,14 +5632,24 @@ type SnapshotListIterator struct {
page SnapshotListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SnapshotListIterator) Next() error {
+func (iter *SnapshotListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5186,6 +5658,13 @@ func (iter *SnapshotListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SnapshotListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SnapshotListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5205,6 +5684,11 @@ func (iter SnapshotListIterator) Value() Snapshot {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SnapshotListIterator type.
+func NewSnapshotListIterator(page SnapshotListPage) SnapshotListIterator {
+ return SnapshotListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sl SnapshotList) IsEmpty() bool {
return sl.Value == nil || len(*sl.Value) == 0
@@ -5212,11 +5696,11 @@ func (sl SnapshotList) IsEmpty() bool {
// snapshotListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sl SnapshotList) snapshotListPreparer() (*http.Request, error) {
+func (sl SnapshotList) snapshotListPreparer(ctx context.Context) (*http.Request, error) {
if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sl.NextLink)))
@@ -5224,14 +5708,24 @@ func (sl SnapshotList) snapshotListPreparer() (*http.Request, error) {
// SnapshotListPage contains a page of Snapshot values.
type SnapshotListPage struct {
- fn func(SnapshotList) (SnapshotList, error)
+ fn func(context.Context, SnapshotList) (SnapshotList, error)
sl SnapshotList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SnapshotListPage) Next() error {
- next, err := page.fn(page.sl)
+func (page *SnapshotListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sl)
if err != nil {
return err
}
@@ -5239,6 +5733,13 @@ func (page *SnapshotListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SnapshotListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SnapshotListPage) NotDone() bool {
return !page.sl.IsEmpty()
@@ -5257,6 +5758,11 @@ func (page SnapshotListPage) Values() []Snapshot {
return *page.sl.Value
}
+// Creates a new instance of the SnapshotListPage type.
+func NewSnapshotListPage(getNextPage func(context.Context, SnapshotList) (SnapshotList, error)) SnapshotListPage {
+ return SnapshotListPage{fn: getNextPage}
+}
+
// SnapshotProperties snapshot resource properties.
type SnapshotProperties struct {
// TimeCreated - The time when the disk was created.
@@ -5302,7 +5808,8 @@ func (future *SnapshotsCreateOrUpdateFuture) Result(client SnapshotsClient) (s S
return
}
-// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SnapshotsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsDeleteFuture struct {
azure.Future
}
@@ -5324,7 +5831,8 @@ func (future *SnapshotsDeleteFuture) Result(client SnapshotsClient) (ar autorest
return
}
-// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SnapshotsGrantAccessFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsGrantAccessFuture struct {
azure.Future
}
@@ -5383,7 +5891,8 @@ func (future *SnapshotsRevokeAccessFuture) Result(client SnapshotsClient) (ar au
return
}
-// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SnapshotsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SnapshotsUpdateFuture struct {
azure.Future
}
@@ -5486,7 +5995,7 @@ type SnapshotUpdateProperties struct {
EncryptionSettings *EncryptionSettings `json:"encryptionSettings,omitempty"`
}
-// SourceVault the vault id is an Azure Resource Manager Resoure id in the form
+// SourceVault the vault id is an Azure Resource Manager Resource id in the form
// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}
type SourceVault struct {
// ID - Resource Id
@@ -5499,8 +6008,8 @@ type SSHConfiguration struct {
PublicKeys *[]SSHPublicKey `json:"publicKeys,omitempty"`
}
-// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where the public
-// key is placed.
+// SSHPublicKey contains information about SSH certificate public key and the path on the Linux VM where
+// the public key is placed.
type SSHPublicKey struct {
// Path - Specifies the full path on the created VM where ssh public key is stored. If the file already exists, the specified key is appended to the file. Example: /home/user/.ssh/authorized_keys
Path *string `json:"path,omitempty"`
@@ -5534,7 +6043,7 @@ type SubResourceReadOnly struct {
type TargetRegion struct {
// Name - The name of the region.
Name *string `json:"name,omitempty"`
- // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updateable.
+ // RegionalReplicaCount - The number of replicas of the Image Version to be created per region. This property is updatable.
RegionalReplicaCount *int32 `json:"regionalReplicaCount,omitempty"`
}
@@ -5548,7 +6057,7 @@ type ThrottledRequestsInput struct {
ToTime *date.Time `json:"toTime,omitempty"`
// GroupByThrottlePolicy - Group query result by Throttle Policy applied.
GroupByThrottlePolicy *bool `json:"groupByThrottlePolicy,omitempty"`
- // GroupByOperationName - Group query result by by Operation Name.
+ // GroupByOperationName - Group query result by Operation Name.
GroupByOperationName *bool `json:"groupByOperationName,omitempty"`
// GroupByResourceName - Group query result by Resource Name.
GroupByResourceName *bool `json:"groupByResourceName,omitempty"`
@@ -5579,11 +6088,12 @@ type UpgradeOperationHistoricalStatusInfo struct {
Location *string `json:"location,omitempty"`
}
-// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale Set.
+// UpgradeOperationHistoricalStatusInfoProperties describes each OS upgrade on the Virtual Machine Scale
+// Set.
type UpgradeOperationHistoricalStatusInfoProperties struct {
// RunningStatus - Information about the overall status of the upgrade operation.
RunningStatus *UpgradeOperationHistoryStatus `json:"runningStatus,omitempty"`
- // Progress - Counts of the VM's in each state.
+ // Progress - Counts of the VMs in each state.
Progress *RollingUpgradeProgressInfo `json:"progress,omitempty"`
// Error - Error Details for this upgrade if there are any.
Error *APIError `json:"error,omitempty"`
@@ -5637,12 +6147,12 @@ type UsageName struct {
LocalizedValue *string `json:"localizedValue,omitempty"`
}
-// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate should
-// reside on the VM.
+// VaultCertificate describes a single certificate reference in a Key Vault, and where the certificate
+// should reside on the VM.
type VaultCertificate struct {
// CertificateURL - This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). In this case, your certificate needs to be It is the Base64 encoding of the following JSON Object which is encoded in UTF-8:
{ "data":"", "dataType":"pfx", "password":"" }
CertificateURL *string `json:"certificateUrl,omitempty"`
- // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.
For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted.
+ // CertificateStore - For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account.
For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name .crt for the X509 certificate file and .prv for private key. Both of these files are .pem formatted.
CertificateStore *string `json:"certificateStore,omitempty"`
}
@@ -6138,8 +6648,8 @@ type VirtualMachineExtensionProperties struct {
InstanceView *VirtualMachineExtensionInstanceView `json:"instanceView,omitempty"`
}
-// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineExtensionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -6167,8 +6677,8 @@ func (future *VirtualMachineExtensionsCreateOrUpdateFuture) Result(client Virtua
return
}
-// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineExtensionsDeleteFuture struct {
azure.Future
}
@@ -6197,8 +6707,8 @@ type VirtualMachineExtensionsListResult struct {
Value *[]VirtualMachineExtension `json:"value,omitempty"`
}
-// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineExtensionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineExtensionsUpdateFuture struct {
azure.Future
}
@@ -6495,7 +7005,7 @@ type VirtualMachineInstanceView struct {
Disks *[]DiskInstanceView `json:"disks,omitempty"`
// Extensions - The extensions information.
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -6516,14 +7026,24 @@ type VirtualMachineListResultIterator struct {
page VirtualMachineListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineListResultIterator) Next() error {
+func (iter *VirtualMachineListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6532,6 +7052,13 @@ func (iter *VirtualMachineListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6551,6 +7078,11 @@ func (iter VirtualMachineListResultIterator) Value() VirtualMachine {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineListResultIterator type.
+func NewVirtualMachineListResultIterator(page VirtualMachineListResultPage) VirtualMachineListResultIterator {
+ return VirtualMachineListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmlr VirtualMachineListResult) IsEmpty() bool {
return vmlr.Value == nil || len(*vmlr.Value) == 0
@@ -6558,11 +7090,11 @@ func (vmlr VirtualMachineListResult) IsEmpty() bool {
// virtualMachineListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer() (*http.Request, error) {
+func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer(ctx context.Context) (*http.Request, error) {
if vmlr.NextLink == nil || len(to.String(vmlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmlr.NextLink)))
@@ -6570,14 +7102,24 @@ func (vmlr VirtualMachineListResult) virtualMachineListResultPreparer() (*http.R
// VirtualMachineListResultPage contains a page of VirtualMachine values.
type VirtualMachineListResultPage struct {
- fn func(VirtualMachineListResult) (VirtualMachineListResult, error)
+ fn func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)
vmlr VirtualMachineListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineListResultPage) Next() error {
- next, err := page.fn(page.vmlr)
+func (page *VirtualMachineListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmlr)
if err != nil {
return err
}
@@ -6585,6 +7127,13 @@ func (page *VirtualMachineListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineListResultPage) NotDone() bool {
return !page.vmlr.IsEmpty()
@@ -6603,6 +7152,11 @@ func (page VirtualMachineListResultPage) Values() []VirtualMachine {
return *page.vmlr.Value
}
+// Creates a new instance of the VirtualMachineListResultPage type.
+func NewVirtualMachineListResultPage(getNextPage func(context.Context, VirtualMachineListResult) (VirtualMachineListResult, error)) VirtualMachineListResultPage {
+ return VirtualMachineListResultPage{fn: getNextPage}
+}
+
// VirtualMachineProperties describes the properties of a Virtual Machine.
type VirtualMachineProperties struct {
// HardwareProfile - Specifies the hardware settings for the virtual machine.
@@ -6617,7 +7171,7 @@ type VirtualMachineProperties struct {
NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
// DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
- // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
+ // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
@@ -6629,6 +7183,13 @@ type VirtualMachineProperties struct {
VMID *string `json:"vmId,omitempty"`
}
+// VirtualMachineReimageParameters parameters for Reimaging Virtual Machine. Default value for OSDisk :
+// true.
+type VirtualMachineReimageParameters struct {
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
// VirtualMachineScaleSet describes a Virtual Machine Scale Set.
type VirtualMachineScaleSet struct {
autorest.Response `json:"-"`
@@ -6895,14 +7456,24 @@ type VirtualMachineScaleSetExtensionListResultIterator struct {
page VirtualMachineScaleSetExtensionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6911,6 +7482,13 @@ func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetExtensionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetExtensionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6930,6 +7508,11 @@ func (iter VirtualMachineScaleSetExtensionListResultIterator) Value() VirtualMac
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetExtensionListResultIterator type.
+func NewVirtualMachineScaleSetExtensionListResultIterator(page VirtualMachineScaleSetExtensionListResultPage) VirtualMachineScaleSetExtensionListResultIterator {
+ return VirtualMachineScaleSetExtensionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
return vmsselr.Value == nil || len(*vmsselr.Value) == 0
@@ -6937,11 +7520,11 @@ func (vmsselr VirtualMachineScaleSetExtensionListResult) IsEmpty() bool {
// virtualMachineScaleSetExtensionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer() (*http.Request, error) {
+func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetExtensionListResultPreparer(ctx context.Context) (*http.Request, error) {
if vmsselr.NextLink == nil || len(to.String(vmsselr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmsselr.NextLink)))
@@ -6949,14 +7532,24 @@ func (vmsselr VirtualMachineScaleSetExtensionListResult) virtualMachineScaleSetE
// VirtualMachineScaleSetExtensionListResultPage contains a page of VirtualMachineScaleSetExtension values.
type VirtualMachineScaleSetExtensionListResultPage struct {
- fn func(VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
+ fn func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)
vmsselr VirtualMachineScaleSetExtensionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
- next, err := page.fn(page.vmsselr)
+func (page *VirtualMachineScaleSetExtensionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsselr)
if err != nil {
return err
}
@@ -6964,6 +7557,13 @@ func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetExtensionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetExtensionListResultPage) NotDone() bool {
return !page.vmsselr.IsEmpty()
@@ -6982,13 +7582,19 @@ func (page VirtualMachineScaleSetExtensionListResultPage) Values() []VirtualMach
return *page.vmsselr.Value
}
+// Creates a new instance of the VirtualMachineScaleSetExtensionListResultPage type.
+func NewVirtualMachineScaleSetExtensionListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetExtensionListResult) (VirtualMachineScaleSetExtensionListResult, error)) VirtualMachineScaleSetExtensionListResultPage {
+ return VirtualMachineScaleSetExtensionListResultPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetExtensionProfile describes a virtual machine scale set extension profile.
type VirtualMachineScaleSetExtensionProfile struct {
// Extensions - The virtual machine scale set child extension resources.
Extensions *[]VirtualMachineScaleSetExtension `json:"extensions,omitempty"`
}
-// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set Extension.
+// VirtualMachineScaleSetExtensionProperties describes the properties of a Virtual Machine Scale Set
+// Extension.
type VirtualMachineScaleSetExtensionProperties struct {
// ForceUpdateTag - If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed.
ForceUpdateTag *string `json:"forceUpdateTag,omitempty"`
@@ -7006,10 +7612,12 @@ type VirtualMachineScaleSetExtensionProperties struct {
ProtectedSettings interface{} `json:"protectedSettings,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ProvisionAfterExtensions - Collection of extension names after which this extension needs to be provisioned.
+ ProvisionAfterExtensions *[]string `json:"provisionAfterExtensions,omitempty"`
}
-// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualMachineScaleSetExtensionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetExtensionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -7037,8 +7645,8 @@ func (future *VirtualMachineScaleSetExtensionsCreateOrUpdateFuture) Result(clien
return
}
-// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetExtensionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetExtensionsDeleteFuture struct {
azure.Future
}
@@ -7109,14 +7717,15 @@ type VirtualMachineScaleSetInstanceView struct {
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
}
-// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of a
-// virtual machine scale set.
+// VirtualMachineScaleSetInstanceViewStatusesSummary instance view statuses summary for virtual machines of
+// a virtual machine scale set.
type VirtualMachineScaleSetInstanceViewStatusesSummary struct {
// StatusesSummary - The extensions information.
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
-// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP configuration.
+// VirtualMachineScaleSetIPConfiguration describes a virtual machine scale set network profile's IP
+// configuration.
type VirtualMachineScaleSetIPConfiguration struct {
// Name - The IP configuration name.
Name *string `json:"name,omitempty"`
@@ -7182,8 +7791,8 @@ func (vmssic *VirtualMachineScaleSetIPConfiguration) UnmarshalJSON(body []byte)
return nil
}
-// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's IP
-// configuration properties.
+// VirtualMachineScaleSetIPConfigurationProperties describes a virtual machine scale set network profile's
+// IP configuration properties.
type VirtualMachineScaleSetIPConfigurationProperties struct {
// Subnet - Specifies the identifier of the subnet.
Subnet *APIEntityReference `json:"subnet,omitempty"`
@@ -7211,8 +7820,8 @@ type VirtualMachineScaleSetIPTag struct {
Tag *string `json:"tag,omitempty"`
}
-// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History operation
-// response.
+// VirtualMachineScaleSetListOSUpgradeHistory list of Virtual Machine Scale Set OS Upgrade History
+// operation response.
type VirtualMachineScaleSetListOSUpgradeHistory struct {
autorest.Response `json:"-"`
// Value - The list of OS upgrades performed on the virtual machine scale set.
@@ -7228,14 +7837,24 @@ type VirtualMachineScaleSetListOSUpgradeHistoryIterator struct {
page VirtualMachineScaleSetListOSUpgradeHistoryPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7244,6 +7863,13 @@ func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListOSUpgradeHistoryIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7263,6 +7889,11 @@ func (iter VirtualMachineScaleSetListOSUpgradeHistoryIterator) Value() UpgradeOp
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryIterator type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryIterator(page VirtualMachineScaleSetListOSUpgradeHistoryPage) VirtualMachineScaleSetListOSUpgradeHistoryIterator {
+ return VirtualMachineScaleSetListOSUpgradeHistoryIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
return vmsslouh.Value == nil || len(*vmsslouh.Value) == 0
@@ -7270,26 +7901,37 @@ func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) IsEmpty() bool {
// virtualMachineScaleSetListOSUpgradeHistoryPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer() (*http.Request, error) {
+func (vmsslouh VirtualMachineScaleSetListOSUpgradeHistory) virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx context.Context) (*http.Request, error) {
if vmsslouh.NextLink == nil || len(to.String(vmsslouh.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmsslouh.NextLink)))
}
-// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo values.
+// VirtualMachineScaleSetListOSUpgradeHistoryPage contains a page of UpgradeOperationHistoricalStatusInfo
+// values.
type VirtualMachineScaleSetListOSUpgradeHistoryPage struct {
- fn func(VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
+ fn func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)
vmsslouh VirtualMachineScaleSetListOSUpgradeHistory
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
- next, err := page.fn(page.vmsslouh)
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListOSUpgradeHistoryPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslouh)
if err != nil {
return err
}
@@ -7297,6 +7939,13 @@ func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListOSUpgradeHistoryPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) NotDone() bool {
return !page.vmsslouh.IsEmpty()
@@ -7315,6 +7964,11 @@ func (page VirtualMachineScaleSetListOSUpgradeHistoryPage) Values() []UpgradeOpe
return *page.vmsslouh.Value
}
+// Creates a new instance of the VirtualMachineScaleSetListOSUpgradeHistoryPage type.
+func NewVirtualMachineScaleSetListOSUpgradeHistoryPage(getNextPage func(context.Context, VirtualMachineScaleSetListOSUpgradeHistory) (VirtualMachineScaleSetListOSUpgradeHistory, error)) VirtualMachineScaleSetListOSUpgradeHistoryPage {
+ return VirtualMachineScaleSetListOSUpgradeHistoryPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetListResult the List Virtual Machine operation response.
type VirtualMachineScaleSetListResult struct {
autorest.Response `json:"-"`
@@ -7324,20 +7978,31 @@ type VirtualMachineScaleSetListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet values.
+// VirtualMachineScaleSetListResultIterator provides access to a complete listing of VirtualMachineScaleSet
+// values.
type VirtualMachineScaleSetListResultIterator struct {
i int
page VirtualMachineScaleSetListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
+func (iter *VirtualMachineScaleSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7346,6 +8011,13 @@ func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7365,6 +8037,11 @@ func (iter VirtualMachineScaleSetListResultIterator) Value() VirtualMachineScale
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetListResultIterator type.
+func NewVirtualMachineScaleSetListResultIterator(page VirtualMachineScaleSetListResultPage) VirtualMachineScaleSetListResultIterator {
+ return VirtualMachineScaleSetListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
return vmsslr.Value == nil || len(*vmsslr.Value) == 0
@@ -7372,11 +8049,11 @@ func (vmsslr VirtualMachineScaleSetListResult) IsEmpty() bool {
// virtualMachineScaleSetListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer() (*http.Request, error) {
+func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultPreparer(ctx context.Context) (*http.Request, error) {
if vmsslr.NextLink == nil || len(to.String(vmsslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmsslr.NextLink)))
@@ -7384,14 +8061,24 @@ func (vmsslr VirtualMachineScaleSetListResult) virtualMachineScaleSetListResultP
// VirtualMachineScaleSetListResultPage contains a page of VirtualMachineScaleSet values.
type VirtualMachineScaleSetListResultPage struct {
- fn func(VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
+ fn func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)
vmsslr VirtualMachineScaleSetListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetListResultPage) Next() error {
- next, err := page.fn(page.vmsslr)
+func (page *VirtualMachineScaleSetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslr)
if err != nil {
return err
}
@@ -7399,6 +8086,13 @@ func (page *VirtualMachineScaleSetListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetListResultPage) NotDone() bool {
return !page.vmsslr.IsEmpty()
@@ -7417,6 +8111,11 @@ func (page VirtualMachineScaleSetListResultPage) Values() []VirtualMachineScaleS
return *page.vmsslr.Value
}
+// Creates a new instance of the VirtualMachineScaleSetListResultPage type.
+func NewVirtualMachineScaleSetListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListResult) (VirtualMachineScaleSetListResult, error)) VirtualMachineScaleSetListResultPage {
+ return VirtualMachineScaleSetListResultPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetListSkusResult the Virtual Machine Scale Set List Skus operation response.
type VirtualMachineScaleSetListSkusResult struct {
autorest.Response `json:"-"`
@@ -7426,21 +8125,31 @@ type VirtualMachineScaleSetListSkusResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of VirtualMachineScaleSetSku
-// values.
+// VirtualMachineScaleSetListSkusResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetSku values.
type VirtualMachineScaleSetListSkusResultIterator struct {
i int
page VirtualMachineScaleSetListSkusResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
+func (iter *VirtualMachineScaleSetListSkusResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7449,6 +8158,13 @@ func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListSkusResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetListSkusResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7468,6 +8184,11 @@ func (iter VirtualMachineScaleSetListSkusResultIterator) Value() VirtualMachineS
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetListSkusResultIterator type.
+func NewVirtualMachineScaleSetListSkusResultIterator(page VirtualMachineScaleSetListSkusResultPage) VirtualMachineScaleSetListSkusResultIterator {
+ return VirtualMachineScaleSetListSkusResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
return vmsslsr.Value == nil || len(*vmsslsr.Value) == 0
@@ -7475,11 +8196,11 @@ func (vmsslsr VirtualMachineScaleSetListSkusResult) IsEmpty() bool {
// virtualMachineScaleSetListSkusResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer() (*http.Request, error) {
+func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSkusResultPreparer(ctx context.Context) (*http.Request, error) {
if vmsslsr.NextLink == nil || len(to.String(vmsslsr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmsslsr.NextLink)))
@@ -7487,14 +8208,24 @@ func (vmsslsr VirtualMachineScaleSetListSkusResult) virtualMachineScaleSetListSk
// VirtualMachineScaleSetListSkusResultPage contains a page of VirtualMachineScaleSetSku values.
type VirtualMachineScaleSetListSkusResultPage struct {
- fn func(VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
+ fn func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)
vmsslsr VirtualMachineScaleSetListSkusResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
- next, err := page.fn(page.vmsslsr)
+func (page *VirtualMachineScaleSetListSkusResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListSkusResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslsr)
if err != nil {
return err
}
@@ -7502,6 +8233,13 @@ func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListSkusResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetListSkusResultPage) NotDone() bool {
return !page.vmsslsr.IsEmpty()
@@ -7520,6 +8258,11 @@ func (page VirtualMachineScaleSetListSkusResultPage) Values() []VirtualMachineSc
return *page.vmsslsr.Value
}
+// Creates a new instance of the VirtualMachineScaleSetListSkusResultPage type.
+func NewVirtualMachineScaleSetListSkusResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListSkusResult) (VirtualMachineScaleSetListSkusResult, error)) VirtualMachineScaleSetListSkusResultPage {
+ return VirtualMachineScaleSetListSkusResultPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetListWithLinkResult the List Virtual Machine operation response.
type VirtualMachineScaleSetListWithLinkResult struct {
autorest.Response `json:"-"`
@@ -7529,21 +8272,31 @@ type VirtualMachineScaleSetListWithLinkResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of VirtualMachineScaleSet
-// values.
+// VirtualMachineScaleSetListWithLinkResultIterator provides access to a complete listing of
+// VirtualMachineScaleSet values.
type VirtualMachineScaleSetListWithLinkResultIterator struct {
i int
page VirtualMachineScaleSetListWithLinkResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
+func (iter *VirtualMachineScaleSetListWithLinkResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7552,6 +8305,13 @@ func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetListWithLinkResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetListWithLinkResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7571,6 +8331,11 @@ func (iter VirtualMachineScaleSetListWithLinkResultIterator) Value() VirtualMach
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultIterator type.
+func NewVirtualMachineScaleSetListWithLinkResultIterator(page VirtualMachineScaleSetListWithLinkResultPage) VirtualMachineScaleSetListWithLinkResultIterator {
+ return VirtualMachineScaleSetListWithLinkResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
return vmsslwlr.Value == nil || len(*vmsslwlr.Value) == 0
@@ -7578,11 +8343,11 @@ func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) IsEmpty() bool {
// virtualMachineScaleSetListWithLinkResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer() (*http.Request, error) {
+func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetListWithLinkResultPreparer(ctx context.Context) (*http.Request, error) {
if vmsslwlr.NextLink == nil || len(to.String(vmsslwlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmsslwlr.NextLink)))
@@ -7590,14 +8355,24 @@ func (vmsslwlr VirtualMachineScaleSetListWithLinkResult) virtualMachineScaleSetL
// VirtualMachineScaleSetListWithLinkResultPage contains a page of VirtualMachineScaleSet values.
type VirtualMachineScaleSetListWithLinkResultPage struct {
- fn func(VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
+ fn func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)
vmsslwlr VirtualMachineScaleSetListWithLinkResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
- next, err := page.fn(page.vmsslwlr)
+func (page *VirtualMachineScaleSetListWithLinkResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetListWithLinkResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmsslwlr)
if err != nil {
return err
}
@@ -7605,6 +8380,13 @@ func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetListWithLinkResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetListWithLinkResultPage) NotDone() bool {
return !page.vmsslwlr.IsEmpty()
@@ -7623,14 +8405,19 @@ func (page VirtualMachineScaleSetListWithLinkResultPage) Values() []VirtualMachi
return *page.vmsslwlr.Value
}
+// Creates a new instance of the VirtualMachineScaleSetListWithLinkResultPage type.
+func NewVirtualMachineScaleSetListWithLinkResultPage(getNextPage func(context.Context, VirtualMachineScaleSetListWithLinkResult) (VirtualMachineScaleSetListWithLinkResult, error)) VirtualMachineScaleSetListWithLinkResultPage {
+ return VirtualMachineScaleSetListWithLinkResultPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetManagedDiskParameters describes the parameters of a ScaleSet managed disk.
type VirtualMachineScaleSetManagedDiskParameters struct {
// StorageAccountType - Specifies the storage account type for the managed disk. NOTE: UltraSSD_LRS can only be used with data disks, it cannot be used with OS Disk. Possible values include: 'StorageAccountTypesStandardLRS', 'StorageAccountTypesPremiumLRS', 'StorageAccountTypesStandardSSDLRS', 'StorageAccountTypesUltraSSDLRS'
StorageAccountType StorageAccountTypes `json:"storageAccountType,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's network
-// configurations.
+// VirtualMachineScaleSetNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
type VirtualMachineScaleSetNetworkConfiguration struct {
// Name - The network configuration name.
Name *string `json:"name,omitempty"`
@@ -7703,8 +8490,8 @@ type VirtualMachineScaleSetNetworkConfigurationDNSSettings struct {
DNSServers *[]string `json:"dnsServers,omitempty"`
}
-// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network profile's IP
-// configuration.
+// VirtualMachineScaleSetNetworkConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration.
type VirtualMachineScaleSetNetworkConfigurationProperties struct {
// Primary - Specifies the primary network interface in case the virtual machine has more than 1 network interface.
Primary *bool `json:"primary,omitempty"`
@@ -7738,7 +8525,7 @@ type VirtualMachineScaleSetOSDisk struct {
WriteAcceleratorEnabled *bool `json:"writeAcceleratorEnabled,omitempty"`
// CreateOption - Specifies how the virtual machines in the scale set should be created.
The only allowed value is: **FromImage** \u2013 This value is used when you are using an image to create the virtual machine. If you are using a platform image, you also use the imageReference element described above. If you are using a marketplace image, you also use the plan element previously described. Possible values include: 'DiskCreateOptionTypesFromImage', 'DiskCreateOptionTypesEmpty', 'DiskCreateOptionTypesAttach'
CreateOption DiskCreateOptionTypes `json:"createOption,omitempty"`
- // DiffDiskSettings - Specifies the differencing Disk Settings for the operating system disk used by the virtual machine scale set.
+ // DiffDiskSettings - Specifies the ephemeral disk Settings for the operating system disk used by the virtual machine scale set.
DiffDiskSettings *DiffDiskSettings `json:"diffDiskSettings,omitempty"`
// DiskSizeGB - Specifies the size of the operating system disk in gigabytes. This element can be used to overwrite the size of the disk in a virtual machine image.
This value cannot be larger than 1023 GB
DiskSizeGB *int32 `json:"diskSizeGB,omitempty"`
@@ -7784,14 +8571,14 @@ type VirtualMachineScaleSetProperties struct {
UniqueID *string `json:"uniqueId,omitempty"`
// SinglePlacementGroup - When true this limits the scale set to a single placement group, of max size 100 virtual machines.
SinglePlacementGroup *bool `json:"singlePlacementGroup,omitempty"`
- // ZoneBalance - Whether to force stictly even Virtual Machine distribution cross x-zones in case there is zone outage.
+ // ZoneBalance - Whether to force strictly even Virtual Machine distribution cross x-zones in case there is zone outage.
ZoneBalance *bool `json:"zoneBalance,omitempty"`
// PlatformFaultDomainCount - Fault Domain count for each placement group.
PlatformFaultDomainCount *int32 `json:"platformFaultDomainCount,omitempty"`
}
-// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP Configuration's
-// PublicIPAddress configuration
+// VirtualMachineScaleSetPublicIPAddressConfiguration describes a virtual machines scale set IP
+// Configuration's PublicIPAddress configuration
type VirtualMachineScaleSetPublicIPAddressConfiguration struct {
// Name - The publicIP address configuration name.
Name *string `json:"name,omitempty"`
@@ -7843,8 +8630,8 @@ func (vmsspiac *VirtualMachineScaleSetPublicIPAddressConfiguration) UnmarshalJSO
return nil
}
-// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets network
-// configuration's DNS settings.
+// VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings describes a virtual machines scale sets
+// network configuration's DNS settings.
type VirtualMachineScaleSetPublicIPAddressConfigurationDNSSettings struct {
// DomainNameLabel - The Domain name label.The concatenation of the domain name label and vm index will be the domain name labels of the PublicIPAddress resources that will be created
DomainNameLabel *string `json:"domainNameLabel,omitempty"`
@@ -7863,8 +8650,16 @@ type VirtualMachineScaleSetPublicIPAddressConfigurationProperties struct {
PublicIPPrefix *SubResource `json:"publicIPPrefix,omitempty"`
}
-// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetReimageParameters struct {
+ // InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
+ InstanceIds *[]string `json:"instanceIds,omitempty"`
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
+// VirtualMachineScaleSetRollingUpgradesCancelFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesCancelFuture struct {
azure.Future
}
@@ -7886,8 +8681,8 @@ func (future *VirtualMachineScaleSetRollingUpgradesCancelFuture) Result(client V
return
}
-// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and retrieving
-// the results of a long-running operation.
+// VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture an abstraction for monitoring and
+// retrieving the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture struct {
azure.Future
}
@@ -7909,8 +8704,8 @@ func (future *VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture)
return
}
-// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
+// VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
type VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture struct {
azure.Future
}
@@ -7932,8 +8727,8 @@ func (future *VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture) Result(
return
}
-// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsCreateOrUpdateFuture struct {
azure.Future
}
@@ -7984,8 +8779,8 @@ func (future *VirtualMachineScaleSetsDeallocateFuture) Result(client VirtualMach
return
}
-// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsDeleteFuture struct {
azure.Future
}
@@ -8007,8 +8802,8 @@ func (future *VirtualMachineScaleSetsDeleteFuture) Result(client VirtualMachineS
return
}
-// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsDeleteInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsDeleteInstancesFuture struct {
azure.Future
}
@@ -8052,8 +8847,8 @@ type VirtualMachineScaleSetSkuCapacity struct {
ScaleType VirtualMachineScaleSetSkuScaleType `json:"scaleType,omitempty"`
}
-// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualMachineScaleSetsPerformMaintenanceFuture struct {
azure.Future
}
@@ -8075,8 +8870,8 @@ func (future *VirtualMachineScaleSetsPerformMaintenanceFuture) Result(client Vir
return
}
-// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsPowerOffFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsPowerOffFuture struct {
azure.Future
}
@@ -8098,8 +8893,8 @@ func (future *VirtualMachineScaleSetsPowerOffFuture) Result(client VirtualMachin
return
}
-// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsRedeployFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsRedeployFuture struct {
azure.Future
}
@@ -8144,8 +8939,8 @@ func (future *VirtualMachineScaleSetsReimageAllFuture) Result(client VirtualMach
return
}
-// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsReimageFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsReimageFuture struct {
azure.Future
}
@@ -8167,8 +8962,8 @@ func (future *VirtualMachineScaleSetsReimageFuture) Result(client VirtualMachine
return
}
-// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsRestartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsRestartFuture struct {
azure.Future
}
@@ -8190,8 +8985,8 @@ func (future *VirtualMachineScaleSetsRestartFuture) Result(client VirtualMachine
return
}
-// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsStartFuture struct {
azure.Future
}
@@ -8223,8 +9018,8 @@ type VirtualMachineScaleSetStorageProfile struct {
DataDisks *[]VirtualMachineScaleSetDataDisk `json:"dataDisks,omitempty"`
}
-// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetsUpdateFuture struct {
azure.Future
}
@@ -8252,8 +9047,8 @@ func (future *VirtualMachineScaleSetsUpdateFuture) Result(client VirtualMachineS
return
}
-// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetsUpdateInstancesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualMachineScaleSetsUpdateInstancesFuture struct {
azure.Future
}
@@ -8436,8 +9231,8 @@ func (vmssuic *VirtualMachineScaleSetUpdateIPConfiguration) UnmarshalJSON(body [
return nil
}
-// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network profile's IP
-// configuration properties.
+// VirtualMachineScaleSetUpdateIPConfigurationProperties describes a virtual machine scale set network
+// profile's IP configuration properties.
type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
// Subnet - The subnet.
Subnet *APIEntityReference `json:"subnet,omitempty"`
@@ -8457,8 +9252,8 @@ type VirtualMachineScaleSetUpdateIPConfigurationProperties struct {
LoadBalancerInboundNatPools *[]SubResource `json:"loadBalancerInboundNatPools,omitempty"`
}
-// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's network
-// configurations.
+// VirtualMachineScaleSetUpdateNetworkConfiguration describes a virtual machine scale set network profile's
+// network configurations.
type VirtualMachineScaleSetUpdateNetworkConfiguration struct {
// Name - The network configuration name.
Name *string `json:"name,omitempty"`
@@ -8524,8 +9319,9 @@ func (vmssunc *VirtualMachineScaleSetUpdateNetworkConfiguration) UnmarshalJSON(b
return nil
}
-// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set updatable
-// network profile's IP configuration.Use this object for updating network profile's IP Configuration.
+// VirtualMachineScaleSetUpdateNetworkConfigurationProperties describes a virtual machine scale set
+// updatable network profile's IP configuration.Use this object for updating network profile's IP
+// Configuration.
type VirtualMachineScaleSetUpdateNetworkConfigurationProperties struct {
// Primary - Whether this is a primary NIC on a virtual machine.
Primary *bool `json:"primary,omitempty"`
@@ -8547,8 +9343,8 @@ type VirtualMachineScaleSetUpdateNetworkProfile struct {
NetworkInterfaceConfigurations *[]VirtualMachineScaleSetUpdateNetworkConfiguration `json:"networkInterfaceConfigurations,omitempty"`
}
-// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update Object. This
-// should be used for Updating VMSS OS Disk.
+// VirtualMachineScaleSetUpdateOSDisk describes virtual machine scale set operating system disk Update
+// Object. This should be used for Updating VMSS OS Disk.
type VirtualMachineScaleSetUpdateOSDisk struct {
// Caching - The caching type. Possible values include: 'CachingTypesNone', 'CachingTypesReadOnly', 'CachingTypesReadWrite'
Caching CachingTypes `json:"caching,omitempty"`
@@ -8641,8 +9437,8 @@ func (vmssupiac *VirtualMachineScaleSetUpdatePublicIPAddressConfiguration) Unmar
return nil
}
-// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale set IP
-// Configuration's PublicIPAddress configuration
+// VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties describes a virtual machines scale
+// set IP Configuration's PublicIPAddress configuration
type VirtualMachineScaleSetUpdatePublicIPAddressConfigurationProperties struct {
// IdleTimeoutInMinutes - The idle timeout of the public IP address.
IdleTimeoutInMinutes *int32 `json:"idleTimeoutInMinutes,omitempty"`
@@ -8855,8 +9651,8 @@ func (vmssv *VirtualMachineScaleSetVM) UnmarshalJSON(body []byte) error {
return nil
}
-// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine scale
-// set.
+// VirtualMachineScaleSetVMExtensionsSummary extensions summary for virtual machines of a virtual machine
+// scale set.
type VirtualMachineScaleSetVMExtensionsSummary struct {
// Name - The extension name.
Name *string `json:"name,omitempty"`
@@ -8864,14 +9660,15 @@ type VirtualMachineScaleSetVMExtensionsSummary struct {
StatusesSummary *[]VirtualMachineStatusCodeCount `json:"statusesSummary,omitempty"`
}
-// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale set.
+// VirtualMachineScaleSetVMInstanceIDs specifies a list of virtual machine instance IDs from the VM scale
+// set.
type VirtualMachineScaleSetVMInstanceIDs struct {
// InstanceIds - The virtual machine scale set instance ids. Omitting the virtual machine scale set instance ids will result in the operation being performed on all virtual machines in the virtual machine scale set.
InstanceIds *[]string `json:"instanceIds,omitempty"`
}
-// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM scale
-// set.
+// VirtualMachineScaleSetVMInstanceRequiredIDs specifies a list of virtual machine instance IDs from the VM
+// scale set.
type VirtualMachineScaleSetVMInstanceRequiredIDs struct {
// InstanceIds - The virtual machine scale set instance ids.
InstanceIds *[]string `json:"instanceIds,omitempty"`
@@ -8896,7 +9693,7 @@ type VirtualMachineScaleSetVMInstanceView struct {
Extensions *[]VirtualMachineExtensionInstanceView `json:"extensions,omitempty"`
// VMHealth - The health status for the VM.
VMHealth *VirtualMachineHealthStatus `json:"vmHealth,omitempty"`
- // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
For Linux Virtual Machines, you can easily view the output of your console log.
For both Windows and Linux virtual machines, Azure also enables you to see a screenshot of the VM from the hypervisor.
+ // BootDiagnostics - Boot Diagnostics is a debugging feature which allows you to view Console Output and Screenshot to diagnose VM status.
You can easily view the output of your console log.
Azure also enables you to see a screenshot of the VM from the hypervisor.
BootDiagnostics *BootDiagnosticsInstanceView `json:"bootDiagnostics,omitempty"`
// Statuses - The resource status information.
Statuses *[]InstanceViewStatus `json:"statuses,omitempty"`
@@ -8913,21 +9710,31 @@ type VirtualMachineScaleSetVMListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of VirtualMachineScaleSetVM
-// values.
+// VirtualMachineScaleSetVMListResultIterator provides access to a complete listing of
+// VirtualMachineScaleSetVM values.
type VirtualMachineScaleSetVMListResultIterator struct {
i int
page VirtualMachineScaleSetVMListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
+func (iter *VirtualMachineScaleSetVMListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -8936,6 +9743,13 @@ func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualMachineScaleSetVMListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualMachineScaleSetVMListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -8955,6 +9769,11 @@ func (iter VirtualMachineScaleSetVMListResultIterator) Value() VirtualMachineSca
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualMachineScaleSetVMListResultIterator type.
+func NewVirtualMachineScaleSetVMListResultIterator(page VirtualMachineScaleSetVMListResultPage) VirtualMachineScaleSetVMListResultIterator {
+ return VirtualMachineScaleSetVMListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
return vmssvlr.Value == nil || len(*vmssvlr.Value) == 0
@@ -8962,11 +9781,11 @@ func (vmssvlr VirtualMachineScaleSetVMListResult) IsEmpty() bool {
// virtualMachineScaleSetVMListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer() (*http.Request, error) {
+func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListResultPreparer(ctx context.Context) (*http.Request, error) {
if vmssvlr.NextLink == nil || len(to.String(vmssvlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vmssvlr.NextLink)))
@@ -8974,14 +9793,24 @@ func (vmssvlr VirtualMachineScaleSetVMListResult) virtualMachineScaleSetVMListRe
// VirtualMachineScaleSetVMListResultPage contains a page of VirtualMachineScaleSetVM values.
type VirtualMachineScaleSetVMListResultPage struct {
- fn func(VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
+ fn func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)
vmssvlr VirtualMachineScaleSetVMListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
- next, err := page.fn(page.vmssvlr)
+func (page *VirtualMachineScaleSetVMListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vmssvlr)
if err != nil {
return err
}
@@ -8989,6 +9818,13 @@ func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualMachineScaleSetVMListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualMachineScaleSetVMListResultPage) NotDone() bool {
return !page.vmssvlr.IsEmpty()
@@ -9007,6 +9843,11 @@ func (page VirtualMachineScaleSetVMListResultPage) Values() []VirtualMachineScal
return *page.vmssvlr.Value
}
+// Creates a new instance of the VirtualMachineScaleSetVMListResultPage type.
+func NewVirtualMachineScaleSetVMListResultPage(getNextPage func(context.Context, VirtualMachineScaleSetVMListResult) (VirtualMachineScaleSetVMListResult, error)) VirtualMachineScaleSetVMListResultPage {
+ return VirtualMachineScaleSetVMListResultPage{fn: getNextPage}
+}
+
// VirtualMachineScaleSetVMProfile describes a virtual machine scale set virtual machine profile.
type VirtualMachineScaleSetVMProfile struct {
// OsProfile - Specifies the operating system settings for the virtual machines in the scale set.
@@ -9029,7 +9870,8 @@ type VirtualMachineScaleSetVMProfile struct {
EvictionPolicy VirtualMachineEvictionPolicyTypes `json:"evictionPolicy,omitempty"`
}
-// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual machine.
+// VirtualMachineScaleSetVMProperties describes the properties of a virtual machine scale set virtual
+// machine.
type VirtualMachineScaleSetVMProperties struct {
// LatestModelApplied - Specifies whether the latest model has been applied to the virtual machine.
LatestModelApplied *bool `json:"latestModelApplied,omitempty"`
@@ -9049,7 +9891,7 @@ type VirtualMachineScaleSetVMProperties struct {
NetworkProfile *NetworkProfile `json:"networkProfile,omitempty"`
// DiagnosticsProfile - Specifies the boot diagnostic settings state.
Minimum api-version: 2015-06-15.
DiagnosticsProfile *DiagnosticsProfile `json:"diagnosticsProfile,omitempty"`
- // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintainance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
+ // AvailabilitySet - Specifies information about the availability set that the virtual machine should be assigned to. Virtual machines specified in the same availability set are allocated to different nodes to maximize availability. For more information about availability sets, see [Manage the availability of virtual machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
For more information on Azure planned maintenance, see [Planned maintenance for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
Currently, a VM can only be added to availability set at creation time. An existing VM cannot be added to an availability set.
AvailabilitySet *SubResource `json:"availabilitySet,omitempty"`
// ProvisioningState - The provisioning state, which only appears in the response.
ProvisioningState *string `json:"provisioningState,omitempty"`
@@ -9057,6 +9899,12 @@ type VirtualMachineScaleSetVMProperties struct {
LicenseType *string `json:"licenseType,omitempty"`
}
+// VirtualMachineScaleSetVMReimageParameters describes a Virtual Machine Scale Set VM Reimage Parameters.
+type VirtualMachineScaleSetVMReimageParameters struct {
+ // TempDisk - Specifies whether to reimage temp disk. Default value: false.
+ TempDisk *bool `json:"tempDisk,omitempty"`
+}
+
// VirtualMachineScaleSetVMsDeallocateFuture an abstraction for monitoring and retrieving the results of a
// long-running operation.
type VirtualMachineScaleSetVMsDeallocateFuture struct {
@@ -9080,8 +9928,8 @@ func (future *VirtualMachineScaleSetVMsDeallocateFuture) Result(client VirtualMa
return
}
-// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetVMsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetVMsDeleteFuture struct {
azure.Future
}
@@ -9103,8 +9951,8 @@ func (future *VirtualMachineScaleSetVMsDeleteFuture) Result(client VirtualMachin
return
}
-// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualMachineScaleSetVMsPerformMaintenanceFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualMachineScaleSetVMsPerformMaintenanceFuture struct {
azure.Future
}
@@ -9270,8 +10118,8 @@ func (future *VirtualMachineScaleSetVMsRunCommandFuture) Result(client VirtualMa
return
}
-// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetVMsStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetVMsStartFuture struct {
azure.Future
}
@@ -9293,8 +10141,8 @@ func (future *VirtualMachineScaleSetVMsStartFuture) Result(client VirtualMachine
return
}
-// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineScaleSetVMsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineScaleSetVMsUpdateFuture struct {
azure.Future
}
@@ -9374,8 +10222,8 @@ func (future *VirtualMachinesConvertToManagedDisksFuture) Result(client VirtualM
return
}
-// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
}
@@ -9403,8 +10251,8 @@ func (future *VirtualMachinesCreateOrUpdateFuture) Result(client VirtualMachines
return
}
-// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesDeallocateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesDeallocateFuture struct {
azure.Future
}
@@ -9541,6 +10389,29 @@ func (future *VirtualMachinesRedeployFuture) Result(client VirtualMachinesClient
return
}
+// VirtualMachinesReimageFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type VirtualMachinesReimageFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualMachinesReimageFuture) Result(client VirtualMachinesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesReimageFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("compute.VirtualMachinesReimageFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// VirtualMachinesRestartFuture an abstraction for monitoring and retrieving the results of a long-running
// operation.
type VirtualMachinesRestartFuture struct {
@@ -9564,8 +10435,8 @@ func (future *VirtualMachinesRestartFuture) Result(client VirtualMachinesClient)
return
}
-// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesRunCommandFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesRunCommandFuture struct {
azure.Future
}
@@ -9593,7 +10464,8 @@ func (future *VirtualMachinesRunCommandFuture) Result(client VirtualMachinesClie
return
}
-// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualMachinesStartFuture struct {
azure.Future
}
@@ -9615,8 +10487,8 @@ func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (
return
}
-// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view status
-// summary.
+// VirtualMachineStatusCodeCount the status code and count of the virtual machine scale set instance view
+// status summary.
type VirtualMachineStatusCodeCount struct {
// Code - The instance view status code.
Code *string `json:"code,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/operations.go
index 8b7641804cf0..ef176f9f5e10 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List gets a list of compute operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/resourceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/resourceskus.go
index de32a3df699d..d378f643ff00 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/resourceskus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/resourceskus.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewResourceSkusClientWithBaseURI(baseURI string, subscriptionID string) Res
// List gets the list of Microsoft.Compute SKUs available for your Subscription.
func (client ResourceSkusClient) List(ctx context.Context) (result ResourceSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.List")
+ defer func() {
+ sc := -1
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -103,8 +114,8 @@ func (client ResourceSkusClient) ListResponder(resp *http.Response) (result Reso
}
// listNextResults retrieves the next set of results, if any.
-func (client ResourceSkusClient) listNextResults(lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
- req, err := lastResults.resourceSkusResultPreparer()
+func (client ResourceSkusClient) listNextResults(ctx context.Context, lastResults ResourceSkusResult) (result ResourceSkusResult, err error) {
+ req, err := lastResults.resourceSkusResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.ResourceSkusClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -125,6 +136,16 @@ func (client ResourceSkusClient) listNextResults(lastResults ResourceSkusResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ResourceSkusClient) ListComplete(ctx context.Context) (result ResourceSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkusClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/snapshots.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/snapshots.go
index 89e57104c4f3..0109710db174 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/snapshots.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/snapshots.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewSnapshotsClientWithBaseURI(baseURI string, subscriptionID string) Snapsh
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
// snapshot - snapshot object supplied in the body of the Put disk operation.
func (client SnapshotsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, snapshotName string, snapshot Snapshot) (result SnapshotsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: snapshot,
Constraints: []validation.Constraint{{Target: "snapshot.SnapshotProperties", Name: validation.Null, Rule: false,
@@ -115,10 +126,6 @@ func (client SnapshotsClient) CreateOrUpdateSender(req *http.Request) (future Sn
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -142,6 +149,16 @@ func (client SnapshotsClient) CreateOrUpdateResponder(resp *http.Response) (resu
// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
func (client SnapshotsClient) Delete(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, snapshotName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Delete", nil, "Failure preparing request")
@@ -187,10 +204,6 @@ func (client SnapshotsClient) DeleteSender(req *http.Request) (future SnapshotsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -213,6 +226,16 @@ func (client SnapshotsClient) DeleteResponder(resp *http.Response) (result autor
// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
func (client SnapshotsClient) Get(ctx context.Context, resourceGroupName string, snapshotName string) (result Snapshot, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, snapshotName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Get", nil, "Failure preparing request")
@@ -282,6 +305,16 @@ func (client SnapshotsClient) GetResponder(resp *http.Response) (result Snapshot
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
// grantAccessData - access data object supplied in the body of the get snapshot access operation.
func (client SnapshotsClient) GrantAccess(ctx context.Context, resourceGroupName string, snapshotName string, grantAccessData GrantAccessData) (result SnapshotsGrantAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.GrantAccess")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: grantAccessData,
Constraints: []validation.Constraint{{Target: "grantAccessData.DurationInSeconds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -335,10 +368,6 @@ func (client SnapshotsClient) GrantAccessSender(req *http.Request) (future Snaps
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -358,6 +387,16 @@ func (client SnapshotsClient) GrantAccessResponder(resp *http.Response) (result
// List lists snapshots under a subscription.
func (client SnapshotsClient) List(ctx context.Context) (result SnapshotListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.List")
+ defer func() {
+ sc := -1
+ if result.sl.Response.Response != nil {
+ sc = result.sl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -420,8 +459,8 @@ func (client SnapshotsClient) ListResponder(resp *http.Response) (result Snapsho
}
// listNextResults retrieves the next set of results, if any.
-func (client SnapshotsClient) listNextResults(lastResults SnapshotList) (result SnapshotList, err error) {
- req, err := lastResults.snapshotListPreparer()
+func (client SnapshotsClient) listNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) {
+ req, err := lastResults.snapshotListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -442,6 +481,16 @@ func (client SnapshotsClient) listNextResults(lastResults SnapshotList) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SnapshotsClient) ListComplete(ctx context.Context) (result SnapshotListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.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
}
@@ -450,6 +499,16 @@ func (client SnapshotsClient) ListComplete(ctx context.Context) (result Snapshot
// Parameters:
// resourceGroupName - the name of the resource group.
func (client SnapshotsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SnapshotListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.sl.Response.Response != nil {
+ sc = result.sl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -513,8 +572,8 @@ func (client SnapshotsClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client SnapshotsClient) listByResourceGroupNextResults(lastResults SnapshotList) (result SnapshotList, err error) {
- req, err := lastResults.snapshotListPreparer()
+func (client SnapshotsClient) listByResourceGroupNextResults(ctx context.Context, lastResults SnapshotList) (result SnapshotList, err error) {
+ req, err := lastResults.snapshotListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.SnapshotsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -535,6 +594,16 @@ func (client SnapshotsClient) listByResourceGroupNextResults(lastResults Snapsho
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result SnapshotListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -545,6 +614,16 @@ func (client SnapshotsClient) ListByResourceGroupComplete(ctx context.Context, r
// snapshotName - the name of the snapshot that is being created. The name can't be changed after the snapshot
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
func (client SnapshotsClient) RevokeAccess(ctx context.Context, resourceGroupName string, snapshotName string) (result SnapshotsRevokeAccessFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.RevokeAccess")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RevokeAccessPreparer(ctx, resourceGroupName, snapshotName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "RevokeAccess", nil, "Failure preparing request")
@@ -590,10 +669,6 @@ func (client SnapshotsClient) RevokeAccessSender(req *http.Request) (future Snap
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -617,6 +692,16 @@ func (client SnapshotsClient) RevokeAccessResponder(resp *http.Response) (result
// is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters.
// snapshot - snapshot object supplied in the body of the Patch snapshot operation.
func (client SnapshotsClient) Update(ctx context.Context, resourceGroupName string, snapshotName string, snapshot SnapshotUpdate) (result SnapshotsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SnapshotsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, snapshotName, snapshot)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.SnapshotsClient", "Update", nil, "Failure preparing request")
@@ -664,10 +749,6 @@ func (client SnapshotsClient) UpdateSender(req *http.Request) (future SnapshotsU
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/usage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/usage.go
index 29d81b44805c..b3b236a22553 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/usage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/usage.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewUsageClientWithBaseURI(baseURI string, subscriptionID string) UsageClien
// Parameters:
// location - the location for which resource usage is queried.
func (client UsageClient) List(ctx context.Context, location string) (result ListUsagesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.List")
+ defer func() {
+ sc := -1
+ if result.lur.Response.Response != nil {
+ sc = result.lur.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
@@ -114,8 +125,8 @@ func (client UsageClient) ListResponder(resp *http.Response) (result ListUsagesR
}
// listNextResults retrieves the next set of results, if any.
-func (client UsageClient) listNextResults(lastResults ListUsagesResult) (result ListUsagesResult, err error) {
- req, err := lastResults.listUsagesResultPreparer()
+func (client UsageClient) listNextResults(ctx context.Context, lastResults ListUsagesResult) (result ListUsagesResult, err error) {
+ req, err := lastResults.listUsagesResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.UsageClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -136,6 +147,16 @@ func (client UsageClient) listNextResults(lastResults ListUsagesResult) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsageClient) ListComplete(ctx context.Context, location string) (result ListUsagesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go
index 04d60da0c9c6..f090163f0050 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensionimages.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewVirtualMachineExtensionImagesClientWithBaseURI(baseURI string, subscript
// Parameters:
// location - the name of a supported Azure region.
func (client VirtualMachineExtensionImagesClient) Get(ctx context.Context, location string, publisherName string, typeParameter string, version string) (result VirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, location, publisherName, typeParameter, version)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "Get", nil, "Failure preparing request")
@@ -112,6 +123,16 @@ func (client VirtualMachineExtensionImagesClient) GetResponder(resp *http.Respon
// Parameters:
// location - the name of a supported Azure region.
func (client VirtualMachineExtensionImagesClient) ListTypes(ctx context.Context, location string, publisherName string) (result ListVirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListTypes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListTypesPreparer(ctx, location, publisherName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListTypes", nil, "Failure preparing request")
@@ -179,6 +200,16 @@ func (client VirtualMachineExtensionImagesClient) ListTypesResponder(resp *http.
// location - the name of a supported Azure region.
// filter - the filter to apply on the operation.
func (client VirtualMachineExtensionImagesClient) ListVersions(ctx context.Context, location string, publisherName string, typeParameter string, filter string, top *int32, orderby string) (result ListVirtualMachineExtensionImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionImagesClient.ListVersions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListVersionsPreparer(ctx, location, publisherName, typeParameter, filter, top, orderby)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionImagesClient", "ListVersions", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
index 1e3dfc07e628..ec8cd6106a37 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineextensions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualMachineExtensionsClientWithBaseURI(baseURI string, subscriptionID
// VMExtensionName - the name of the virtual machine extension.
// extensionParameters - parameters supplied to the Create Virtual Machine Extension operation.
func (client VirtualMachineExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtension) (result VirtualMachineExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -94,10 +105,6 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -121,6 +128,16 @@ func (client VirtualMachineExtensionsClient) CreateOrUpdateResponder(resp *http.
// VMName - the name of the virtual machine where the extension should be deleted.
// VMExtensionName - the name of the virtual machine extension.
func (client VirtualMachineExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string) (result VirtualMachineExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, VMName, VMExtensionName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Delete", nil, "Failure preparing request")
@@ -167,10 +184,6 @@ func (client VirtualMachineExtensionsClient) DeleteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,6 +207,16 @@ func (client VirtualMachineExtensionsClient) DeleteResponder(resp *http.Response
// VMExtensionName - the name of the virtual machine extension.
// expand - the expand expression to apply on the operation.
func (client VirtualMachineExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, expand string) (result VirtualMachineExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, VMName, VMExtensionName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Get", nil, "Failure preparing request")
@@ -266,6 +289,16 @@ func (client VirtualMachineExtensionsClient) GetResponder(resp *http.Response) (
// VMName - the name of the virtual machine containing the extension.
// expand - the expand expression to apply on the operation.
func (client VirtualMachineExtensionsClient) List(ctx context.Context, resourceGroupName string, VMName string, expand string) (result VirtualMachineExtensionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, VMName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "List", nil, "Failure preparing request")
@@ -338,6 +371,16 @@ func (client VirtualMachineExtensionsClient) ListResponder(resp *http.Response)
// VMExtensionName - the name of the virtual machine extension.
// extensionParameters - parameters supplied to the Update Virtual Machine Extension operation.
func (client VirtualMachineExtensionsClient) Update(ctx context.Context, resourceGroupName string, VMName string, VMExtensionName string, extensionParameters VirtualMachineExtensionUpdate) (result VirtualMachineExtensionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineExtensionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, VMExtensionName, extensionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineExtensionsClient", "Update", nil, "Failure preparing request")
@@ -386,10 +429,6 @@ func (client VirtualMachineExtensionsClient) UpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go
index 4c6174c1526d..dfde13d4648c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineimages.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualMachineImagesClientWithBaseURI(baseURI string, subscriptionID str
// skus - a valid image SKU.
// version - a valid image SKU version.
func (client VirtualMachineImagesClient) Get(ctx context.Context, location string, publisherName string, offer string, skus string, version string) (result VirtualMachineImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, location, publisherName, offer, skus, version)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "Get", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client VirtualMachineImagesClient) GetResponder(resp *http.Response) (resu
// skus - a valid image SKU.
// filter - the filter to apply on the operation.
func (client VirtualMachineImagesClient) List(ctx context.Context, location string, publisherName string, offer string, skus string, filter string, top *int32, orderby string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, location, publisherName, offer, skus, filter, top, orderby)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "List", nil, "Failure preparing request")
@@ -198,6 +219,16 @@ func (client VirtualMachineImagesClient) ListResponder(resp *http.Response) (res
// location - the name of a supported Azure region.
// publisherName - a valid image publisher.
func (client VirtualMachineImagesClient) ListOffers(ctx context.Context, location string, publisherName string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListOffers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListOffersPreparer(ctx, location, publisherName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListOffers", nil, "Failure preparing request")
@@ -264,6 +295,16 @@ func (client VirtualMachineImagesClient) ListOffersResponder(resp *http.Response
// Parameters:
// location - the name of a supported Azure region.
func (client VirtualMachineImagesClient) ListPublishers(ctx context.Context, location string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListPublishers")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPublishersPreparer(ctx, location)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListPublishers", nil, "Failure preparing request")
@@ -331,6 +372,16 @@ func (client VirtualMachineImagesClient) ListPublishersResponder(resp *http.Resp
// publisherName - a valid image publisher.
// offer - a valid image publisher offer.
func (client VirtualMachineImagesClient) ListSkus(ctx context.Context, location string, publisherName string, offer string) (result ListVirtualMachineImageResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineImagesClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListSkusPreparer(ctx, location, publisherName, offer)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineImagesClient", "ListSkus", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go
index 631eb7a93342..4ccc0fcdcd81 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachineruncommands.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVirtualMachineRunCommandsClientWithBaseURI(baseURI string, subscriptionI
// location - the location upon which run commands is queried.
// commandID - the command id.
func (client VirtualMachineRunCommandsClient) Get(ctx context.Context, location string, commandID string) (result RunCommandDocument, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.Get")
+ 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: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
@@ -117,6 +128,16 @@ func (client VirtualMachineRunCommandsClient) GetResponder(resp *http.Response)
// Parameters:
// location - the location upon which run commands is queried.
func (client VirtualMachineRunCommandsClient) List(ctx context.Context, location string) (result RunCommandListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.List")
+ defer func() {
+ sc := -1
+ if result.rclr.Response.Response != nil {
+ sc = result.rclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
@@ -186,8 +207,8 @@ func (client VirtualMachineRunCommandsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachineRunCommandsClient) listNextResults(lastResults RunCommandListResult) (result RunCommandListResult, err error) {
- req, err := lastResults.runCommandListResultPreparer()
+func (client VirtualMachineRunCommandsClient) listNextResults(ctx context.Context, lastResults RunCommandListResult) (result RunCommandListResult, err error) {
+ req, err := lastResults.runCommandListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineRunCommandsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -208,6 +229,16 @@ func (client VirtualMachineRunCommandsClient) listNextResults(lastResults RunCom
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineRunCommandsClient) ListComplete(ctx context.Context, location string) (result RunCommandListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineRunCommandsClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
index 80c60d89cb72..d60492e1439f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachines.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string)
// VMName - the name of the virtual machine.
// parameters - parameters supplied to the Capture Virtual Machine operation.
func (client VirtualMachinesClient) Capture(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineCaptureParameters) (result VirtualMachinesCaptureFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Capture")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VhdPrefix", Name: validation.Null, Rule: true, Chain: nil},
@@ -102,10 +113,6 @@ func (client VirtualMachinesClient) CaptureSender(req *http.Request) (future Vir
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -129,6 +136,16 @@ func (client VirtualMachinesClient) CaptureResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) ConvertToManagedDisks(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesConvertToManagedDisksFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ConvertToManagedDisks")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ConvertToManagedDisksPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ConvertToManagedDisks", nil, "Failure preparing request")
@@ -174,10 +191,6 @@ func (client VirtualMachinesClient) ConvertToManagedDisksSender(req *http.Reques
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -200,6 +213,16 @@ func (client VirtualMachinesClient) ConvertToManagedDisksResponder(resp *http.Re
// VMName - the name of the virtual machine.
// parameters - parameters supplied to the Create Virtual Machine operation.
func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineProperties", Name: validation.Null, Rule: false,
@@ -268,10 +291,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -295,6 +314,16 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Deallocate(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Deallocate", nil, "Failure preparing request")
@@ -340,10 +369,6 @@ func (client VirtualMachinesClient) DeallocateSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -365,6 +390,16 @@ func (client VirtualMachinesClient) DeallocateResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Delete", nil, "Failure preparing request")
@@ -410,10 +445,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -435,6 +466,16 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Generalize(ctx context.Context, resourceGroupName string, VMName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Generalize")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GeneralizePreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Generalize", nil, "Failure preparing request")
@@ -502,6 +543,16 @@ func (client VirtualMachinesClient) GeneralizeResponder(resp *http.Response) (re
// VMName - the name of the virtual machine.
// expand - the expand expression to apply on the operation.
func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, VMName string, expand InstanceViewTypes) (result VirtualMachine, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, VMName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Get", nil, "Failure preparing request")
@@ -572,6 +623,16 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result Vi
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) InstanceView(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.InstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.InstanceViewPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "InstanceView", nil, "Failure preparing request")
@@ -639,6 +700,16 @@ func (client VirtualMachinesClient) InstanceViewResponder(resp *http.Response) (
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -702,8 +773,8 @@ func (client VirtualMachinesClient) ListResponder(resp *http.Response) (result V
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachinesClient) listNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
- req, err := lastResults.virtualMachineListResultPreparer()
+func (client VirtualMachinesClient) listNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -724,6 +795,16 @@ func (client VirtualMachinesClient) listNextResults(lastResults VirtualMachineLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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, resourceGroupName)
return
}
@@ -731,6 +812,16 @@ func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGr
// ListAll lists all of the virtual machines in the specified subscription. Use the nextLink property in the response
// to get the next page of virtual machines.
func (client VirtualMachinesClient) ListAll(ctx context.Context) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -793,8 +884,8 @@ func (client VirtualMachinesClient) ListAllResponder(resp *http.Response) (resul
}
// listAllNextResults retrieves the next set of results, if any.
-func (client VirtualMachinesClient) listAllNextResults(lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
- req, err := lastResults.virtualMachineListResultPreparer()
+func (client VirtualMachinesClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -815,6 +906,16 @@ func (client VirtualMachinesClient) listAllNextResults(lastResults VirtualMachin
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachinesClient) ListAllComplete(ctx context.Context) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -824,6 +925,16 @@ func (client VirtualMachinesClient) ListAllComplete(ctx context.Context) (result
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) ListAvailableSizes(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListAvailableSizes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAvailableSizesPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListAvailableSizes", nil, "Failure preparing request")
@@ -886,11 +997,140 @@ func (client VirtualMachinesClient) ListAvailableSizesResponder(resp *http.Respo
return
}
+// ListByLocation gets all the virtual machines under the specified subscription for the specified location.
+// Parameters:
+// location - the location for which virtual machines under the subscription are queried.
+func (client VirtualMachinesClient) ListByLocation(ctx context.Context, location string) (result VirtualMachineListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.vmlr.Response.Response != nil {
+ sc = result.vmlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: location,
+ Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("compute.VirtualMachinesClient", "ListByLocation", err.Error())
+ }
+
+ result.fn = client.listByLocationNextResults
+ req, err := client.ListByLocationPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.vmlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure sending request")
+ return
+ }
+
+ result.vmlr, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "ListByLocation", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByLocationPreparer prepares the ListByLocation request.
+func (client VirtualMachinesClient) ListByLocationPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/virtualMachines", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByLocationSender sends the ListByLocation request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ListByLocationSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByLocationResponder handles the response to the ListByLocation request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) ListByLocationResponder(resp *http.Response) (result VirtualMachineListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByLocationNextResults retrieves the next set of results, if any.
+func (client VirtualMachinesClient) listByLocationNextResults(ctx context.Context, lastResults VirtualMachineListResult) (result VirtualMachineListResult, err error) {
+ req, err := lastResults.virtualMachineListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByLocationSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByLocationResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "listByLocationNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByLocationComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualMachinesClient) ListByLocationComplete(ctx context.Context, location string) (result VirtualMachineListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListByLocation")
+ 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.ListByLocation(ctx, location)
+ return
+}
+
// PerformMaintenance the operation to perform maintenance on a virtual machine.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PerformMaintenance", nil, "Failure preparing request")
@@ -936,10 +1176,6 @@ func (client VirtualMachinesClient) PerformMaintenanceSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -962,6 +1198,16 @@ func (client VirtualMachinesClient) PerformMaintenanceResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) PowerOff(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "PowerOff", nil, "Failure preparing request")
@@ -1007,10 +1253,6 @@ func (client VirtualMachinesClient) PowerOffSender(req *http.Request) (future Vi
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1032,6 +1274,16 @@ func (client VirtualMachinesClient) PowerOffResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Redeploy(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RedeployPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Redeploy", nil, "Failure preparing request")
@@ -1077,7 +1329,85 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RedeployResponder handles the response to the Redeploy request. The method always
+// closes the http.Response Body.
+func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Reimage reimages the virtual machine which has an ephemeral OS disk back to its initial state.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// VMName - the name of the virtual machine.
+// parameters - parameters supplied to the Reimage Virtual Machine operation.
+func (client VirtualMachinesClient) Reimage(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (result VirtualMachinesReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.ReimageSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Reimage", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// ReimagePreparer prepares the Reimage request.
+func (client VirtualMachinesClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMName string, parameters *VirtualMachineReimageParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "vmName": autorest.Encode("path", VMName),
+ }
+
+ const APIVersion = "2018-06-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.Compute/virtualMachines/{vmName}/reimage", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ if parameters != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(parameters))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ReimageSender sends the Reimage request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualMachinesClient) ReimageSender(req *http.Request) (future VirtualMachinesReimageFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -1085,9 +1415,9 @@ func (client VirtualMachinesClient) RedeploySender(req *http.Request) (future Vi
return
}
-// RedeployResponder handles the response to the Redeploy request. The method always
+// ReimageResponder handles the response to the Reimage request. The method always
// closes the http.Response Body.
-func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (result autorest.Response, err error) {
+func (client VirtualMachinesClient) ReimageResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -1102,6 +1432,16 @@ func (client VirtualMachinesClient) RedeployResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Restart(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Restart")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RestartPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Restart", nil, "Failure preparing request")
@@ -1147,10 +1487,6 @@ func (client VirtualMachinesClient) RestartSender(req *http.Request) (future Vir
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1173,6 +1509,16 @@ func (client VirtualMachinesClient) RestartResponder(resp *http.Response) (resul
// VMName - the name of the virtual machine.
// parameters - parameters supplied to the Run command operation.
func (client VirtualMachinesClient) RunCommand(ctx context.Context, resourceGroupName string, VMName string, parameters RunCommandInput) (result VirtualMachinesRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -1226,10 +1572,6 @@ func (client VirtualMachinesClient) RunCommandSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1252,6 +1594,16 @@ func (client VirtualMachinesClient) RunCommandResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// VMName - the name of the virtual machine.
func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, VMName string) (result VirtualMachinesStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, VMName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Start", nil, "Failure preparing request")
@@ -1297,10 +1649,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1323,6 +1671,16 @@ func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result
// VMName - the name of the virtual machine.
// parameters - parameters supplied to the Update Virtual Machine operation.
func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, VMName string, parameters VirtualMachineUpdate) (result VirtualMachinesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, VMName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachinesClient", "Update", nil, "Failure preparing request")
@@ -1370,10 +1728,6 @@ func (client VirtualMachinesClient) UpdateSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
index e2cd495962e5..dde7b5f51987 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetextensions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualMachineScaleSetExtensionsClientWithBaseURI(baseURI string, subscr
// vmssExtensionName - the name of the VM scale set extension.
// extensionParameters - parameters supplied to the Create VM scale set Extension operation.
func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, extensionParameters VirtualMachineScaleSetExtension) (result VirtualMachineScaleSetExtensionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, extensionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -95,10 +106,6 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateSender(req *h
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -122,6 +129,16 @@ func (client VirtualMachineScaleSetExtensionsClient) CreateOrUpdateResponder(res
// VMScaleSetName - the name of the VM scale set where the extension should be deleted.
// vmssExtensionName - the name of the VM scale set extension.
func (client VirtualMachineScaleSetExtensionsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string) (result VirtualMachineScaleSetExtensionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Delete", nil, "Failure preparing request")
@@ -168,10 +185,6 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -195,6 +208,16 @@ func (client VirtualMachineScaleSetExtensionsClient) DeleteResponder(resp *http.
// vmssExtensionName - the name of the VM scale set extension.
// expand - the expand expression to apply on the operation.
func (client VirtualMachineScaleSetExtensionsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, vmssExtensionName string, expand string) (result VirtualMachineScaleSetExtension, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, vmssExtensionName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "Get", nil, "Failure preparing request")
@@ -266,6 +289,16 @@ func (client VirtualMachineScaleSetExtensionsClient) GetResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set containing the extension.
func (client VirtualMachineScaleSetExtensionsClient) List(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmsselr.Response.Response != nil {
+ sc = result.vmsselr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
@@ -330,8 +363,8 @@ func (client VirtualMachineScaleSetExtensionsClient) ListResponder(resp *http.Re
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetExtensionsClient) listNextResults(lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) {
- req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer()
+func (client VirtualMachineScaleSetExtensionsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetExtensionListResult) (result VirtualMachineScaleSetExtensionListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetExtensionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetExtensionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -352,6 +385,16 @@ func (client VirtualMachineScaleSetExtensionsClient) listNextResults(lastResults
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetExtensionsClient) ListComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetExtensionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetExtensionsClient.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, resourceGroupName, VMScaleSetName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
index c1d1b626f90c..5ffd1e22bf5c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetrollingupgrades.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualMachineScaleSetRollingUpgradesClientWithBaseURI(baseURI string, s
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetRollingUpgradesClient) Cancel(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesCancelFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.Cancel")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CancelPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "Cancel", nil, "Failure preparing request")
@@ -91,10 +102,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelSender(req *http
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -116,6 +123,16 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) CancelResponder(resp *
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatest(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result RollingUpgradeStatusInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.GetLatest")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetLatestPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "GetLatest", nil, "Failure preparing request")
@@ -185,6 +202,16 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) GetLatestResponder(res
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartExtensionUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartExtensionUpgrade")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartExtensionUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartExtensionUpgrade", nil, "Failure preparing request")
@@ -230,10 +257,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeS
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -256,6 +279,16 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartExtensionUpgradeR
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgrade(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetRollingUpgradesStartOSUpgradeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetRollingUpgradesClient.StartOSUpgrade")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartOSUpgradePreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetRollingUpgradesClient", "StartOSUpgrade", nil, "Failure preparing request")
@@ -301,10 +334,6 @@ func (client VirtualMachineScaleSetRollingUpgradesClient) StartOSUpgradeSender(r
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
index 69a16b80c756..d8b3f7d354a7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesets.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualMachineScaleSetsClientWithBaseURI(baseURI string, subscriptionID
// VMScaleSetName - the name of the VM scale set to create or update.
// parameters - the scale set object.
func (client VirtualMachineScaleSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSet) (result VirtualMachineScaleSetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetProperties", Name: validation.Null, Rule: false,
@@ -116,10 +127,6 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateSender(req *http.Reque
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -144,6 +151,16 @@ func (client VirtualMachineScaleSetsClient) CreateOrUpdateResponder(resp *http.R
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Deallocate", nil, "Failure preparing request")
@@ -194,10 +211,6 @@ func (client VirtualMachineScaleSetsClient) DeallocateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -219,6 +232,16 @@ func (client VirtualMachineScaleSetsClient) DeallocateResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Delete", nil, "Failure preparing request")
@@ -264,10 +287,6 @@ func (client VirtualMachineScaleSetsClient) DeleteSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -290,6 +309,16 @@ func (client VirtualMachineScaleSetsClient) DeleteResponder(resp *http.Response)
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) DeleteInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsDeleteInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.DeleteInstances")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: VMInstanceIDs,
Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -343,10 +372,6 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -370,6 +395,16 @@ func (client VirtualMachineScaleSetsClient) DeleteInstancesResponder(resp *http.
// VMScaleSetName - the name of the VM scale set.
// platformUpdateDomain - the platform update domain for which a manual recovery walk is requested
func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUpdateDomainWalk(ctx context.Context, resourceGroupName string, VMScaleSetName string, platformUpdateDomain int32) (result RecoveryWalkResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ForceRecoveryServiceFabricPlatformUpdateDomainWalk")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ForceRecoveryServiceFabricPlatformUpdateDomainWalkPreparer(ctx, resourceGroupName, VMScaleSetName, platformUpdateDomain)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ForceRecoveryServiceFabricPlatformUpdateDomainWalk", nil, "Failure preparing request")
@@ -438,6 +473,16 @@ func (client VirtualMachineScaleSetsClient) ForceRecoveryServiceFabricPlatformUp
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Get", nil, "Failure preparing request")
@@ -505,6 +550,16 @@ func (client VirtualMachineScaleSetsClient) GetResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "GetInstanceView", nil, "Failure preparing request")
@@ -572,6 +627,16 @@ func (client VirtualMachineScaleSetsClient) GetInstanceViewResponder(resp *http.
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistory(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ defer func() {
+ sc := -1
+ if result.vmsslouh.Response.Response != nil {
+ sc = result.vmsslouh.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.getOSUpgradeHistoryNextResults
req, err := client.GetOSUpgradeHistoryPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
@@ -636,8 +701,8 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryResponder(resp *h
}
// getOSUpgradeHistoryNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
- req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer()
+func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListOSUpgradeHistory) (result VirtualMachineScaleSetListOSUpgradeHistory, err error) {
+ req, err := lastResults.virtualMachineScaleSetListOSUpgradeHistoryPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "getOSUpgradeHistoryNextResults", nil, "Failure preparing next results request")
}
@@ -658,6 +723,16 @@ func (client VirtualMachineScaleSetsClient) getOSUpgradeHistoryNextResults(lastR
// GetOSUpgradeHistoryComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListOSUpgradeHistoryIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.GetOSUpgradeHistory")
+ 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.GetOSUpgradeHistory(ctx, resourceGroupName, VMScaleSetName)
return
}
@@ -666,6 +741,16 @@ func (client VirtualMachineScaleSetsClient) GetOSUpgradeHistoryComplete(ctx cont
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualMachineScaleSetsClient) List(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmsslr.Response.Response != nil {
+ sc = result.vmsslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -729,8 +814,8 @@ func (client VirtualMachineScaleSetsClient) ListResponder(resp *http.Response) (
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetsClient) listNextResults(lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) {
- req, err := lastResults.virtualMachineScaleSetListResultPreparer()
+func (client VirtualMachineScaleSetsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListResult) (result VirtualMachineScaleSetListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -751,6 +836,16 @@ func (client VirtualMachineScaleSetsClient) listNextResults(lastResults VirtualM
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualMachineScaleSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.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, resourceGroupName)
return
}
@@ -759,6 +854,16 @@ func (client VirtualMachineScaleSetsClient) ListComplete(ctx context.Context, re
// nextLink property in the response to get the next page of VM Scale Sets. Do this till nextLink is null to fetch all
// the VM Scale Sets.
func (client VirtualMachineScaleSetsClient) ListAll(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vmsslwlr.Response.Response != nil {
+ sc = result.vmsslwlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -821,8 +926,8 @@ func (client VirtualMachineScaleSetsClient) ListAllResponder(resp *http.Response
}
// listAllNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetsClient) listAllNextResults(lastResults VirtualMachineScaleSetListWithLinkResult) (result VirtualMachineScaleSetListWithLinkResult, err error) {
- req, err := lastResults.virtualMachineScaleSetListWithLinkResultPreparer()
+func (client VirtualMachineScaleSetsClient) listAllNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListWithLinkResult) (result VirtualMachineScaleSetListWithLinkResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListWithLinkResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -843,6 +948,16 @@ func (client VirtualMachineScaleSetsClient) listAllNextResults(lastResults Virtu
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetsClient) ListAllComplete(ctx context.Context) (result VirtualMachineScaleSetListWithLinkResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -853,6 +968,16 @@ func (client VirtualMachineScaleSetsClient) ListAllComplete(ctx context.Context)
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
func (client VirtualMachineScaleSetsClient) ListSkus(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus")
+ defer func() {
+ sc := -1
+ if result.vmsslsr.Response.Response != nil {
+ sc = result.vmsslsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listSkusNextResults
req, err := client.ListSkusPreparer(ctx, resourceGroupName, VMScaleSetName)
if err != nil {
@@ -917,8 +1042,8 @@ func (client VirtualMachineScaleSetsClient) ListSkusResponder(resp *http.Respons
}
// listSkusNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetsClient) listSkusNextResults(lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) {
- req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer()
+func (client VirtualMachineScaleSetsClient) listSkusNextResults(ctx context.Context, lastResults VirtualMachineScaleSetListSkusResult) (result VirtualMachineScaleSetListSkusResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetListSkusResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "listSkusNextResults", nil, "Failure preparing next results request")
}
@@ -939,6 +1064,16 @@ func (client VirtualMachineScaleSetsClient) listSkusNextResults(lastResults Virt
// ListSkusComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context, resourceGroupName string, VMScaleSetName string) (result VirtualMachineScaleSetListSkusResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ListSkus")
+ 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.ListSkus(ctx, resourceGroupName, VMScaleSetName)
return
}
@@ -951,6 +1086,16 @@ func (client VirtualMachineScaleSetsClient) ListSkusComplete(ctx context.Context
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PerformMaintenance", nil, "Failure preparing request")
@@ -1001,10 +1146,6 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceSender(req *http.R
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1028,6 +1169,16 @@ func (client VirtualMachineScaleSetsClient) PerformMaintenanceResponder(resp *ht
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "PowerOff", nil, "Failure preparing request")
@@ -1078,10 +1229,6 @@ func (client VirtualMachineScaleSetsClient) PowerOffSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1104,6 +1251,16 @@ func (client VirtualMachineScaleSetsClient) PowerOffResponder(resp *http.Respons
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Redeploy", nil, "Failure preparing request")
@@ -1154,10 +1311,6 @@ func (client VirtualMachineScaleSetsClient) RedeploySender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1174,13 +1327,24 @@ func (client VirtualMachineScaleSetsClient) RedeployResponder(resp *http.Respons
return
}
-// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set.
+// Reimage reimages (upgrade the operating system) one or more virtual machines in a VM scale set which don't have a
+// ephemeral OS disk, for virtual machines who have a ephemeral OS disk the virtual machine is reset to initial state.
// Parameters:
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
-// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
-func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageFuture, err error) {
- req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
+// VMScaleSetReimageInput - parameters for Reimaging VM ScaleSet.
+func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (result VirtualMachineScaleSetsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, VMScaleSetReimageInput)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Reimage", nil, "Failure preparing request")
return
@@ -1196,7 +1360,7 @@ func (client VirtualMachineScaleSetsClient) Reimage(ctx context.Context, resourc
}
// ReimagePreparer prepares the Reimage request.
-func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (*http.Request, error) {
+func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMScaleSetReimageInput *VirtualMachineScaleSetReimageParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
@@ -1214,9 +1378,9 @@ func (client VirtualMachineScaleSetsClient) ReimagePreparer(ctx context.Context,
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/reimage", pathParameters),
autorest.WithQueryParameters(queryParameters))
- if VMInstanceIDs != nil {
+ if VMScaleSetReimageInput != nil {
preparer = autorest.DecoratePreparer(preparer,
- autorest.WithJSON(VMInstanceIDs))
+ autorest.WithJSON(VMScaleSetReimageInput))
}
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -1230,10 +1394,6 @@ func (client VirtualMachineScaleSetsClient) ReimageSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1257,6 +1417,16 @@ func (client VirtualMachineScaleSetsClient) ReimageResponder(resp *http.Response
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "ReimageAll", nil, "Failure preparing request")
@@ -1307,10 +1477,6 @@ func (client VirtualMachineScaleSetsClient) ReimageAllSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1333,6 +1499,16 @@ func (client VirtualMachineScaleSetsClient) ReimageAllResponder(resp *http.Respo
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Restart", nil, "Failure preparing request")
@@ -1383,10 +1559,6 @@ func (client VirtualMachineScaleSetsClient) RestartSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1409,6 +1581,16 @@ func (client VirtualMachineScaleSetsClient) RestartResponder(resp *http.Response
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs *VirtualMachineScaleSetVMInstanceIDs) (result VirtualMachineScaleSetsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, VMInstanceIDs)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Start", nil, "Failure preparing request")
@@ -1459,10 +1641,6 @@ func (client VirtualMachineScaleSetsClient) StartSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1485,6 +1663,16 @@ func (client VirtualMachineScaleSetsClient) StartResponder(resp *http.Response)
// VMScaleSetName - the name of the VM scale set to create or update.
// parameters - the scale set object.
func (client VirtualMachineScaleSetsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, parameters VirtualMachineScaleSetUpdate) (result VirtualMachineScaleSetsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, VMScaleSetName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetsClient", "Update", nil, "Failure preparing request")
@@ -1532,10 +1720,6 @@ func (client VirtualMachineScaleSetsClient) UpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1559,6 +1743,16 @@ func (client VirtualMachineScaleSetsClient) UpdateResponder(resp *http.Response)
// VMScaleSetName - the name of the VM scale set.
// VMInstanceIDs - a list of virtual machine instance IDs from the VM scale set.
func (client VirtualMachineScaleSetsClient) UpdateInstances(ctx context.Context, resourceGroupName string, VMScaleSetName string, VMInstanceIDs VirtualMachineScaleSetVMInstanceRequiredIDs) (result VirtualMachineScaleSetsUpdateInstancesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetsClient.UpdateInstances")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: VMInstanceIDs,
Constraints: []validation.Constraint{{Target: "VMInstanceIDs.InstanceIds", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -1612,10 +1806,6 @@ func (client VirtualMachineScaleSetsClient) UpdateInstancesSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
index 1b8d1d58ddb9..c6aeb85c6415 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinescalesetvms.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewVirtualMachineScaleSetVMsClientWithBaseURI(baseURI string, subscriptionI
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Deallocate(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeallocateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Deallocate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeallocatePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Deallocate", nil, "Failure preparing request")
@@ -94,10 +105,6 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateSender(req *http.Request
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -120,6 +127,16 @@ func (client VirtualMachineScaleSetVMsClient) DeallocateResponder(resp *http.Res
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Delete(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Delete", nil, "Failure preparing request")
@@ -166,10 +183,6 @@ func (client VirtualMachineScaleSetVMsClient) DeleteSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -192,6 +205,16 @@ func (client VirtualMachineScaleSetVMsClient) DeleteResponder(resp *http.Respons
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Get(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVM, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Get", nil, "Failure preparing request")
@@ -261,6 +284,16 @@ func (client VirtualMachineScaleSetVMsClient) GetResponder(resp *http.Response)
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) GetInstanceView(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMInstanceView, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.GetInstanceView")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetInstanceViewPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "GetInstanceView", nil, "Failure preparing request")
@@ -332,6 +365,16 @@ func (client VirtualMachineScaleSetVMsClient) GetInstanceViewResponder(resp *htt
// selectParameter - the list parameters.
// expand - the expand expression to apply to the operation.
func (client VirtualMachineScaleSetVMsClient) List(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.List")
+ defer func() {
+ sc := -1
+ if result.vmssvlr.Response.Response != nil {
+ sc = result.vmssvlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand)
if err != nil {
@@ -405,8 +448,8 @@ func (client VirtualMachineScaleSetVMsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachineScaleSetVMsClient) listNextResults(lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) {
- req, err := lastResults.virtualMachineScaleSetVMListResultPreparer()
+func (client VirtualMachineScaleSetVMsClient) listNextResults(ctx context.Context, lastResults VirtualMachineScaleSetVMListResult) (result VirtualMachineScaleSetVMListResult, err error) {
+ req, err := lastResults.virtualMachineScaleSetVMListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -427,6 +470,16 @@ func (client VirtualMachineScaleSetVMsClient) listNextResults(lastResults Virtua
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, filter string, selectParameter string, expand string) (result VirtualMachineScaleSetVMListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.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, resourceGroupName, virtualMachineScaleSetName, filter, selectParameter, expand)
return
}
@@ -437,6 +490,16 @@ func (client VirtualMachineScaleSetVMsClient) ListComplete(ctx context.Context,
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) PerformMaintenance(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPerformMaintenanceFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PerformMaintenance")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PerformMaintenancePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PerformMaintenance", nil, "Failure preparing request")
@@ -483,10 +546,6 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceSender(req *http
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -510,6 +569,16 @@ func (client VirtualMachineScaleSetVMsClient) PerformMaintenanceResponder(resp *
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) PowerOff(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsPowerOffFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.PowerOff")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PowerOffPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "PowerOff", nil, "Failure preparing request")
@@ -556,10 +625,6 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -582,6 +647,16 @@ func (client VirtualMachineScaleSetVMsClient) PowerOffResponder(resp *http.Respo
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Redeploy(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRedeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Redeploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RedeployPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Redeploy", nil, "Failure preparing request")
@@ -628,10 +703,6 @@ func (client VirtualMachineScaleSetVMsClient) RedeploySender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -653,8 +724,19 @@ func (client VirtualMachineScaleSetVMsClient) RedeployResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
-func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageFuture, err error) {
- req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
+// VMScaleSetVMReimageInput - parameters for the Reimaging Virtual machine in ScaleSet.
+func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (result VirtualMachineScaleSetVMsReimageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Reimage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ReimagePreparer(ctx, resourceGroupName, VMScaleSetName, instanceID, VMScaleSetVMReimageInput)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Reimage", nil, "Failure preparing request")
return
@@ -670,7 +752,7 @@ func (client VirtualMachineScaleSetVMsClient) Reimage(ctx context.Context, resou
}
// ReimagePreparer prepares the Reimage request.
-func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (*http.Request, error) {
+func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, VMScaleSetVMReimageInput *VirtualMachineScaleSetVMReimageParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"instanceId": autorest.Encode("path", instanceID),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -684,10 +766,15 @@ func (client VirtualMachineScaleSetVMsClient) ReimagePreparer(ctx context.Contex
}
preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualmachines/{instanceId}/reimage", pathParameters),
autorest.WithQueryParameters(queryParameters))
+ if VMScaleSetVMReimageInput != nil {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithJSON(VMScaleSetVMReimageInput))
+ }
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
@@ -700,10 +787,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageSender(req *http.Request) (
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -727,6 +810,16 @@ func (client VirtualMachineScaleSetVMsClient) ReimageResponder(resp *http.Respon
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) ReimageAll(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsReimageAllFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.ReimageAll")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ReimageAllPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "ReimageAll", nil, "Failure preparing request")
@@ -773,10 +866,6 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllSender(req *http.Request
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -799,6 +888,16 @@ func (client VirtualMachineScaleSetVMsClient) ReimageAllResponder(resp *http.Res
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Restart(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RestartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", nil, "Failure preparing request")
@@ -845,10 +944,6 @@ func (client VirtualMachineScaleSetVMsClient) RestartSender(req *http.Request) (
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -872,6 +967,16 @@ func (client VirtualMachineScaleSetVMsClient) RestartResponder(resp *http.Respon
// instanceID - the instance ID of the virtual machine.
// parameters - parameters supplied to the Run command operation.
func (client VirtualMachineScaleSetVMsClient) RunCommand(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters RunCommandInput) (result VirtualMachineScaleSetVMsRunCommandFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.RunCommand")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CommandID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -926,10 +1031,6 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandSender(req *http.Request
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -953,6 +1054,16 @@ func (client VirtualMachineScaleSetVMsClient) RunCommandResponder(resp *http.Res
// VMScaleSetName - the name of the VM scale set.
// instanceID - the instance ID of the virtual machine.
func (client VirtualMachineScaleSetVMsClient) Start(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string) (result VirtualMachineScaleSetVMsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, VMScaleSetName, instanceID)
if err != nil {
err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Start", nil, "Failure preparing request")
@@ -999,10 +1110,6 @@ func (client VirtualMachineScaleSetVMsClient) StartSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1026,6 +1133,16 @@ func (client VirtualMachineScaleSetVMsClient) StartResponder(resp *http.Response
// instanceID - the instance ID of the virtual machine.
// parameters - parameters supplied to the Update Virtual Machine Scale Sets VM operation.
func (client VirtualMachineScaleSetVMsClient) Update(ctx context.Context, resourceGroupName string, VMScaleSetName string, instanceID string, parameters VirtualMachineScaleSetVM) (result VirtualMachineScaleSetVMsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineScaleSetVMsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualMachineScaleSetVMProperties", Name: validation.Null, Rule: false,
@@ -1095,10 +1212,6 @@ func (client VirtualMachineScaleSetVMsClient) UpdateSender(req *http.Request) (f
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go
index 724c062523bc..01ec5f5d01c6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/compute/mgmt/2018-06-01/compute/virtualmachinesizes.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVirtualMachineSizesClientWithBaseURI(baseURI string, subscriptionID stri
// Parameters:
// location - the location upon which virtual-machine-sizes is queried.
func (client VirtualMachineSizesClient) List(ctx context.Context, location string) (result VirtualMachineSizeListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSizesClient.List")
+ 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: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._]+$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go
index 6131ee45c4fc..7cb91fb5cdef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/client.go
@@ -21,7 +21,11 @@ package containerinstance
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
)
const (
@@ -49,3 +53,153 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
SubscriptionID: subscriptionID,
}
}
+
+// ListCachedImages get the list of cached images on specific OS type for a subscription in a region.
+// Parameters:
+// location - the identifier for the physical azure location.
+func (client BaseClient) ListCachedImages(ctx context.Context, location string) (result CachedImagesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListCachedImages")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListCachedImagesPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCachedImages", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCachedImagesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCachedImages", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCachedImagesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCachedImages", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCachedImagesPreparer prepares the ListCachedImages request.
+func (client BaseClient) ListCachedImagesPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/cachedImages", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCachedImagesSender sends the ListCachedImages request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) ListCachedImagesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListCachedImagesResponder handles the response to the ListCachedImages request. The method always
+// closes the http.Response Body.
+func (client BaseClient) ListCachedImagesResponder(resp *http.Response) (result CachedImagesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListCapabilities get the list of CPU/memory/GPU capabilities of a region.
+// Parameters:
+// location - the identifier for the physical azure location.
+func (client BaseClient) ListCapabilities(ctx context.Context, location string) (result CapabilitiesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListCapabilities")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListCapabilitiesPreparer(ctx, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCapabilities", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListCapabilitiesSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCapabilities", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListCapabilitiesResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.BaseClient", "ListCapabilities", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListCapabilitiesPreparer prepares the ListCapabilities request.
+func (client BaseClient) ListCapabilitiesPreparer(ctx context.Context, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-10-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.ContainerInstance/locations/{location}/capabilities", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListCapabilitiesSender sends the ListCapabilities request. The method will close the
+// http.Response Body if it receives an error.
+func (client BaseClient) ListCapabilitiesSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListCapabilitiesResponder handles the response to the ListCapabilities request. The method always
+// closes the http.Response Body.
+func (client BaseClient) ListCapabilitiesResponder(resp *http.Response) (result CapabilitiesListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go
index 3d1654cc3c6b..3d7d31cb4afa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/container.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewContainerClientWithBaseURI(baseURI string, subscriptionID string) Contai
// containerName - the name of the container instance.
// containerExecRequest - the request for the exec command.
func (client ContainerClient) ExecuteCommand(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, containerExecRequest ContainerExecRequest) (result ContainerExecResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerClient.ExecuteCommand")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ExecuteCommandPreparer(ctx, resourceGroupName, containerGroupName, containerName, containerExecRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerClient", "ExecuteCommand", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client ContainerClient) ExecuteCommandResponder(resp *http.Response) (resu
// tail - the number of lines to show from the tail of the container instance log. If not provided, all
// available logs are shown up to 4mb.
func (client ContainerClient) ListLogs(ctx context.Context, resourceGroupName string, containerGroupName string, containerName string, tail *int32) (result Logs, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerClient.ListLogs")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListLogsPreparer(ctx, resourceGroupName, containerGroupName, containerName, tail)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerClient", "ListLogs", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go
index 44a179b62566..6912f56c6513 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroups.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewContainerGroupsClientWithBaseURI(baseURI string, subscriptionID string)
// containerGroupName - the name of the container group.
// containerGroup - the properties of the container group to be created or updated.
func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerGroupName string, containerGroup ContainerGroup) (result ContainerGroupsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: containerGroup,
Constraints: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties", Name: validation.Null, Rule: true,
@@ -60,6 +71,8 @@ func (client ContainerGroupsClient) CreateOrUpdate(ctx context.Context, resource
}},
{Target: "containerGroup.ContainerGroupProperties.NetworkProfile", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.NetworkProfile.ID", Name: validation.Null, Rule: true, Chain: nil}}},
+ {Target: "containerGroup.ContainerGroupProperties.DNSConfig", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "containerGroup.ContainerGroupProperties.DNSConfig.NameServers", Name: validation.Null, Rule: true, Chain: nil}}},
}}}}}); err != nil {
return result, validation.NewError("containerinstance.ContainerGroupsClient", "CreateOrUpdate", err.Error())
}
@@ -111,10 +124,6 @@ func (client ContainerGroupsClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -138,6 +147,16 @@ func (client ContainerGroupsClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// containerGroupName - the name of the container group.
func (client ContainerGroupsClient) Delete(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Delete", nil, "Failure preparing request")
@@ -207,6 +226,16 @@ func (client ContainerGroupsClient) DeleteResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// containerGroupName - the name of the container group.
func (client ContainerGroupsClient) Get(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Get", nil, "Failure preparing request")
@@ -273,6 +302,16 @@ func (client ContainerGroupsClient) GetResponder(resp *http.Response) (result Co
// container group including containers, image registry credentials, restart policy, IP address type, OS type, state,
// and volumes.
func (client ContainerGroupsClient) List(ctx context.Context) (result ContainerGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.cglr.Response.Response != nil {
+ sc = result.cglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -335,8 +374,8 @@ func (client ContainerGroupsClient) ListResponder(resp *http.Response) (result C
}
// listNextResults retrieves the next set of results, if any.
-func (client ContainerGroupsClient) listNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
- req, err := lastResults.containerGroupListResultPreparer()
+func (client ContainerGroupsClient) listNextResults(ctx context.Context, lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
+ req, err := lastResults.containerGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -357,6 +396,16 @@ func (client ContainerGroupsClient) listNextResults(lastResults ContainerGroupLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerGroupsClient) ListComplete(ctx context.Context) (result ContainerGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.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
}
@@ -367,6 +416,16 @@ func (client ContainerGroupsClient) ListComplete(ctx context.Context) (result Co
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ContainerGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ContainerGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.cglr.Response.Response != nil {
+ sc = result.cglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -430,8 +489,8 @@ func (client ContainerGroupsClient) ListByResourceGroupResponder(resp *http.Resp
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ContainerGroupsClient) listByResourceGroupNextResults(lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
- req, err := lastResults.containerGroupListResultPreparer()
+func (client ContainerGroupsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ContainerGroupListResult) (result ContainerGroupListResult, err error) {
+ req, err := lastResults.containerGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -452,6 +511,16 @@ func (client ContainerGroupsClient) listByResourceGroupNextResults(lastResults C
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerGroupsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ContainerGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -462,6 +531,16 @@ func (client ContainerGroupsClient) ListByResourceGroupComplete(ctx context.Cont
// resourceGroupName - the name of the resource group.
// containerGroupName - the name of the container group.
func (client ContainerGroupsClient) Restart(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroupsRestartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Restart")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RestartPreparer(ctx, resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Restart", nil, "Failure preparing request")
@@ -507,7 +586,79 @@ func (client ContainerGroupsClient) RestartSender(req *http.Request) (future Con
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent))
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// RestartResponder handles the response to the Restart request. The method always
+// closes the http.Response Body.
+func (client ContainerGroupsClient) RestartResponder(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
+}
+
+// Start starts all containers in a container group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// containerGroupName - the name of the container group.
+func (client ContainerGroupsClient) Start(ctx context.Context, resourceGroupName string, containerGroupName string) (result ContainerGroupsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.StartPreparer(ctx, resourceGroupName, containerGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.StartSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Start", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// StartPreparer prepares the Start request.
+func (client ContainerGroupsClient) StartPreparer(ctx context.Context, resourceGroupName string, containerGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "containerGroupName": autorest.Encode("path", containerGroupName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-10-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.ContainerInstance/containerGroups/{containerGroupName}/start", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// StartSender sends the Start request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerGroupsClient) StartSender(req *http.Request) (future ContainerGroupsStartFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
if err != nil {
return
}
@@ -515,9 +666,9 @@ func (client ContainerGroupsClient) RestartSender(req *http.Request) (future Con
return
}
-// RestartResponder handles the response to the Restart request. The method always
+// StartResponder handles the response to the Start request. The method always
// closes the http.Response Body.
-func (client ContainerGroupsClient) RestartResponder(resp *http.Response) (result autorest.Response, err error) {
+func (client ContainerGroupsClient) StartResponder(resp *http.Response) (result autorest.Response, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -532,6 +683,16 @@ func (client ContainerGroupsClient) RestartResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// containerGroupName - the name of the container group.
func (client ContainerGroupsClient) Stop(ctx context.Context, resourceGroupName string, containerGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Stop")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StopPreparer(ctx, resourceGroupName, containerGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Stop", nil, "Failure preparing request")
@@ -599,6 +760,16 @@ func (client ContainerGroupsClient) StopResponder(resp *http.Response) (result a
// containerGroupName - the name of the container group.
// resource - the container group resource with just the tags to be updated.
func (client ContainerGroupsClient) Update(ctx context.Context, resourceGroupName string, containerGroupName string, resource Resource) (result ContainerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, containerGroupName, resource)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go
index e83c12b02802..12cd1fc2e9b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/containergroupusage.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewContainerGroupUsageClientWithBaseURI(baseURI string, subscriptionID stri
// Parameters:
// location - the identifier for the physical azure location.
func (client ContainerGroupUsageClient) List(ctx context.Context, location string) (result UsageListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupUsageClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, location)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupUsageClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go
index f56d63e5d389..922c9f898dea 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/models.go
@@ -18,14 +18,19 @@ package containerinstance
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance"
+
// ContainerGroupIPAddressType enumerates the values for container group ip address type.
type ContainerGroupIPAddressType string
@@ -88,6 +93,23 @@ func PossibleContainerNetworkProtocolValues() []ContainerNetworkProtocol {
return []ContainerNetworkProtocol{ContainerNetworkProtocolTCP, ContainerNetworkProtocolUDP}
}
+// GpuSku enumerates the values for gpu sku.
+type GpuSku string
+
+const (
+ // K80 ...
+ K80 GpuSku = "K80"
+ // P100 ...
+ P100 GpuSku = "P100"
+ // V100 ...
+ V100 GpuSku = "V100"
+)
+
+// PossibleGpuSkuValues returns an array of possible values for the GpuSku const type.
+func PossibleGpuSkuValues() []GpuSku {
+ return []GpuSku{K80, P100, V100}
+}
+
// LogAnalyticsLogType enumerates the values for log analytics log type.
type LogAnalyticsLogType string
@@ -179,6 +201,77 @@ type AzureFileVolume struct {
StorageAccountKey *string `json:"storageAccountKey,omitempty"`
}
+// CachedImages the cached image and OS type.
+type CachedImages struct {
+ // ID - The resource Id of the cached image.
+ ID *string `json:"id,omitempty"`
+ // OsType - The OS type of the cached image.
+ OsType *string `json:"osType,omitempty"`
+ // Image - The cached image name.
+ Image *string `json:"image,omitempty"`
+}
+
+// CachedImagesListResult the response containing cached images.
+type CachedImagesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of cached images.
+ Value *[]CachedImages `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of cached images.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// Capabilities the regional capabilities.
+type Capabilities struct {
+ // ResourceType - The resource type that this capability describes.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // OsType - The OS type that this capability describes.
+ OsType *string `json:"osType,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // IPAddressType - The ip address type that this capability describes.
+ IPAddressType *string `json:"ipAddressType,omitempty"`
+ // Gpu - The GPU sku that this capability describes.
+ Gpu *string `json:"gpu,omitempty"`
+ // Capabilities - The supported capabilities.
+ Capabilities *CapabilitiesCapabilities `json:"capabilities,omitempty"`
+}
+
+// CapabilitiesCapabilities the supported capabilities.
+type CapabilitiesCapabilities struct {
+ // MaxMemoryInGB - The maximum allowed memory request in GB.
+ MaxMemoryInGB *float64 `json:"maxMemoryInGB,omitempty"`
+ // MaxCPU - The maximum allowed CPU request in cores.
+ MaxCPU *float64 `json:"maxCpu,omitempty"`
+ // MaxGpuCount - The maximum allowed GPU count.
+ MaxGpuCount *float64 `json:"maxGpuCount,omitempty"`
+}
+
+// CapabilitiesListResult the response containing list of capabilities.
+type CapabilitiesListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of capabilities.
+ Value *[]Capabilities `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page of capabilities.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// CloudError an error response from the Batch service.
+type CloudError struct {
+ Error *CloudErrorBody `json:"error,omitempty"`
+}
+
+// CloudErrorBody an error response from the Batch service.
+type CloudErrorBody struct {
+ // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ Code *string `json:"code,omitempty"`
+ // Message - A message describing the error, intended to be suitable for display in a user interface.
+ Message *string `json:"message,omitempty"`
+ // Target - The target of the particular error. For example, the name of the property in error.
+ Target *string `json:"target,omitempty"`
+ // Details - A list of additional details about the error.
+ Details *[]CloudErrorBody `json:"details,omitempty"`
+}
+
// Container a container instance.
type Container struct {
// Name - The user-provided name of the container instance.
@@ -445,14 +538,24 @@ type ContainerGroupListResultIterator struct {
page ContainerGroupListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ContainerGroupListResultIterator) Next() error {
+func (iter *ContainerGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -461,6 +564,13 @@ func (iter *ContainerGroupListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ContainerGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ContainerGroupListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -480,6 +590,11 @@ func (iter ContainerGroupListResultIterator) Value() ContainerGroup {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ContainerGroupListResultIterator type.
+func NewContainerGroupListResultIterator(page ContainerGroupListResultPage) ContainerGroupListResultIterator {
+ return ContainerGroupListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cglr ContainerGroupListResult) IsEmpty() bool {
return cglr.Value == nil || len(*cglr.Value) == 0
@@ -487,11 +602,11 @@ func (cglr ContainerGroupListResult) IsEmpty() bool {
// containerGroupListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cglr ContainerGroupListResult) containerGroupListResultPreparer() (*http.Request, error) {
+func (cglr ContainerGroupListResult) containerGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
if cglr.NextLink == nil || len(to.String(cglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cglr.NextLink)))
@@ -499,14 +614,24 @@ func (cglr ContainerGroupListResult) containerGroupListResultPreparer() (*http.R
// ContainerGroupListResultPage contains a page of ContainerGroup values.
type ContainerGroupListResultPage struct {
- fn func(ContainerGroupListResult) (ContainerGroupListResult, error)
+ fn func(context.Context, ContainerGroupListResult) (ContainerGroupListResult, error)
cglr ContainerGroupListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ContainerGroupListResultPage) Next() error {
- next, err := page.fn(page.cglr)
+func (page *ContainerGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cglr)
if err != nil {
return err
}
@@ -514,6 +639,13 @@ func (page *ContainerGroupListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ContainerGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ContainerGroupListResultPage) NotDone() bool {
return !page.cglr.IsEmpty()
@@ -532,6 +664,11 @@ func (page ContainerGroupListResultPage) Values() []ContainerGroup {
return *page.cglr.Value
}
+// Creates a new instance of the ContainerGroupListResultPage type.
+func NewContainerGroupListResultPage(getNextPage func(context.Context, ContainerGroupListResult) (ContainerGroupListResult, error)) ContainerGroupListResultPage {
+ return ContainerGroupListResultPage{fn: getNextPage}
+}
+
// ContainerGroupNetworkProfile container group network profile information.
type ContainerGroupNetworkProfile struct {
// ID - The identifier for a network profile.
@@ -564,6 +701,8 @@ type ContainerGroupProperties struct {
Diagnostics *ContainerGroupDiagnostics `json:"diagnostics,omitempty"`
// NetworkProfile - The network profile information for a container group.
NetworkProfile *ContainerGroupNetworkProfile `json:"networkProfile,omitempty"`
+ // DNSConfig - The DNS config information for a container group.
+ DNSConfig *DNSConfiguration `json:"dnsConfig,omitempty"`
}
// ContainerGroupPropertiesInstanceView the instance view of the container group. Only valid in response.
@@ -574,8 +713,8 @@ type ContainerGroupPropertiesInstanceView struct {
State *string `json:"state,omitempty"`
}
-// ContainerGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ContainerGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ContainerGroupsCreateOrUpdateFuture struct {
azure.Future
}
@@ -626,6 +765,29 @@ func (future *ContainerGroupsRestartFuture) Result(client ContainerGroupsClient)
return
}
+// ContainerGroupsStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ContainerGroupsStartFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ContainerGroupsStartFuture) Result(client ContainerGroupsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "containerinstance.ContainerGroupsStartFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("containerinstance.ContainerGroupsStartFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
// ContainerHTTPGet the container Http Get settings, for liveness or readiness probe
type ContainerHTTPGet struct {
// Path - The path to probe.
@@ -710,6 +872,16 @@ type ContainerState struct {
DetailStatus *string `json:"detailStatus,omitempty"`
}
+// DNSConfiguration DNS configuration for the container group.
+type DNSConfiguration struct {
+ // NameServers - The DNS servers for the container group.
+ NameServers *[]string `json:"nameServers,omitempty"`
+ // SearchDomains - The DNS search domains for hostname lookup in the container group.
+ SearchDomains *string `json:"searchDomains,omitempty"`
+ // Options - The DNS options for the container group.
+ Options *string `json:"options,omitempty"`
+}
+
// EnvironmentVariable the environment variable to set within the container instance.
type EnvironmentVariable struct {
// Name - The name of the environment variable.
@@ -746,6 +918,14 @@ type GitRepoVolume struct {
Revision *string `json:"revision,omitempty"`
}
+// GpuResource the GPU resource.
+type GpuResource struct {
+ // Count - The count of the GPU resource.
+ Count *int32 `json:"count,omitempty"`
+ // Sku - The SKU of the GPU resource. Possible values include: 'K80', 'P100', 'V100'
+ Sku GpuSku `json:"sku,omitempty"`
+}
+
// ImageRegistryCredential image registry credential.
type ImageRegistryCredential struct {
// Server - The Docker image registry server without a protocol such as "http" and "https".
@@ -813,6 +993,8 @@ type Operation struct {
Name *string `json:"name,omitempty"`
// Display - The display information of the operation.
Display *OperationDisplay `json:"display,omitempty"`
+ // Properties - The additional properties.
+ Properties interface{} `json:"properties,omitempty"`
// Origin - The intended executor of the operation. Possible values include: 'User', 'System'
Origin OperationsOrigin `json:"origin,omitempty"`
}
@@ -829,8 +1011,8 @@ type OperationDisplay struct {
Description *string `json:"description,omitempty"`
}
-// OperationListResult the operation list response that contains all operations for Azure Container Instance
-// service.
+// OperationListResult the operation list response that contains all operations for Azure Container
+// Instance service.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - The list of operations.
@@ -888,6 +1070,8 @@ type ResourceLimits struct {
MemoryInGB *float64 `json:"memoryInGB,omitempty"`
// CPU - The CPU limit of this container instance.
CPU *float64 `json:"cpu,omitempty"`
+ // Gpu - The GPU limit of this container instance.
+ Gpu *GpuResource `json:"gpu,omitempty"`
}
// ResourceRequests the resource requests.
@@ -896,6 +1080,8 @@ type ResourceRequests struct {
MemoryInGB *float64 `json:"memoryInGB,omitempty"`
// CPU - The CPU request of this container instance.
CPU *float64 `json:"cpu,omitempty"`
+ // Gpu - The GPU request of this container instance.
+ Gpu *GpuResource `json:"gpu,omitempty"`
}
// ResourceRequirements the resource requirements.
@@ -955,7 +1141,9 @@ func (vVar Volume) MarshalJSON() ([]byte, error) {
if vVar.AzureFile != nil {
objectMap["azureFile"] = vVar.AzureFile
}
- objectMap["emptyDir"] = vVar.EmptyDir
+ if vVar.EmptyDir != nil {
+ objectMap["emptyDir"] = vVar.EmptyDir
+ }
if vVar.Secret != nil {
objectMap["secret"] = vVar.Secret
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go
index a043265e74ce..e541b1d8b39b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List list the operations for Azure Container Instance service.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go
index 71250766cb1a..a5b6ddf95cee 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerinstance/mgmt/2018-10-01/containerinstance/serviceassociationlink.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewServiceAssociationLinkClientWithBaseURI(baseURI string, subscriptionID s
// virtualNetworkName - the name of the virtual network.
// subnetName - the name of the subnet.
func (client ServiceAssociationLinkClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceAssociationLinkClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerinstance.ServiceAssociationLinkClient", "Delete", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
index 8e5ee3778cba..dc74474134f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/models.go
@@ -18,14 +18,47 @@ package containerregistry
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry"
+
+// Action enumerates the values for action.
+type Action string
+
+const (
+ // Allow ...
+ Allow Action = "Allow"
+)
+
+// PossibleActionValues returns an array of possible values for the Action const type.
+func PossibleActionValues() []Action {
+ return []Action{Allow}
+}
+
+// DefaultAction enumerates the values for default action.
+type DefaultAction string
+
+const (
+ // DefaultActionAllow ...
+ DefaultActionAllow DefaultAction = "Allow"
+ // DefaultActionDeny ...
+ DefaultActionDeny DefaultAction = "Deny"
+)
+
+// PossibleDefaultActionValues returns an array of possible values for the DefaultAction const type.
+func PossibleDefaultActionValues() []DefaultAction {
+ return []DefaultAction{DefaultActionAllow, DefaultActionDeny}
+}
+
// ImportMode enumerates the values for import mode.
type ImportMode string
@@ -164,6 +197,10 @@ func PossibleTrustPolicyTypeValues() []TrustPolicyType {
type WebhookAction string
const (
+ // ChartDelete ...
+ ChartDelete WebhookAction = "chart_delete"
+ // ChartPush ...
+ ChartPush WebhookAction = "chart_push"
// Delete ...
Delete WebhookAction = "delete"
// Push ...
@@ -174,7 +211,7 @@ const (
// PossibleWebhookActionValues returns an array of possible values for the WebhookAction const type.
func PossibleWebhookActionValues() []WebhookAction {
- return []WebhookAction{Delete, Push, Quarantine}
+ return []WebhookAction{ChartDelete, ChartPush, Delete, Push, Quarantine}
}
// WebhookStatus enumerates the values for webhook status.
@@ -192,8 +229,8 @@ func PossibleWebhookStatusValues() []WebhookStatus {
return []WebhookStatus{WebhookStatusDisabled, WebhookStatusEnabled}
}
-// Actor the agent that initiated the event. For most situations, this could be from the authorization context of
-// the request.
+// Actor the agent that initiated the event. For most situations, this could be from the authorization
+// context of the request.
type Actor struct {
// Name - The subject or username associated with the request context that generated the event.
Name *string `json:"name,omitempty"`
@@ -270,14 +307,24 @@ type EventListResultIterator struct {
page EventListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EventListResultIterator) Next() error {
+func (iter *EventListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -286,6 +333,13 @@ func (iter *EventListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EventListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EventListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -305,6 +359,11 @@ func (iter EventListResultIterator) Value() Event {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EventListResultIterator type.
+func NewEventListResultIterator(page EventListResultPage) EventListResultIterator {
+ return EventListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (elr EventListResult) IsEmpty() bool {
return elr.Value == nil || len(*elr.Value) == 0
@@ -312,11 +371,11 @@ func (elr EventListResult) IsEmpty() bool {
// eventListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (elr EventListResult) eventListResultPreparer() (*http.Request, error) {
+func (elr EventListResult) eventListResultPreparer(ctx context.Context) (*http.Request, error) {
if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(elr.NextLink)))
@@ -324,14 +383,24 @@ func (elr EventListResult) eventListResultPreparer() (*http.Request, error) {
// EventListResultPage contains a page of Event values.
type EventListResultPage struct {
- fn func(EventListResult) (EventListResult, error)
+ fn func(context.Context, EventListResult) (EventListResult, error)
elr EventListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EventListResultPage) Next() error {
- next, err := page.fn(page.elr)
+func (page *EventListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.elr)
if err != nil {
return err
}
@@ -339,6 +408,13 @@ func (page *EventListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EventListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EventListResultPage) NotDone() bool {
return !page.elr.IsEmpty()
@@ -357,6 +433,11 @@ func (page EventListResultPage) Values() []Event {
return *page.elr.Value
}
+// Creates a new instance of the EventListResultPage type.
+func NewEventListResultPage(getNextPage func(context.Context, EventListResult) (EventListResult, error)) EventListResultPage {
+ return EventListResultPage{fn: getNextPage}
+}
+
// EventRequestMessage the event request message sent to the service URI.
type EventRequestMessage struct {
// Content - The content of the event request message.
@@ -462,6 +543,24 @@ type ImportSourceCredentials struct {
Password *string `json:"password,omitempty"`
}
+// IPRule IP rule with specific IP or IP range in CIDR format.
+type IPRule struct {
+ // Action - The action of IP ACL rule. Possible values include: 'Allow'
+ Action Action `json:"action,omitempty"`
+ // IPAddressOrRange - Specifies the IP or IP range in CIDR format. Only IPV4 address is allowed.
+ IPAddressOrRange *string `json:"value,omitempty"`
+}
+
+// NetworkRuleSet the network rule set for a container registry.
+type NetworkRuleSet struct {
+ // DefaultAction - The default action of allow or deny when no other rules match. Possible values include: 'DefaultActionAllow', 'DefaultActionDeny'
+ DefaultAction DefaultAction `json:"defaultAction,omitempty"`
+ // VirtualNetworkRules - The virtual network rules.
+ VirtualNetworkRules *[]VirtualNetworkRule `json:"virtualNetworkRules,omitempty"`
+ // IPRules - The IP ACL rules.
+ IPRules *[]IPRule `json:"ipRules,omitempty"`
+}
+
// OperationDefinition the definition of a container registry operation.
type OperationDefinition struct {
// Origin - The origin information of the container registry operation.
@@ -570,14 +669,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -586,6 +695,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -605,6 +721,11 @@ func (iter OperationListResultIterator) Value() OperationDefinition {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -612,11 +733,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -624,14 +745,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of OperationDefinition values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -639,6 +770,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -657,6 +795,11 @@ func (page OperationListResultPage) Values() []OperationDefinition {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationMetricSpecificationDefinition the definition of Azure Monitoring metric.
type OperationMetricSpecificationDefinition struct {
// Name - Metric name.
@@ -697,7 +840,8 @@ type RegenerateCredentialParameters struct {
Name PasswordName `json:"name,omitempty"`
}
-// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RegistriesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RegistriesCreateFuture struct {
azure.Future
}
@@ -725,7 +869,8 @@ func (future *RegistriesCreateFuture) Result(client RegistriesClient) (r Registr
return
}
-// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RegistriesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RegistriesDeleteFuture struct {
azure.Future
}
@@ -770,7 +915,8 @@ func (future *RegistriesImportImageFuture) Result(client RegistriesClient) (ar a
return
}
-// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RegistriesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RegistriesUpdateFuture struct {
azure.Future
}
@@ -798,8 +944,8 @@ func (future *RegistriesUpdateFuture) Result(client RegistriesClient) (r Registr
return
}
-// RegistriesUpdatePoliciesFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// RegistriesUpdatePoliciesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type RegistriesUpdatePoliciesFuture struct {
azure.Future
}
@@ -999,14 +1145,24 @@ type RegistryListResultIterator struct {
page RegistryListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RegistryListResultIterator) Next() error {
+func (iter *RegistryListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistryListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1015,6 +1171,13 @@ func (iter *RegistryListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RegistryListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RegistryListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1034,6 +1197,11 @@ func (iter RegistryListResultIterator) Value() Registry {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RegistryListResultIterator type.
+func NewRegistryListResultIterator(page RegistryListResultPage) RegistryListResultIterator {
+ return RegistryListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr RegistryListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -1041,11 +1209,11 @@ func (rlr RegistryListResult) IsEmpty() bool {
// registryListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr RegistryListResult) registryListResultPreparer() (*http.Request, error) {
+func (rlr RegistryListResult) registryListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -1053,14 +1221,24 @@ func (rlr RegistryListResult) registryListResultPreparer() (*http.Request, error
// RegistryListResultPage contains a page of Registry values.
type RegistryListResultPage struct {
- fn func(RegistryListResult) (RegistryListResult, error)
+ fn func(context.Context, RegistryListResult) (RegistryListResult, error)
rlr RegistryListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RegistryListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *RegistryListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistryListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -1068,6 +1246,13 @@ func (page *RegistryListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RegistryListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RegistryListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -1086,6 +1271,11 @@ func (page RegistryListResultPage) Values() []Registry {
return *page.rlr.Value
}
+// Creates a new instance of the RegistryListResultPage type.
+func NewRegistryListResultPage(getNextPage func(context.Context, RegistryListResult) (RegistryListResult, error)) RegistryListResultPage {
+ return RegistryListResultPage{fn: getNextPage}
+}
+
// RegistryNameCheckRequest a request to check whether a container registry name is available.
type RegistryNameCheckRequest struct {
// Name - The name of the container registry.
@@ -1136,6 +1326,8 @@ type RegistryProperties struct {
AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"`
// StorageAccount - The properties of the storage account for the container registry. Only applicable to Classic SKU.
StorageAccount *StorageAccountProperties `json:"storageAccount,omitempty"`
+ // NetworkRuleSet - The network rule set for a container registry.
+ NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"`
}
// RegistryPropertiesUpdateParameters the parameters for updating the properties of a container registry.
@@ -1144,6 +1336,8 @@ type RegistryPropertiesUpdateParameters struct {
AdminUserEnabled *bool `json:"adminUserEnabled,omitempty"`
// StorageAccount - The parameters of a storage account for the container registry. Only applicable to Classic SKU. If specified, the storage account must be in the same physical location as the container registry.
StorageAccount *StorageAccountProperties `json:"storageAccount,omitempty"`
+ // NetworkRuleSet - The network rule set for a container registry.
+ NetworkRuleSet *NetworkRuleSet `json:"networkRuleSet,omitempty"`
}
// RegistryUpdateParameters the parameters for updating a container registry.
@@ -1371,14 +1565,24 @@ type ReplicationListResultIterator struct {
page ReplicationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ReplicationListResultIterator) Next() error {
+func (iter *ReplicationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1387,6 +1591,13 @@ func (iter *ReplicationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ReplicationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReplicationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1406,6 +1617,11 @@ func (iter ReplicationListResultIterator) Value() Replication {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ReplicationListResultIterator type.
+func NewReplicationListResultIterator(page ReplicationListResultPage) ReplicationListResultIterator {
+ return ReplicationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr ReplicationListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -1413,11 +1629,11 @@ func (rlr ReplicationListResult) IsEmpty() bool {
// replicationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr ReplicationListResult) replicationListResultPreparer() (*http.Request, error) {
+func (rlr ReplicationListResult) replicationListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -1425,14 +1641,24 @@ func (rlr ReplicationListResult) replicationListResultPreparer() (*http.Request,
// ReplicationListResultPage contains a page of Replication values.
type ReplicationListResultPage struct {
- fn func(ReplicationListResult) (ReplicationListResult, error)
+ fn func(context.Context, ReplicationListResult) (ReplicationListResult, error)
rlr ReplicationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ReplicationListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *ReplicationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -1440,6 +1666,13 @@ func (page *ReplicationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ReplicationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReplicationListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -1458,6 +1691,11 @@ func (page ReplicationListResultPage) Values() []Replication {
return *page.rlr.Value
}
+// Creates a new instance of the ReplicationListResultPage type.
+func NewReplicationListResultPage(getNextPage func(context.Context, ReplicationListResult) (ReplicationListResult, error)) ReplicationListResultPage {
+ return ReplicationListResultPage{fn: getNextPage}
+}
+
// ReplicationProperties the properties of a replication.
type ReplicationProperties struct {
// ProvisioningState - The provisioning state of the replication at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'
@@ -1466,7 +1704,8 @@ type ReplicationProperties struct {
Status *Status `json:"status,omitempty"`
}
-// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ReplicationsCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ReplicationsCreateFuture struct {
azure.Future
}
@@ -1494,7 +1733,8 @@ func (future *ReplicationsCreateFuture) Result(client ReplicationsClient) (r Rep
return
}
-// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ReplicationsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ReplicationsDeleteFuture struct {
azure.Future
}
@@ -1516,7 +1756,8 @@ func (future *ReplicationsDeleteFuture) Result(client ReplicationsClient) (ar au
return
}
-// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ReplicationsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ReplicationsUpdateFuture struct {
azure.Future
}
@@ -1616,8 +1857,8 @@ type Sku struct {
Tier SkuTier `json:"tier,omitempty"`
}
-// Source the registry node that generated the event. Put differently, while the actor initiates the event, the
-// source generates it.
+// Source the registry node that generated the event. Put differently, while the actor initiates the event,
+// the source generates it.
type Source struct {
// Addr - The IP or hostname and the port of the registry node that generated the event. Generally, this will be resolved by os.Hostname() along with the running port.
Addr *string `json:"addr,omitempty"`
@@ -1635,8 +1876,8 @@ type Status struct {
Timestamp *date.Time `json:"timestamp,omitempty"`
}
-// StorageAccountProperties the properties of a storage account for a container registry. Only applicable to
-// Classic SKU.
+// StorageAccountProperties the properties of a storage account for a container registry. Only applicable
+// to Classic SKU.
type StorageAccountProperties struct {
// ID - The resource ID of the storage account.
ID *string `json:"id,omitempty"`
@@ -1668,6 +1909,14 @@ type TrustPolicy struct {
Status PolicyStatus `json:"status,omitempty"`
}
+// VirtualNetworkRule virtual network rule.
+type VirtualNetworkRule struct {
+ // Action - The action of virtual network rule. Possible values include: 'Allow'
+ Action Action `json:"action,omitempty"`
+ // VirtualNetworkResourceID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.
+ VirtualNetworkResourceID *string `json:"id,omitempty"`
+}
+
// Webhook an object that represents a webhook for a container registry.
type Webhook struct {
autorest.Response `json:"-"`
@@ -1860,14 +2109,24 @@ type WebhookListResultIterator struct {
page WebhookListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WebhookListResultIterator) Next() error {
+func (iter *WebhookListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1876,6 +2135,13 @@ func (iter *WebhookListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WebhookListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WebhookListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1895,6 +2161,11 @@ func (iter WebhookListResultIterator) Value() Webhook {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WebhookListResultIterator type.
+func NewWebhookListResultIterator(page WebhookListResultPage) WebhookListResultIterator {
+ return WebhookListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wlr WebhookListResult) IsEmpty() bool {
return wlr.Value == nil || len(*wlr.Value) == 0
@@ -1902,11 +2173,11 @@ func (wlr WebhookListResult) IsEmpty() bool {
// webhookListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wlr WebhookListResult) webhookListResultPreparer() (*http.Request, error) {
+func (wlr WebhookListResult) webhookListResultPreparer(ctx context.Context) (*http.Request, error) {
if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wlr.NextLink)))
@@ -1914,14 +2185,24 @@ func (wlr WebhookListResult) webhookListResultPreparer() (*http.Request, error)
// WebhookListResultPage contains a page of Webhook values.
type WebhookListResultPage struct {
- fn func(WebhookListResult) (WebhookListResult, error)
+ fn func(context.Context, WebhookListResult) (WebhookListResult, error)
wlr WebhookListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WebhookListResultPage) Next() error {
- next, err := page.fn(page.wlr)
+func (page *WebhookListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhookListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wlr)
if err != nil {
return err
}
@@ -1929,6 +2210,13 @@ func (page *WebhookListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WebhookListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WebhookListResultPage) NotDone() bool {
return !page.wlr.IsEmpty()
@@ -1947,6 +2235,11 @@ func (page WebhookListResultPage) Values() []Webhook {
return *page.wlr.Value
}
+// Creates a new instance of the WebhookListResultPage type.
+func NewWebhookListResultPage(getNextPage func(context.Context, WebhookListResult) (WebhookListResult, error)) WebhookListResultPage {
+ return WebhookListResultPage{fn: getNextPage}
+}
+
// WebhookProperties the properties of a webhook.
type WebhookProperties struct {
// Status - The status of the webhook at the time the operation was called. Possible values include: 'WebhookStatusEnabled', 'WebhookStatusDisabled'
@@ -2029,7 +2322,8 @@ func (wpup WebhookPropertiesUpdateParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WebhooksCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WebhooksCreateFuture struct {
azure.Future
}
@@ -2057,7 +2351,8 @@ func (future *WebhooksCreateFuture) Result(client WebhooksClient) (w Webhook, er
return
}
-// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WebhooksDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WebhooksDeleteFuture struct {
azure.Future
}
@@ -2079,7 +2374,8 @@ func (future *WebhooksDeleteFuture) Result(client WebhooksClient) (ar autorest.R
return
}
-// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WebhooksUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WebhooksUpdateFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go
index 3cbea4bd4490..639a54292be9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Azure Container Registry REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
index b02ca13b2ea2..f904f1b91e1e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/registries.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewRegistriesClientWithBaseURI(baseURI string, subscriptionID string) Regis
// Parameters:
// registryNameCheckRequest - the object containing information for the availability request.
func (client RegistriesClient) CheckNameAvailability(ctx context.Context, registryNameCheckRequest RegistryNameCheckRequest) (result RegistryNameStatus, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.CheckNameAvailability")
+ 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: registryNameCheckRequest,
Constraints: []validation.Constraint{{Target: "registryNameCheckRequest.Name", Name: validation.Null, Rule: true,
@@ -124,7 +135,19 @@ func (client RegistriesClient) CheckNameAvailabilityResponder(resp *http.Respons
// registryName - the name of the container registry.
// registry - the parameters for creating a container registry.
func (client RegistriesClient) Create(ctx context.Context, resourceGroupName string, registryName string, registry Registry) (result RegistriesCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Create")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -185,10 +208,6 @@ func (client RegistriesClient) CreateSender(req *http.Request) (future Registrie
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -211,7 +230,19 @@ func (client RegistriesClient) CreateResponder(resp *http.Response) (result Regi
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client RegistriesClient) Delete(ctx context.Context, resourceGroupName string, registryName string) (result RegistriesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Delete")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -264,10 +295,6 @@ func (client RegistriesClient) DeleteSender(req *http.Request) (future Registrie
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -289,7 +316,19 @@ func (client RegistriesClient) DeleteResponder(resp *http.Response) (result auto
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client RegistriesClient) Get(ctx context.Context, resourceGroupName string, registryName string) (result Registry, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Get")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -365,7 +404,19 @@ func (client RegistriesClient) GetResponder(resp *http.Response) (result Registr
// registryName - the name of the container registry.
// parameters - the parameters specifying the image to copy and the source container registry.
func (client RegistriesClient) ImportImage(ctx context.Context, resourceGroupName string, registryName string, parameters ImportImageParameters) (result RegistriesImportImageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ImportImage")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -426,10 +477,6 @@ func (client RegistriesClient) ImportImageSender(req *http.Request) (future Regi
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -448,6 +495,16 @@ func (client RegistriesClient) ImportImageResponder(resp *http.Response) (result
// List lists all the container registries under the specified subscription.
func (client RegistriesClient) List(ctx context.Context) (result RegistryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.List")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -510,8 +567,8 @@ func (client RegistriesClient) ListResponder(resp *http.Response) (result Regist
}
// listNextResults retrieves the next set of results, if any.
-func (client RegistriesClient) listNextResults(lastResults RegistryListResult) (result RegistryListResult, err error) {
- req, err := lastResults.registryListResultPreparer()
+func (client RegistriesClient) listNextResults(ctx context.Context, lastResults RegistryListResult) (result RegistryListResult, err error) {
+ req, err := lastResults.registryListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -532,6 +589,16 @@ func (client RegistriesClient) listNextResults(lastResults RegistryListResult) (
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RegistriesClient) ListComplete(ctx context.Context) (result RegistryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.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
}
@@ -540,6 +607,22 @@ func (client RegistriesClient) ListComplete(ctx context.Context) (result Registr
// Parameters:
// resourceGroupName - the name of the resource group to which the container registry belongs.
func (client RegistriesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RegistryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("containerregistry.RegistriesClient", "ListByResourceGroup", err.Error())
+ }
+
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -603,8 +686,8 @@ func (client RegistriesClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client RegistriesClient) listByResourceGroupNextResults(lastResults RegistryListResult) (result RegistryListResult, err error) {
- req, err := lastResults.registryListResultPreparer()
+func (client RegistriesClient) listByResourceGroupNextResults(ctx context.Context, lastResults RegistryListResult) (result RegistryListResult, err error) {
+ req, err := lastResults.registryListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.RegistriesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -625,6 +708,16 @@ func (client RegistriesClient) listByResourceGroupNextResults(lastResults Regist
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client RegistriesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RegistryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -634,7 +727,19 @@ func (client RegistriesClient) ListByResourceGroupComplete(ctx context.Context,
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client RegistriesClient) ListCredentials(ctx context.Context, resourceGroupName string, registryName string) (result RegistryListCredentialsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListCredentials")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -709,7 +814,19 @@ func (client RegistriesClient) ListCredentialsResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client RegistriesClient) ListPolicies(ctx context.Context, resourceGroupName string, registryName string) (result RegistryPolicies, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListPolicies")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -784,7 +901,19 @@ func (client RegistriesClient) ListPoliciesResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client RegistriesClient) ListUsages(ctx context.Context, resourceGroupName string, registryName string) (result RegistryUsageListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.ListUsages")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -861,7 +990,19 @@ func (client RegistriesClient) ListUsagesResponder(resp *http.Response) (result
// regenerateCredentialParameters - specifies name of the password which should be regenerated -- password or
// password2.
func (client RegistriesClient) RegenerateCredential(ctx context.Context, resourceGroupName string, registryName string, regenerateCredentialParameters RegenerateCredentialParameters) (result RegistryListCredentialsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.RegenerateCredential")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -939,7 +1080,19 @@ func (client RegistriesClient) RegenerateCredentialResponder(resp *http.Response
// registryName - the name of the container registry.
// registryUpdateParameters - the parameters for updating a container registry.
func (client RegistriesClient) Update(ctx context.Context, resourceGroupName string, registryName string, registryUpdateParameters RegistryUpdateParameters) (result RegistriesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.Update")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -994,10 +1147,6 @@ func (client RegistriesClient) UpdateSender(req *http.Request) (future Registrie
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1021,7 +1170,19 @@ func (client RegistriesClient) UpdateResponder(resp *http.Response) (result Regi
// registryName - the name of the container registry.
// registryPoliciesUpdateParameters - the parameters for updating policies of a container registry.
func (client RegistriesClient) UpdatePolicies(ctx context.Context, resourceGroupName string, registryName string, registryPoliciesUpdateParameters RegistryPolicies) (result RegistriesUpdatePoliciesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegistriesClient.UpdatePolicies")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -1076,10 +1237,6 @@ func (client RegistriesClient) UpdatePoliciesSender(req *http.Request) (future R
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
index 0fdc10204bd0..5dcdd614b16e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/replications.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,7 +48,19 @@ func NewReplicationsClientWithBaseURI(baseURI string, subscriptionID string) Rep
// replicationName - the name of the replication.
// replication - the parameters for creating a replication.
func (client ReplicationsClient) Create(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replication Replication) (result ReplicationsCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Create")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -107,10 +120,6 @@ func (client ReplicationsClient) CreateSender(req *http.Request) (future Replica
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -134,7 +143,19 @@ func (client ReplicationsClient) CreateResponder(resp *http.Response) (result Re
// registryName - the name of the container registry.
// replicationName - the name of the replication.
func (client ReplicationsClient) Delete(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result ReplicationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Delete")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -192,10 +213,6 @@ func (client ReplicationsClient) DeleteSender(req *http.Request) (future Replica
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -218,7 +235,19 @@ func (client ReplicationsClient) DeleteResponder(resp *http.Response) (result au
// registryName - the name of the container registry.
// replicationName - the name of the replication.
func (client ReplicationsClient) Get(ctx context.Context, resourceGroupName string, registryName string, replicationName string) (result Replication, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Get")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -298,7 +327,19 @@ func (client ReplicationsClient) GetResponder(resp *http.Response) (result Repli
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client ReplicationsClient) List(ctx context.Context, resourceGroupName string, registryName string) (result ReplicationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.List")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -370,8 +411,8 @@ func (client ReplicationsClient) ListResponder(resp *http.Response) (result Repl
}
// listNextResults retrieves the next set of results, if any.
-func (client ReplicationsClient) listNextResults(lastResults ReplicationListResult) (result ReplicationListResult, err error) {
- req, err := lastResults.replicationListResultPreparer()
+func (client ReplicationsClient) listNextResults(ctx context.Context, lastResults ReplicationListResult) (result ReplicationListResult, err error) {
+ req, err := lastResults.replicationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.ReplicationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -392,6 +433,16 @@ func (client ReplicationsClient) listNextResults(lastResults ReplicationListResu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReplicationsClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result ReplicationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.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, resourceGroupName, registryName)
return
}
@@ -403,7 +454,19 @@ func (client ReplicationsClient) ListComplete(ctx context.Context, resourceGroup
// replicationName - the name of the replication.
// replicationUpdateParameters - the parameters for updating a replication.
func (client ReplicationsClient) Update(ctx context.Context, resourceGroupName string, registryName string, replicationName string, replicationUpdateParameters ReplicationUpdateParameters) (result ReplicationsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicationsClient.Update")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -463,10 +526,6 @@ func (client ReplicationsClient) UpdateSender(req *http.Request) (future Replica
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
index 09120fdb0306..941ba33ecbe5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerregistry/mgmt/2017-10-01/containerregistry/webhooks.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,7 +48,19 @@ func NewWebhooksClientWithBaseURI(baseURI string, subscriptionID string) Webhook
// webhookName - the name of the webhook.
// webhookCreateParameters - the parameters for creating a webhook.
func (client WebhooksClient) Create(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookCreateParameters WebhookCreateParameters) (result WebhooksCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Create")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -113,10 +126,6 @@ func (client WebhooksClient) CreateSender(req *http.Request) (future WebhooksCre
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -140,7 +149,19 @@ func (client WebhooksClient) CreateResponder(resp *http.Response) (result Webhoo
// registryName - the name of the container registry.
// webhookName - the name of the webhook.
func (client WebhooksClient) Delete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result WebhooksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Delete")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -198,10 +219,6 @@ func (client WebhooksClient) DeleteSender(req *http.Request) (future WebhooksDel
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -224,7 +241,19 @@ func (client WebhooksClient) DeleteResponder(resp *http.Response) (result autore
// registryName - the name of the container registry.
// webhookName - the name of the webhook.
func (client WebhooksClient) Get(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result Webhook, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Get")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -305,7 +334,19 @@ func (client WebhooksClient) GetResponder(resp *http.Response) (result Webhook,
// registryName - the name of the container registry.
// webhookName - the name of the webhook.
func (client WebhooksClient) GetCallbackConfig(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result CallbackConfig, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.GetCallbackConfig")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -385,7 +426,19 @@ func (client WebhooksClient) GetCallbackConfigResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group to which the container registry belongs.
// registryName - the name of the container registry.
func (client WebhooksClient) List(ctx context.Context, resourceGroupName string, registryName string) (result WebhookListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.List")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -457,8 +510,8 @@ func (client WebhooksClient) ListResponder(resp *http.Response) (result WebhookL
}
// listNextResults retrieves the next set of results, if any.
-func (client WebhooksClient) listNextResults(lastResults WebhookListResult) (result WebhookListResult, err error) {
- req, err := lastResults.webhookListResultPreparer()
+func (client WebhooksClient) listNextResults(ctx context.Context, lastResults WebhookListResult) (result WebhookListResult, err error) {
+ req, err := lastResults.webhookListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -479,6 +532,16 @@ func (client WebhooksClient) listNextResults(lastResults WebhookListResult) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebhooksClient) ListComplete(ctx context.Context, resourceGroupName string, registryName string) (result WebhookListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.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, resourceGroupName, registryName)
return
}
@@ -489,7 +552,19 @@ func (client WebhooksClient) ListComplete(ctx context.Context, resourceGroupName
// registryName - the name of the container registry.
// webhookName - the name of the webhook.
func (client WebhooksClient) ListEvents(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.ListEvents")
+ defer func() {
+ sc := -1
+ if result.elr.Response.Response != nil {
+ sc = result.elr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
+ {TargetValue: resourceGroupName,
+ Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -566,8 +641,8 @@ func (client WebhooksClient) ListEventsResponder(resp *http.Response) (result Ev
}
// listEventsNextResults retrieves the next set of results, if any.
-func (client WebhooksClient) listEventsNextResults(lastResults EventListResult) (result EventListResult, err error) {
- req, err := lastResults.eventListResultPreparer()
+func (client WebhooksClient) listEventsNextResults(ctx context.Context, lastResults EventListResult) (result EventListResult, err error) {
+ req, err := lastResults.eventListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerregistry.WebhooksClient", "listEventsNextResults", nil, "Failure preparing next results request")
}
@@ -588,6 +663,16 @@ func (client WebhooksClient) listEventsNextResults(lastResults EventListResult)
// ListEventsComplete enumerates all values, automatically crossing page boundaries as required.
func (client WebhooksClient) ListEventsComplete(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.ListEvents")
+ 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.ListEvents(ctx, resourceGroupName, registryName, webhookName)
return
}
@@ -598,7 +683,19 @@ func (client WebhooksClient) ListEventsComplete(ctx context.Context, resourceGro
// registryName - the name of the container registry.
// webhookName - the name of the webhook.
func (client WebhooksClient) Ping(ctx context.Context, resourceGroupName string, registryName string, webhookName string) (result EventInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Ping")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -680,7 +777,19 @@ func (client WebhooksClient) PingResponder(resp *http.Response) (result EventInf
// webhookName - the name of the webhook.
// webhookUpdateParameters - the parameters for updating a webhook.
func (client WebhooksClient) Update(ctx context.Context, resourceGroupName string, registryName string, webhookName string, webhookUpdateParameters WebhookUpdateParameters) (result WebhooksUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WebhooksClient.Update")
+ 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.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: registryName,
Constraints: []validation.Constraint{{Target: "registryName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "registryName", Name: validation.MinLength, Rule: 5, Chain: nil},
@@ -740,10 +849,6 @@ func (client WebhooksClient) UpdateSender(req *http.Request) (future WebhooksUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go
index bae1ecf8d57d..1fa4695e5adb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/containerservices.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewContainerServicesClientWithBaseURI(baseURI string, subscriptionID string
// containerServiceName - the name of the container service in the specified subscription and resource group.
// parameters - parameters supplied to the Create or Update a Container Service operation.
func (client ContainerServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, containerServiceName string, parameters ContainerService) (result ContainerServicesCreateOrUpdateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: false,
@@ -153,6 +164,16 @@ func (client ContainerServicesClient) CreateOrUpdateResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// containerServiceName - the name of the container service in the specified subscription and resource group.
func (client ContainerServicesClient) Delete(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerServicesDeleteFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, containerServiceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Delete", nil, "Failure preparing request")
@@ -221,6 +242,16 @@ func (client ContainerServicesClient) DeleteResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// containerServiceName - the name of the container service in the specified subscription and resource group.
func (client ContainerServicesClient) Get(ctx context.Context, resourceGroupName string, containerServiceName string) (result ContainerService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, containerServiceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "Get", nil, "Failure preparing request")
@@ -286,6 +317,16 @@ func (client ContainerServicesClient) GetResponder(resp *http.Response) (result
// List gets a list of container services in the specified subscription. The operation returns properties of each
// container service including state, orchestrator, number of masters and agents, and FQDNs of masters and agents.
func (client ContainerServicesClient) List(ctx context.Context) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -348,8 +389,8 @@ func (client ContainerServicesClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client ContainerServicesClient) listNextResults(lastResults ListResult) (result ListResult, err error) {
- req, err := lastResults.listResultPreparer()
+func (client ContainerServicesClient) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -370,6 +411,16 @@ func (client ContainerServicesClient) listNextResults(lastResults ListResult) (r
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerServicesClient) ListComplete(ctx context.Context) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.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
}
@@ -380,6 +431,16 @@ func (client ContainerServicesClient) ListComplete(ctx context.Context) (result
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ContainerServicesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -443,8 +504,8 @@ func (client ContainerServicesClient) ListByResourceGroupResponder(resp *http.Re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults ListResult) (result ListResult, err error) {
- req, err := lastResults.listResultPreparer()
+func (client ContainerServicesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -465,16 +526,36 @@ func (client ContainerServicesClient) listByResourceGroupNextResults(lastResults
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContainerServicesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListOrchestrators gets a list of supported orchestrators in the specified subscription. The operation returns
-// properties of each orchestrator including verison and available upgrades.
+// properties of each orchestrator including version and available upgrades.
// Parameters:
// location - the name of a supported Azure region.
// resourceType - resource type for which the list of orchestrators needs to be returned
func (client ContainerServicesClient) ListOrchestrators(ctx context.Context, location string, resourceType string) (result OrchestratorVersionProfileListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerServicesClient.ListOrchestrators")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListOrchestratorsPreparer(ctx, location, resourceType)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ContainerServicesClient", "ListOrchestrators", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go
index 99fb68404834..a771309dbf33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/managedclusters.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewManagedClustersClientWithBaseURI(baseURI string, subscriptionID string)
// resourceName - the name of the managed cluster resource.
// parameters - parameters supplied to the Create or Update a Managed Cluster operation.
func (client ManagedClustersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters ManagedCluster) (result ManagedClustersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ManagedClusterProperties", Name: validation.Null, Rule: false,
@@ -145,6 +156,16 @@ func (client ManagedClustersClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client ManagedClustersClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClustersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Delete", nil, "Failure preparing request")
@@ -211,6 +232,16 @@ func (client ManagedClustersClient) DeleteResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client ManagedClustersClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedCluster, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "Get", nil, "Failure preparing request")
@@ -280,6 +311,16 @@ func (client ManagedClustersClient) GetResponder(resp *http.Response) (result Ma
// resourceName - the name of the managed cluster resource.
// roleName - the name of the role for managed cluster accessProfile resource.
func (client ManagedClustersClient) GetAccessProfile(ctx context.Context, resourceGroupName string, resourceName string, roleName string) (result ManagedClusterAccessProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetAccessProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetAccessProfilePreparer(ctx, resourceGroupName, resourceName, roleName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetAccessProfile", nil, "Failure preparing request")
@@ -349,6 +390,16 @@ func (client ManagedClustersClient) GetAccessProfileResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client ManagedClustersClient) GetUpgradeProfile(ctx context.Context, resourceGroupName string, resourceName string) (result ManagedClusterUpgradeProfile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.GetUpgradeProfile")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetUpgradeProfilePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "GetUpgradeProfile", nil, "Failure preparing request")
@@ -414,6 +465,16 @@ func (client ManagedClustersClient) GetUpgradeProfileResponder(resp *http.Respon
// List gets a list of managed clusters in the specified subscription. The operation returns properties of each managed
// cluster.
func (client ManagedClustersClient) List(ctx context.Context) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.List")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -476,8 +537,8 @@ func (client ManagedClustersClient) ListResponder(resp *http.Response) (result M
}
// listNextResults retrieves the next set of results, if any.
-func (client ManagedClustersClient) listNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
- req, err := lastResults.managedClusterListResultPreparer()
+func (client ManagedClustersClient) listNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -498,6 +559,16 @@ func (client ManagedClustersClient) listNextResults(lastResults ManagedClusterLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ManagedClustersClient) ListComplete(ctx context.Context) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.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
}
@@ -507,6 +578,16 @@ func (client ManagedClustersClient) ListComplete(ctx context.Context) (result Ma
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ManagedClustersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.mclr.Response.Response != nil {
+ sc = result.mclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -570,8 +651,8 @@ func (client ManagedClustersClient) ListByResourceGroupResponder(resp *http.Resp
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ManagedClustersClient) listByResourceGroupNextResults(lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
- req, err := lastResults.managedClusterListResultPreparer()
+func (client ManagedClustersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedClusterListResult) (result ManagedClusterListResult, err error) {
+ req, err := lastResults.managedClusterListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -592,16 +673,36 @@ func (client ManagedClustersClient) listByResourceGroupNextResults(lastResults M
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ManagedClustersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedClusterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
-// ListClusterAdminCredentials gets clusteradmin credential of the managed cluster with a specified resource group and
+// ListClusterAdminCredentials gets cluster admin credential of the managed cluster with a specified resource group and
// name.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client ManagedClustersClient) ListClusterAdminCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterAdminCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListClusterAdminCredentialsPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterAdminCredentials", nil, "Failure preparing request")
@@ -664,12 +765,22 @@ func (client ManagedClustersClient) ListClusterAdminCredentialsResponder(resp *h
return
}
-// ListClusterUserCredentials gets clusteruser credential of the managed cluster with a specified resource group and
+// ListClusterUserCredentials gets cluster user credential of the managed cluster with a specified resource group and
// name.
// Parameters:
// resourceGroupName - the name of the resource group.
// resourceName - the name of the managed cluster resource.
func (client ManagedClustersClient) ListClusterUserCredentials(ctx context.Context, resourceGroupName string, resourceName string) (result CredentialResults, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.ListClusterUserCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListClusterUserCredentialsPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "ListClusterUserCredentials", nil, "Failure preparing request")
@@ -738,6 +849,16 @@ func (client ManagedClustersClient) ListClusterUserCredentialsResponder(resp *ht
// resourceName - the name of the managed cluster resource.
// parameters - parameters supplied to the Update Managed Cluster Tags operation.
func (client ManagedClustersClient) UpdateTags(ctx context.Context, resourceGroupName string, resourceName string, parameters TagsObject) (result ManagedClustersUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClustersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, resourceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.ManagedClustersClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/models.go
index 90a41ecb5a28..856a824650ce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/models.go
@@ -18,13 +18,18 @@ package containerservice
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice"
+
// NetworkPlugin enumerates the values for network plugin.
type NetworkPlugin string
@@ -481,13 +486,13 @@ type AgentPoolProfile struct {
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
// DNSPrefix - DNS prefix to be used to create the FQDN for the agent pool.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the agent pool.
+ // Fqdn - FQDN for the agent pool.
Fqdn *string `json:"fqdn,omitempty"`
// Ports - Ports number array used to expose on this agent pool. The default opened ports are different based on your choice of orchestrator.
Ports *[]int32 `json:"ports,omitempty"`
// StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'
StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
- // VnetSubnetID - VNet SubnetID specifies the vnet's subnet identifier.
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
// OsType - OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. Possible values include: 'Linux', 'Windows'
OsType OSType `json:"osType,omitempty"`
@@ -632,8 +637,8 @@ func (future *ContainerServicesCreateOrUpdateFutureType) Result(client Container
return
}
-// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ContainerServicesDeleteFutureType an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ContainerServicesDeleteFutureType struct {
azure.Future
}
@@ -714,14 +719,24 @@ type ListResultIterator struct {
page ListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListResultIterator) Next() error {
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -730,6 +745,13 @@ func (iter *ListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -749,6 +771,11 @@ func (iter ListResultIterator) Value() ContainerService {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lr ListResult) IsEmpty() bool {
return lr.Value == nil || len(*lr.Value) == 0
@@ -756,11 +783,11 @@ func (lr ListResult) IsEmpty() bool {
// listResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lr ListResult) listResultPreparer() (*http.Request, error) {
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lr.NextLink)))
@@ -768,14 +795,24 @@ func (lr ListResult) listResultPreparer() (*http.Request, error) {
// ListResultPage contains a page of ContainerService values.
type ListResultPage struct {
- fn func(ListResult) (ListResult, error)
+ fn func(context.Context, ListResult) (ListResult, error)
lr ListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListResultPage) Next() error {
- next, err := page.fn(page.lr)
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
if err != nil {
return err
}
@@ -783,6 +820,13 @@ func (page *ListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListResultPage) NotDone() bool {
return !page.lr.IsEmpty()
@@ -801,6 +845,11 @@ func (page ListResultPage) Values() []ContainerService {
return *page.lr.Value
}
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
// ManagedCluster managed cluster.
type ManagedCluster struct {
autorest.Response `json:"-"`
@@ -1065,7 +1114,7 @@ type ManagedClusterAgentPoolProfile struct {
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
// StorageProfile - Storage profile specifies what kind of storage used. Defaults to ManagedDisks. Possible values include: 'StorageAccount', 'ManagedDisks'
StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
- // VnetSubnetID - VNet SubnetID specifies the vnet's subnet identifier.
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
// MaxPods - Maximum number of pods that can run on a node.
MaxPods *int32 `json:"maxPods,omitempty"`
@@ -1088,14 +1137,24 @@ type ManagedClusterListResultIterator struct {
page ManagedClusterListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ManagedClusterListResultIterator) Next() error {
+func (iter *ManagedClusterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1104,6 +1163,13 @@ func (iter *ManagedClusterListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ManagedClusterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ManagedClusterListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1123,6 +1189,11 @@ func (iter ManagedClusterListResultIterator) Value() ManagedCluster {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ManagedClusterListResultIterator type.
+func NewManagedClusterListResultIterator(page ManagedClusterListResultPage) ManagedClusterListResultIterator {
+ return ManagedClusterListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (mclr ManagedClusterListResult) IsEmpty() bool {
return mclr.Value == nil || len(*mclr.Value) == 0
@@ -1130,11 +1201,11 @@ func (mclr ManagedClusterListResult) IsEmpty() bool {
// managedClusterListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (mclr ManagedClusterListResult) managedClusterListResultPreparer() (*http.Request, error) {
+func (mclr ManagedClusterListResult) managedClusterListResultPreparer(ctx context.Context) (*http.Request, error) {
if mclr.NextLink == nil || len(to.String(mclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(mclr.NextLink)))
@@ -1142,14 +1213,24 @@ func (mclr ManagedClusterListResult) managedClusterListResultPreparer() (*http.R
// ManagedClusterListResultPage contains a page of ManagedCluster values.
type ManagedClusterListResultPage struct {
- fn func(ManagedClusterListResult) (ManagedClusterListResult, error)
+ fn func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)
mclr ManagedClusterListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ManagedClusterListResultPage) Next() error {
- next, err := page.fn(page.mclr)
+func (page *ManagedClusterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedClusterListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.mclr)
if err != nil {
return err
}
@@ -1157,6 +1238,13 @@ func (page *ManagedClusterListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ManagedClusterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ManagedClusterListResultPage) NotDone() bool {
return !page.mclr.IsEmpty()
@@ -1175,6 +1263,11 @@ func (page ManagedClusterListResultPage) Values() []ManagedCluster {
return *page.mclr.Value
}
+// Creates a new instance of the ManagedClusterListResultPage type.
+func NewManagedClusterListResultPage(getNextPage func(context.Context, ManagedClusterListResult) (ManagedClusterListResult, error)) ManagedClusterListResultPage {
+ return ManagedClusterListResultPage{fn: getNextPage}
+}
+
// ManagedClusterPoolUpgradeProfile the list of available upgrade versions.
type ManagedClusterPoolUpgradeProfile struct {
// KubernetesVersion - Kubernetes version (major, minor, patch).
@@ -1195,7 +1288,7 @@ type ManagedClusterProperties struct {
KubernetesVersion *string `json:"kubernetesVersion,omitempty"`
// DNSPrefix - DNS prefix specified when creating the managed cluster.
DNSPrefix *string `json:"dnsPrefix,omitempty"`
- // Fqdn - FDQN for the master pool.
+ // Fqdn - FQDN for the master pool.
Fqdn *string `json:"fqdn,omitempty"`
// AgentPoolProfiles - Properties of the agent pool. Currently only one agent pool can exist.
AgentPoolProfiles *[]ManagedClusterAgentPoolProfile `json:"agentPoolProfiles,omitempty"`
@@ -1257,8 +1350,8 @@ func (mcp ManagedClusterProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ManagedClustersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ManagedClustersCreateOrUpdateFuture struct {
azure.Future
}
@@ -1309,8 +1402,8 @@ func (future *ManagedClustersDeleteFuture) Result(client ManagedClustersClient)
return
}
-// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to use for
-// manipulating Azure APIs.
+// ManagedClusterServicePrincipalProfile information about a service principal identity for the cluster to
+// use for manipulating Azure APIs.
type ManagedClusterServicePrincipalProfile struct {
// ClientID - The ID for the service principal.
ClientID *string `json:"clientId,omitempty"`
@@ -1318,8 +1411,8 @@ type ManagedClusterServicePrincipalProfile struct {
Secret *string `json:"secret,omitempty"`
}
-// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ManagedClustersUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ManagedClustersUpdateTagsFuture struct {
azure.Future
}
@@ -1447,13 +1540,13 @@ type MasterProfile struct {
VMSize VMSizeTypes `json:"vmSize,omitempty"`
// OsDiskSizeGB - OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.
OsDiskSizeGB *int32 `json:"osDiskSizeGB,omitempty"`
- // VnetSubnetID - VNet SubnetID specifies the vnet's subnet identifier.
+ // VnetSubnetID - VNet SubnetID specifies the VNet's subnet identifier.
VnetSubnetID *string `json:"vnetSubnetID,omitempty"`
// FirstConsecutiveStaticIP - FirstConsecutiveStaticIP used to specify the first static ip of masters.
FirstConsecutiveStaticIP *string `json:"firstConsecutiveStaticIP,omitempty"`
// StorageProfile - Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice. Possible values include: 'StorageAccount', 'ManagedDisks'
StorageProfile StorageProfileTypes `json:"storageProfile,omitempty"`
- // Fqdn - FDQN for the master pool.
+ // Fqdn - FQDN for the master pool.
Fqdn *string `json:"fqdn,omitempty"`
}
@@ -1732,8 +1825,8 @@ func (r Resource) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// ServicePrincipalProfile information about a service principal identity for the cluster to use for manipulating
-// Azure APIs. Either secret or keyVaultSecretRef must be specified.
+// ServicePrincipalProfile information about a service principal identity for the cluster to use for
+// manipulating Azure APIs. Either secret or keyVaultSecretRef must be specified.
type ServicePrincipalProfile struct {
// ClientID - The ID for the service principal.
ClientID *string `json:"clientId,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/operations.go
index cd5a61846d6a..0b2234c149d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/containerservice/mgmt/2018-03-31/containerservice/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List gets a list of compute operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "containerservice.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go
index 2fd8131f1cfa..45a37d195f5b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collection.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -40,13 +41,23 @@ func NewCollectionClientWithBaseURI(baseURI string, subscriptionID string) Colle
return CollectionClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// ListMetricDefinitions retrieves metric defintions for the given collection.
+// ListMetricDefinitions retrieves metric definitions for the given collection.
// Parameters:
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
// databaseRid - cosmos DB database rid.
// collectionRid - cosmos DB collection rid.
func (client CollectionClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string) (result MetricDefinitionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListMetricDefinitions")
+ 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},
@@ -132,6 +143,16 @@ func (client CollectionClient) ListMetricDefinitionsResponder(resp *http.Respons
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client CollectionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListMetrics")
+ 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},
@@ -217,6 +238,16 @@ func (client CollectionClient) ListMetricsResponder(resp *http.Response) (result
// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is
// name.value (name of the metric, can have an or of multiple names).
func (client CollectionClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result UsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionClient.ListUsages")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go
index 8c1aab2512af..d1a57a060ddd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartition.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewCollectionPartitionClientWithBaseURI(baseURI string, subscriptionID stri
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client CollectionPartitionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result PartitionMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionClient.ListMetrics")
+ 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},
@@ -135,6 +146,16 @@ func (client CollectionPartitionClient) ListMetricsResponder(resp *http.Response
// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is
// name.value (name of the metric, can have an or of multiple names).
func (client CollectionPartitionClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, filter string) (result PartitionUsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionClient.ListUsages")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go
index 6202ee61147f..306c2df6445c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionpartitionregion.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -52,6 +53,16 @@ func NewCollectionPartitionRegionClientWithBaseURI(baseURI string, subscriptionI
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client CollectionPartitionRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result PartitionMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionPartitionRegionClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go
index 3877475c1c45..99a22d3de3a6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/collectionregion.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -52,6 +53,16 @@ func NewCollectionRegionClientWithBaseURI(baseURI string, subscriptionID string)
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client CollectionRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CollectionRegionClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go
index a8354a634984..093afabcec23 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/database.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -40,12 +41,22 @@ func NewDatabaseClientWithBaseURI(baseURI string, subscriptionID string) Databas
return DatabaseClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// ListMetricDefinitions retrieves metric defintions for the given database.
+// ListMetricDefinitions retrieves metric definitions for the given database.
// Parameters:
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
// databaseRid - cosmos DB database rid.
func (client DatabaseClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string, databaseRid string) (result MetricDefinitionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListMetricDefinitions")
+ 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},
@@ -129,6 +140,16 @@ func (client DatabaseClient) ListMetricDefinitionsResponder(resp *http.Response)
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client DatabaseClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListMetrics")
+ 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},
@@ -212,6 +233,16 @@ func (client DatabaseClient) ListMetricsResponder(resp *http.Response) (result M
// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is
// name.value (name of the metric, can have an or of multiple names).
func (client DatabaseClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, filter string) (result UsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseClient.ListUsages")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go
index be1aa360e501..f6a9c3312752 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccountregion.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewDatabaseAccountRegionClientWithBaseURI(baseURI string, subscriptionID st
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client DatabaseAccountRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountRegionClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
index fa75356dcb73..3d73db83fc41 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/databaseaccounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewDatabaseAccountsClientWithBaseURI(baseURI string, subscriptionID string)
// Parameters:
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) CheckNameExists(ctx context.Context, accountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.CheckNameExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: accountName,
Constraints: []validation.Constraint{{Target: "accountName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -117,6 +128,16 @@ func (client DatabaseAccountsClient) CheckNameExistsResponder(resp *http.Respons
// accountName - cosmos DB database account name.
// createUpdateParameters - the parameters to provide for the current database account.
func (client DatabaseAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, createUpdateParameters DatabaseAccountCreateUpdateParameters) (result DatabaseAccountsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.CreateOrUpdate")
+ 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},
@@ -190,10 +211,6 @@ func (client DatabaseAccountsClient) CreateOrUpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -216,6 +233,16 @@ func (client DatabaseAccountsClient) CreateOrUpdateResponder(resp *http.Response
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.Delete")
+ 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},
@@ -272,10 +299,6 @@ func (client DatabaseAccountsClient) DeleteSender(req *http.Request) (future Dat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -300,6 +323,16 @@ func (client DatabaseAccountsClient) DeleteResponder(resp *http.Response) (resul
// accountName - cosmos DB database account name.
// failoverParameters - the new failover policies for the database account.
func (client DatabaseAccountsClient) FailoverPriorityChange(ctx context.Context, resourceGroupName string, accountName string, failoverParameters FailoverPolicies) (result DatabaseAccountsFailoverPriorityChangeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.FailoverPriorityChange")
+ 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},
@@ -360,10 +393,6 @@ func (client DatabaseAccountsClient) FailoverPriorityChangeSender(req *http.Requ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -385,6 +414,16 @@ func (client DatabaseAccountsClient) FailoverPriorityChangeResponder(resp *http.
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.Get")
+ 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},
@@ -463,6 +502,16 @@ func (client DatabaseAccountsClient) GetResponder(resp *http.Response) (result D
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) GetReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListReadOnlyKeysResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.GetReadOnlyKeys")
+ 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},
@@ -538,6 +587,16 @@ func (client DatabaseAccountsClient) GetReadOnlyKeysResponder(resp *http.Respons
// List lists all the Azure Cosmos DB database accounts available under the subscription.
func (client DatabaseAccountsClient) List(ctx context.Context) (result DatabaseAccountsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "documentdb.DatabaseAccountsClient", "List", nil, "Failure preparing request")
@@ -602,6 +661,16 @@ func (client DatabaseAccountsClient) ListResponder(resp *http.Response) (result
// Parameters:
// resourceGroupName - name of an Azure resource group.
func (client DatabaseAccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DatabaseAccountsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListByResourceGroup")
+ 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},
@@ -676,6 +745,16 @@ func (client DatabaseAccountsClient) ListByResourceGroupResponder(resp *http.Res
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) ListConnectionStrings(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListConnectionStringsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListConnectionStrings")
+ 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},
@@ -754,6 +833,16 @@ func (client DatabaseAccountsClient) ListConnectionStringsResponder(resp *http.R
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) ListKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListKeysResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListKeys")
+ 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},
@@ -827,11 +916,21 @@ func (client DatabaseAccountsClient) ListKeysResponder(resp *http.Response) (res
return
}
-// ListMetricDefinitions retrieves metric defintions for the given database account.
+// ListMetricDefinitions retrieves metric definitions for the given database account.
// Parameters:
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, accountName string) (result MetricDefinitionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListMetricDefinitions")
+ 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},
@@ -913,6 +1012,16 @@ func (client DatabaseAccountsClient) ListMetricDefinitionsResponder(resp *http.R
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client DatabaseAccountsClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListMetrics")
+ 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},
@@ -992,6 +1101,16 @@ func (client DatabaseAccountsClient) ListMetricsResponder(resp *http.Response) (
// resourceGroupName - name of an Azure resource group.
// accountName - cosmos DB database account name.
func (client DatabaseAccountsClient) ListReadOnlyKeys(ctx context.Context, resourceGroupName string, accountName string) (result DatabaseAccountListReadOnlyKeysResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListReadOnlyKeys")
+ 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},
@@ -1072,6 +1191,16 @@ func (client DatabaseAccountsClient) ListReadOnlyKeysResponder(resp *http.Respon
// filter - an OData filter expression that describes a subset of usages to return. The supported parameter is
// name.value (name of the metric, can have an or of multiple names).
func (client DatabaseAccountsClient) ListUsages(ctx context.Context, resourceGroupName string, accountName string, filter string) (result UsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.ListUsages")
+ 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},
@@ -1154,6 +1283,16 @@ func (client DatabaseAccountsClient) ListUsagesResponder(resp *http.Response) (r
// accountName - cosmos DB database account name.
// regionParameterForOffline - cosmos DB region to offline for the database account.
func (client DatabaseAccountsClient) OfflineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOffline RegionForOnlineOffline) (result DatabaseAccountsOfflineRegionFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.OfflineRegion")
+ 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},
@@ -1214,10 +1353,6 @@ func (client DatabaseAccountsClient) OfflineRegionSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1240,6 +1375,16 @@ func (client DatabaseAccountsClient) OfflineRegionResponder(resp *http.Response)
// accountName - cosmos DB database account name.
// regionParameterForOnline - cosmos DB region to online for the database account.
func (client DatabaseAccountsClient) OnlineRegion(ctx context.Context, resourceGroupName string, accountName string, regionParameterForOnline RegionForOnlineOffline) (result DatabaseAccountsOnlineRegionFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.OnlineRegion")
+ 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},
@@ -1300,10 +1445,6 @@ func (client DatabaseAccountsClient) OnlineRegionSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1326,6 +1467,16 @@ func (client DatabaseAccountsClient) OnlineRegionResponder(resp *http.Response)
// accountName - cosmos DB database account name.
// updateParameters - the tags parameter to patch for the current database account.
func (client DatabaseAccountsClient) Patch(ctx context.Context, resourceGroupName string, accountName string, updateParameters DatabaseAccountPatchParameters) (result DatabaseAccountsPatchFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.Patch")
+ 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},
@@ -1384,10 +1535,6 @@ func (client DatabaseAccountsClient) PatchSender(req *http.Request) (future Data
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1411,6 +1558,16 @@ func (client DatabaseAccountsClient) PatchResponder(resp *http.Response) (result
// accountName - cosmos DB database account name.
// keyToRegenerate - the name of the key to regenerate.
func (client DatabaseAccountsClient) RegenerateKey(ctx context.Context, resourceGroupName string, accountName string, keyToRegenerate DatabaseAccountRegenerateKeyParameters) (result DatabaseAccountsRegenerateKeyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseAccountsClient.RegenerateKey")
+ 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},
@@ -1469,10 +1626,6 @@ func (client DatabaseAccountsClient) RegenerateKeySender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
index 57878609aba4..658cf6a0900c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/models.go
@@ -18,14 +18,19 @@ package documentdb
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb"
+
// DatabaseAccountKind enumerates the values for database account kind.
type DatabaseAccountKind string
@@ -607,8 +612,8 @@ type DatabaseAccountRegenerateKeyParameters struct {
KeyKind KeyKind `json:"keyKind,omitempty"`
}
-// DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DatabaseAccountsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DatabaseAccountsCreateOrUpdateFuture struct {
azure.Future
}
@@ -659,8 +664,8 @@ func (future *DatabaseAccountsDeleteFuture) Result(client DatabaseAccountsClient
return
}
-// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// DatabaseAccountsFailoverPriorityChangeFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type DatabaseAccountsFailoverPriorityChangeFuture struct {
azure.Future
}
@@ -690,8 +695,8 @@ type DatabaseAccountsListResult struct {
Value *[]DatabaseAccount `json:"value,omitempty"`
}
-// DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DatabaseAccountsOfflineRegionFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DatabaseAccountsOfflineRegionFuture struct {
azure.Future
}
@@ -713,8 +718,8 @@ func (future *DatabaseAccountsOfflineRegionFuture) Result(client DatabaseAccount
return
}
-// DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DatabaseAccountsOnlineRegionFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DatabaseAccountsOnlineRegionFuture struct {
azure.Future
}
@@ -765,8 +770,8 @@ func (future *DatabaseAccountsPatchFuture) Result(client DatabaseAccountsClient)
return
}
-// DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DatabaseAccountsRegenerateKeyFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DatabaseAccountsRegenerateKeyFuture struct {
azure.Future
}
@@ -921,8 +926,8 @@ type OperationDisplay struct {
Description *string `json:"Description,omitempty"`
}
-// OperationListResult result of the request to list Resource Provider operations. It contains a list of operations
-// and a URL link to get the next set of results.
+// OperationListResult result of the request to list Resource Provider operations. It contains a list of
+// operations and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of operations supported by the Resource Provider.
@@ -937,14 +942,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -953,6 +968,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -972,6 +994,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -979,11 +1006,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -991,14 +1018,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1006,6 +1043,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1024,9 +1068,14 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// PartitionMetric the metric values for a single partition.
type PartitionMetric struct {
- // PartitionID - The parition id (GUID identifier) of the metric values.
+ // PartitionID - The partition id (GUID identifier) of the metric values.
PartitionID *string `json:"partitionId,omitempty"`
// PartitionKeyRangeID - The partition key range id (integer identifier) of the metric values.
PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
@@ -1053,7 +1102,7 @@ type PartitionMetricListResult struct {
// PartitionUsage the partition level usage data for a usage request.
type PartitionUsage struct {
- // PartitionID - The parition id (GUID identifier) of the usages.
+ // PartitionID - The partition id (GUID identifier) of the usages.
PartitionID *string `json:"partitionId,omitempty"`
// PartitionKeyRangeID - The partition key range id (integer identifier) of the usages.
PartitionKeyRangeID *string `json:"partitionKeyRangeId,omitempty"`
@@ -1194,4 +1243,6 @@ type UsagesResult struct {
type VirtualNetworkRule struct {
// ID - Resource ID of a subnet, for example: /subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}.
ID *string `json:"id,omitempty"`
+ // IgnoreMissingVNetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
+ IgnoreMissingVNetServiceEndpoint *bool `json:"ignoreMissingVNetServiceEndpoint,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go
index 776dd6f90907..43afb0884a12 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Cosmos DB Resource Provider operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "documentdb.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go
index f51432580480..cd868d17a131 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeid.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewPartitionKeyRangeIDClientWithBaseURI(baseURI string, subscriptionID stri
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client PartitionKeyRangeIDClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result PartitionMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartitionKeyRangeIDClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go
index 1592f6c455b7..276016f43bb4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/partitionkeyrangeidregion.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -52,6 +53,16 @@ func NewPartitionKeyRangeIDRegionClientWithBaseURI(baseURI string, subscriptionI
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client PartitionKeyRangeIDRegionClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, region string, databaseRid string, collectionRid string, partitionKeyRangeID string, filter string) (result PartitionMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartitionKeyRangeIDRegionClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go
index 9cf2be4657cc..f7bdc5288665 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentile.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewPercentileClientWithBaseURI(baseURI string, subscriptionID string) Perce
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client PercentileClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, filter string) (result PercentileMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PercentileClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go
index 31f1f3f6910e..fd4ef0d4ceaf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentilesourcetarget.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -53,6 +54,16 @@ func NewPercentileSourceTargetClientWithBaseURI(baseURI string, subscriptionID s
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client PercentileSourceTargetClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, sourceRegion string, targetRegion string, filter string) (result PercentileMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PercentileSourceTargetClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go
index 61ca372b388a..dd94b7304660 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb/percentiletarget.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewPercentileTargetClientWithBaseURI(baseURI string, subscriptionID string)
// filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and
// timeGrain. The supported operator is eq.
func (client PercentileTargetClient) ListMetrics(ctx context.Context, resourceGroupName string, accountName string, targetRegion string, filter string) (result PercentileMetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PercentileTargetClient.ListMetrics")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
index afd951e3542a..df74cfc3514e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/models.go
@@ -18,14 +18,19 @@ package databricks
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks"
+
// ProvisioningState enumerates the values for provisioning state.
type ProvisioningState string
@@ -105,8 +110,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationListResult result of the request to list Resource Provider operations. It contains a list of operations
-// and a URL link to get the next set of results.
+// OperationListResult result of the request to list Resource Provider operations. It contains a list of
+// operations and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of Resource Provider operations supported by the Resource Provider resource provider.
@@ -121,14 +126,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -137,6 +152,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -156,6 +178,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -163,11 +190,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -175,14 +202,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -190,6 +227,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -208,6 +252,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// Resource the core properties of ARM resources
type Resource struct {
// ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
@@ -400,14 +449,24 @@ type WorkspaceListResultIterator struct {
page WorkspaceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkspaceListResultIterator) Next() error {
+func (iter *WorkspaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -416,6 +475,13 @@ func (iter *WorkspaceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkspaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkspaceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -435,6 +501,11 @@ func (iter WorkspaceListResultIterator) Value() Workspace {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkspaceListResultIterator type.
+func NewWorkspaceListResultIterator(page WorkspaceListResultPage) WorkspaceListResultIterator {
+ return WorkspaceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wlr WorkspaceListResult) IsEmpty() bool {
return wlr.Value == nil || len(*wlr.Value) == 0
@@ -442,11 +513,11 @@ func (wlr WorkspaceListResult) IsEmpty() bool {
// workspaceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wlr WorkspaceListResult) workspaceListResultPreparer() (*http.Request, error) {
+func (wlr WorkspaceListResult) workspaceListResultPreparer(ctx context.Context) (*http.Request, error) {
if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wlr.NextLink)))
@@ -454,14 +525,24 @@ func (wlr WorkspaceListResult) workspaceListResultPreparer() (*http.Request, err
// WorkspaceListResultPage contains a page of Workspace values.
type WorkspaceListResultPage struct {
- fn func(WorkspaceListResult) (WorkspaceListResult, error)
+ fn func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)
wlr WorkspaceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkspaceListResultPage) Next() error {
- next, err := page.fn(page.wlr)
+func (page *WorkspaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wlr)
if err != nil {
return err
}
@@ -469,6 +550,13 @@ func (page *WorkspaceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkspaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkspaceListResultPage) NotDone() bool {
return !page.wlr.IsEmpty()
@@ -487,6 +575,11 @@ func (page WorkspaceListResultPage) Values() []Workspace {
return *page.wlr.Value
}
+// Creates a new instance of the WorkspaceListResultPage type.
+func NewWorkspaceListResultPage(getNextPage func(context.Context, WorkspaceListResult) (WorkspaceListResult, error)) WorkspaceListResultPage {
+ return WorkspaceListResultPage{fn: getNextPage}
+}
+
// WorkspaceProperties the workspace properties.
type WorkspaceProperties struct {
// ManagedResourceGroupID - The managed resource group Id.
@@ -509,8 +602,8 @@ type WorkspaceProviderAuthorization struct {
RoleDefinitionID *uuid.UUID `json:"roleDefinitionId,omitempty"`
}
-// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WorkspacesCreateOrUpdateFuture struct {
azure.Future
}
@@ -538,7 +631,8 @@ func (future *WorkspacesCreateOrUpdateFuture) Result(client WorkspacesClient) (w
return
}
-// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WorkspacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WorkspacesDeleteFuture struct {
azure.Future
}
@@ -560,7 +654,8 @@ func (future *WorkspacesDeleteFuture) Result(client WorkspacesClient) (ar autore
return
}
-// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WorkspacesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WorkspacesUpdateFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go
index 01aabe8011e9..eddb000a4316 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available RP operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "databricks.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
index a7ce2010acc2..f327c73496f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/databricks/mgmt/2018-04-01/databricks/workspaces.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works
// resourceGroupName - the name of the resource group. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, parameters Workspace, resourceGroupName string, workspaceName string) (result WorkspacesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.WorkspaceProperties", Name: validation.Null, Rule: true,
@@ -109,10 +120,6 @@ func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future W
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -135,6 +142,16 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspacesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Delete")
+ 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},
@@ -191,10 +208,6 @@ func (client WorkspacesClient) DeleteSender(req *http.Request) (future Workspace
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -216,6 +229,16 @@ func (client WorkspacesClient) DeleteResponder(resp *http.Response) (result auto
// resourceGroupName - the name of the resource group. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Get")
+ 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},
@@ -293,6 +316,16 @@ func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspa
// Parameters:
// resourceGroupName - the name of the resource group. The name is case insensitive.
func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result WorkspaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.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},
@@ -364,8 +397,8 @@ func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client WorkspacesClient) listByResourceGroupNextResults(lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
- req, err := lastResults.workspaceListResultPreparer()
+func (client WorkspacesClient) listByResourceGroupNextResults(ctx context.Context, lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "databricks.WorkspacesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -386,12 +419,32 @@ func (client WorkspacesClient) listByResourceGroupNextResults(lastResults Worksp
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkspacesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result WorkspaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListBySubscription gets all the workspaces within a subscription.
func (client WorkspacesClient) ListBySubscription(ctx context.Context) (result WorkspaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -454,8 +507,8 @@ func (client WorkspacesClient) ListBySubscriptionResponder(resp *http.Response)
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client WorkspacesClient) listBySubscriptionNextResults(lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
- req, err := lastResults.workspaceListResultPreparer()
+func (client WorkspacesClient) listBySubscriptionNextResults(ctx context.Context, lastResults WorkspaceListResult) (result WorkspaceListResult, err error) {
+ req, err := lastResults.workspaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "databricks.WorkspacesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -476,6 +529,16 @@ func (client WorkspacesClient) listBySubscriptionNextResults(lastResults Workspa
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkspacesClient) ListBySubscriptionComplete(ctx context.Context) (result WorkspaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -486,6 +549,16 @@ func (client WorkspacesClient) ListBySubscriptionComplete(ctx context.Context) (
// resourceGroupName - the name of the resource group. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) Update(ctx context.Context, parameters WorkspaceUpdate, resourceGroupName string, workspaceName string) (result WorkspacesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Update")
+ 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},
@@ -544,10 +617,6 @@ func (client WorkspacesClient) UpdateSender(req *http.Request) (future Workspace
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
index 87a86a01a267..531c66997fae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/accounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account
// location - the resource location without whitespace.
// parameters - parameters supplied to check the Data Lake Analytics account name availability.
func (client AccountsClient) CheckNameAvailability(ctx context.Context, location string, parameters CheckNameAvailabilityParameters) (result NameAvailabilityInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -122,6 +133,16 @@ func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response)
// accountName - the name of the Data Lake Analytics account.
// parameters - parameters supplied to create a new Data Lake Analytics account.
func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters CreateDataLakeAnalyticsAccountParameters) (result AccountsCreateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil},
@@ -191,10 +212,6 @@ func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCre
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -217,6 +234,16 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result DataLa
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Analytics account.
func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result AccountsDeleteFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Delete", nil, "Failure preparing request")
@@ -262,10 +289,6 @@ func (client AccountsClient) DeleteSender(req *http.Request) (future AccountsDel
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -287,6 +310,16 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Analytics account.
func (client AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result DataLakeAnalyticsAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Get", nil, "Failure preparing request")
@@ -363,6 +396,16 @@ func (client AccountsClient) GetResponder(resp *http.Response) (result DataLakeA
// count - the Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client AccountsClient) List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.List")
+ defer func() {
+ sc := -1
+ if result.dlaalr.Response.Response != nil {
+ sc = result.dlaalr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -453,8 +496,8 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result DataLake
}
// listNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listNextResults(lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) {
- req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer()
+func (client AccountsClient) listNextResults(ctx context.Context, lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) {
+ req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.AccountsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -475,6 +518,16 @@ func (client AccountsClient) listNextResults(lastResults DataLakeAnalyticsAccoun
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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, filter, top, skip, selectParameter, orderby, count)
return
}
@@ -494,6 +547,16 @@ func (client AccountsClient) ListComplete(ctx context.Context, filter string, to
// count - the Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dlaalr.Response.Response != nil {
+ sc = result.dlaalr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -585,8 +648,8 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listByResourceGroupNextResults(lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) {
- req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer()
+func (client AccountsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DataLakeAnalyticsAccountListResult) (result DataLakeAnalyticsAccountListResult, err error) {
+ req, err := lastResults.dataLakeAnalyticsAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.AccountsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -607,6 +670,16 @@ func (client AccountsClient) listByResourceGroupNextResults(lastResults DataLake
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeAnalyticsAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, filter, top, skip, selectParameter, orderby, count)
return
}
@@ -618,6 +691,16 @@ func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, re
// accountName - the name of the Data Lake Analytics account.
// parameters - parameters supplied to the update Data Lake Analytics account operation.
func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters *UpdateDataLakeAnalyticsAccountParameters) (result AccountsUpdateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Update", nil, "Failure preparing request")
@@ -668,10 +751,6 @@ func (client AccountsClient) UpdateSender(req *http.Request) (future AccountsUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go
index 6a92f7dadfc0..6b7cc1607488 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/computepolicies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewComputePoliciesClientWithBaseURI(baseURI string, subscriptionID string)
// parameters - parameters supplied to create or update the compute policy. The max degree of parallelism per
// job property, min priority per job property, or both must be present.
func (client ComputePoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters CreateOrUpdateComputePolicyParameters) (result ComputePolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateComputePolicyProperties", Name: validation.Null, Rule: true,
@@ -132,6 +143,16 @@ func (client ComputePoliciesClient) CreateOrUpdateResponder(resp *http.Response)
// accountName - the name of the Data Lake Analytics account.
// computePolicyName - the name of the compute policy to delete.
func (client ComputePoliciesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, computePolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Delete", nil, "Failure preparing request")
@@ -200,6 +221,16 @@ func (client ComputePoliciesClient) DeleteResponder(resp *http.Response) (result
// accountName - the name of the Data Lake Analytics account.
// computePolicyName - the name of the compute policy to retrieve.
func (client ComputePoliciesClient) Get(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string) (result ComputePolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, computePolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Get", nil, "Failure preparing request")
@@ -269,6 +300,16 @@ func (client ComputePoliciesClient) GetResponder(resp *http.Response) (result Co
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Analytics account.
func (client ComputePoliciesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result ComputePolicyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.cplr.Response.Response != nil {
+ sc = result.cplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByAccountNextResults
req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
if err != nil {
@@ -333,8 +374,8 @@ func (client ComputePoliciesClient) ListByAccountResponder(resp *http.Response)
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client ComputePoliciesClient) listByAccountNextResults(lastResults ComputePolicyListResult) (result ComputePolicyListResult, err error) {
- req, err := lastResults.computePolicyListResultPreparer()
+func (client ComputePoliciesClient) listByAccountNextResults(ctx context.Context, lastResults ComputePolicyListResult) (result ComputePolicyListResult, err error) {
+ req, err := lastResults.computePolicyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -355,6 +396,16 @@ func (client ComputePoliciesClient) listByAccountNextResults(lastResults Compute
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client ComputePoliciesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result ComputePolicyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName)
return
}
@@ -366,6 +417,16 @@ func (client ComputePoliciesClient) ListByAccountComplete(ctx context.Context, r
// computePolicyName - the name of the compute policy to update.
// parameters - parameters supplied to update the compute policy.
func (client ComputePoliciesClient) Update(ctx context.Context, resourceGroupName string, accountName string, computePolicyName string, parameters *UpdateComputePolicyParameters) (result ComputePolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePoliciesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, computePolicyName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.ComputePoliciesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go
index a260fc76201e..81f689edc225 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/datalakestoreaccounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDataLakeStoreAccountsClientWithBaseURI(baseURI string, subscriptionID st
// dataLakeStoreAccountName - the name of the Data Lake Store account to add.
// parameters - the details of the Data Lake Store account.
func (client DataLakeStoreAccountsClient) Add(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string, parameters *AddDataLakeStoreParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountsClient.Add")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.AddPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.DataLakeStoreAccountsClient", "Add", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client DataLakeStoreAccountsClient) AddResponder(resp *http.Response) (res
// accountName - the name of the Data Lake Analytics account.
// dataLakeStoreAccountName - the name of the Data Lake Store account to remove
func (client DataLakeStoreAccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.DataLakeStoreAccountsClient", "Delete", nil, "Failure preparing request")
@@ -188,6 +209,16 @@ func (client DataLakeStoreAccountsClient) DeleteResponder(resp *http.Response) (
// accountName - the name of the Data Lake Analytics account.
// dataLakeStoreAccountName - the name of the Data Lake Store account to retrieve
func (client DataLakeStoreAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, dataLakeStoreAccountName string) (result DataLakeStoreAccountInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, dataLakeStoreAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.DataLakeStoreAccountsClient", "Get", nil, "Failure preparing request")
@@ -267,6 +298,16 @@ func (client DataLakeStoreAccountsClient) GetResponder(resp *http.Response) (res
// count - the Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client DataLakeStoreAccountsClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountInformationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountsClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.dlsailr.Response.Response != nil {
+ sc = result.dlsailr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -359,8 +400,8 @@ func (client DataLakeStoreAccountsClient) ListByAccountResponder(resp *http.Resp
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client DataLakeStoreAccountsClient) listByAccountNextResults(lastResults DataLakeStoreAccountInformationListResult) (result DataLakeStoreAccountInformationListResult, err error) {
- req, err := lastResults.dataLakeStoreAccountInformationListResultPreparer()
+func (client DataLakeStoreAccountsClient) listByAccountNextResults(ctx context.Context, lastResults DataLakeStoreAccountInformationListResult) (result DataLakeStoreAccountInformationListResult, err error) {
+ req, err := lastResults.dataLakeStoreAccountInformationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.DataLakeStoreAccountsClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -381,6 +422,16 @@ func (client DataLakeStoreAccountsClient) listByAccountNextResults(lastResults D
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client DataLakeStoreAccountsClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountInformationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountsClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go
index b5cea63864f6..d45277749b60 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the firewall rule to create or update.
// parameters - parameters supplied to create or update the firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters CreateOrUpdateFirewallRuleParameters) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateFirewallRuleProperties", Name: validation.Null, Rule: true,
@@ -128,6 +139,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// accountName - the name of the Data Lake Analytics account.
// firewallRuleName - the name of the firewall rule to delete.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -196,6 +217,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// accountName - the name of the Data Lake Analytics account.
// firewallRuleName - the name of the firewall rule to retrieve.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -264,6 +295,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Analytics account.
func (client FirewallRulesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.frlr.Response.Response != nil {
+ sc = result.frlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByAccountNextResults
req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
if err != nil {
@@ -328,8 +369,8 @@ func (client FirewallRulesClient) ListByAccountResponder(resp *http.Response) (r
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client FirewallRulesClient) listByAccountNextResults(lastResults FirewallRuleListResult) (result FirewallRuleListResult, err error) {
- req, err := lastResults.firewallRuleListResultPreparer()
+func (client FirewallRulesClient) listByAccountNextResults(ctx context.Context, lastResults FirewallRuleListResult) (result FirewallRuleListResult, err error) {
+ req, err := lastResults.firewallRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.FirewallRulesClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -350,6 +391,16 @@ func (client FirewallRulesClient) listByAccountNextResults(lastResults FirewallR
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client FirewallRulesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName)
return
}
@@ -361,6 +412,16 @@ func (client FirewallRulesClient) ListByAccountComplete(ctx context.Context, res
// firewallRuleName - the name of the firewall rule to update.
// parameters - parameters supplied to update the firewall rule.
func (client FirewallRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, firewallRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/locations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/locations.go
index 48fc897a05a9..cd5c58ae33ab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/locations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/locations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) Locati
// Parameters:
// location - the resource location without whitespace.
func (client LocationsClient) GetCapability(ctx context.Context, location string) (result CapabilityInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.GetCapability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCapabilityPreparer(ctx, location)
if err != nil {
err = autorest.NewErrorWithError(err, "account.LocationsClient", "GetCapability", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
index 56af0c25b8b8..e3af1d957216 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/models.go
@@ -18,15 +18,20 @@ package account
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account"
+
// AADObjectType enumerates the values for aad object type.
type AADObjectType string
@@ -189,7 +194,8 @@ func PossibleTierTypeValues() []TierType {
return []TierType{Commitment100000AUHours, Commitment10000AUHours, Commitment1000AUHours, Commitment100AUHours, Commitment500000AUHours, Commitment50000AUHours, Commitment5000AUHours, Commitment500AUHours, Consumption}
}
-// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsCreateFutureType struct {
azure.Future
}
@@ -217,7 +223,8 @@ func (future *AccountsCreateFutureType) Result(client AccountsClient) (dlaa Data
return
}
-// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsDeleteFutureType struct {
azure.Future
}
@@ -239,7 +246,8 @@ func (future *AccountsDeleteFutureType) Result(client AccountsClient) (ar autore
return
}
-// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsUpdateFutureType struct {
azure.Future
}
@@ -306,15 +314,15 @@ func (adlsp *AddDataLakeStoreParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// AddDataLakeStoreProperties the Data Lake Store account properties to use when adding a new Data Lake Store
-// account.
+// AddDataLakeStoreProperties the Data Lake Store account properties to use when adding a new Data Lake
+// Store account.
type AddDataLakeStoreProperties struct {
// Suffix - The optional suffix for the Data Lake Store account.
Suffix *string `json:"suffix,omitempty"`
}
-// AddDataLakeStoreWithAccountParameters the parameters used to add a new Data Lake Store account while creating a
-// new Data Lake Analytics account.
+// AddDataLakeStoreWithAccountParameters the parameters used to add a new Data Lake Store account while
+// creating a new Data Lake Analytics account.
type AddDataLakeStoreWithAccountParameters struct {
// Name - The unique name of the Data Lake Store account to add.
Name *string `json:"name,omitempty"`
@@ -406,7 +414,8 @@ func (asap *AddStorageAccountParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// AddStorageAccountProperties the Azure Storage account properties to use when adding a new Azure Storage account.
+// AddStorageAccountProperties the Azure Storage account properties to use when adding a new Azure Storage
+// account.
type AddStorageAccountProperties struct {
// AccessKey - The access key associated with this Azure Storage account that will be used to connect to it.
AccessKey *string `json:"accessKey,omitempty"`
@@ -414,8 +423,8 @@ type AddStorageAccountProperties struct {
Suffix *string `json:"suffix,omitempty"`
}
-// AddStorageAccountWithAccountParameters the parameters used to add a new Azure Storage account while creating a
-// new Data Lake Analytics account.
+// AddStorageAccountWithAccountParameters the parameters used to add a new Azure Storage account while
+// creating a new Data Lake Analytics account.
type AddStorageAccountWithAccountParameters struct {
// Name - The unique name of the Azure Storage account to add.
Name *string `json:"name,omitempty"`
@@ -588,14 +597,24 @@ type ComputePolicyListResultIterator struct {
page ComputePolicyListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ComputePolicyListResultIterator) Next() error {
+func (iter *ComputePolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -604,6 +623,13 @@ func (iter *ComputePolicyListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ComputePolicyListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ComputePolicyListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -623,6 +649,11 @@ func (iter ComputePolicyListResultIterator) Value() ComputePolicy {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ComputePolicyListResultIterator type.
+func NewComputePolicyListResultIterator(page ComputePolicyListResultPage) ComputePolicyListResultIterator {
+ return ComputePolicyListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cplr ComputePolicyListResult) IsEmpty() bool {
return cplr.Value == nil || len(*cplr.Value) == 0
@@ -630,11 +661,11 @@ func (cplr ComputePolicyListResult) IsEmpty() bool {
// computePolicyListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cplr ComputePolicyListResult) computePolicyListResultPreparer() (*http.Request, error) {
+func (cplr ComputePolicyListResult) computePolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
if cplr.NextLink == nil || len(to.String(cplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cplr.NextLink)))
@@ -642,14 +673,24 @@ func (cplr ComputePolicyListResult) computePolicyListResultPreparer() (*http.Req
// ComputePolicyListResultPage contains a page of ComputePolicy values.
type ComputePolicyListResultPage struct {
- fn func(ComputePolicyListResult) (ComputePolicyListResult, error)
+ fn func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)
cplr ComputePolicyListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ComputePolicyListResultPage) Next() error {
- next, err := page.fn(page.cplr)
+func (page *ComputePolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComputePolicyListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cplr)
if err != nil {
return err
}
@@ -657,6 +698,13 @@ func (page *ComputePolicyListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ComputePolicyListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ComputePolicyListResultPage) NotDone() bool {
return !page.cplr.IsEmpty()
@@ -675,6 +723,11 @@ func (page ComputePolicyListResultPage) Values() []ComputePolicy {
return *page.cplr.Value
}
+// Creates a new instance of the ComputePolicyListResultPage type.
+func NewComputePolicyListResultPage(getNextPage func(context.Context, ComputePolicyListResult) (ComputePolicyListResult, error)) ComputePolicyListResultPage {
+ return ComputePolicyListResultPage{fn: getNextPage}
+}
+
// ComputePolicyProperties the compute policy properties.
type ComputePolicyProperties struct {
// ObjectID - The AAD object identifier for the entity to create a policy for.
@@ -687,8 +740,8 @@ type ComputePolicyProperties struct {
MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
}
-// CreateComputePolicyWithAccountParameters the parameters used to create a new compute policy while creating a new
-// Data Lake Analytics account.
+// CreateComputePolicyWithAccountParameters the parameters used to create a new compute policy while
+// creating a new Data Lake Analytics account.
type CreateComputePolicyWithAccountParameters struct {
// Name - The unique name of the compute policy to create.
Name *string `json:"name,omitempty"`
@@ -741,7 +794,8 @@ func (ccpwap *CreateComputePolicyWithAccountParameters) UnmarshalJSON(body []byt
return nil
}
-// CreateDataLakeAnalyticsAccountParameters the parameters to use for creating a Data Lake Analytics account.
+// CreateDataLakeAnalyticsAccountParameters the parameters to use for creating a Data Lake Analytics
+// account.
type CreateDataLakeAnalyticsAccountParameters struct {
// Location - The resource location.
Location *string `json:"location,omitempty"`
@@ -838,8 +892,8 @@ type CreateDataLakeAnalyticsAccountProperties struct {
QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
}
-// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating a new
-// Data Lake Analytics account.
+// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating
+// a new Data Lake Analytics account.
type CreateFirewallRuleWithAccountParameters struct {
// Name - The unique name of the firewall rule to create.
Name *string `json:"name,omitempty"`
@@ -931,7 +985,8 @@ func (coucpp *CreateOrUpdateComputePolicyParameters) UnmarshalJSON(body []byte)
return nil
}
-// CreateOrUpdateComputePolicyProperties the compute policy properties to use when creating a new compute policy.
+// CreateOrUpdateComputePolicyProperties the compute policy properties to use when creating a new compute
+// policy.
type CreateOrUpdateComputePolicyProperties struct {
// ObjectID - The AAD object identifier for the entity to create a policy for.
ObjectID *uuid.UUID `json:"objectId,omitempty"`
@@ -982,7 +1037,8 @@ func (coufrp *CreateOrUpdateFirewallRuleParameters) UnmarshalJSON(body []byte) e
return nil
}
-// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall rule.
+// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall
+// rule.
type CreateOrUpdateFirewallRuleProperties struct {
// StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
StartIPAddress *string `json:"startIpAddress,omitempty"`
@@ -990,8 +1046,8 @@ type CreateOrUpdateFirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// DataLakeAnalyticsAccount a Data Lake Analytics account object, containing all information associated with the
-// named Data Lake Analytics account.
+// DataLakeAnalyticsAccount a Data Lake Analytics account object, containing all information associated
+// with the named Data Lake Analytics account.
type DataLakeAnalyticsAccount struct {
autorest.Response `json:"-"`
// DataLakeAnalyticsAccountProperties - The properties defined by Data Lake Analytics all properties are specific to each resource provider.
@@ -1101,8 +1157,8 @@ func (dlaa *DataLakeAnalyticsAccount) UnmarshalJSON(body []byte) error {
return nil
}
-// DataLakeAnalyticsAccountBasic a Data Lake Analytics account object, containing all information associated with
-// the named Data Lake Analytics account.
+// DataLakeAnalyticsAccountBasic a Data Lake Analytics account object, containing all information
+// associated with the named Data Lake Analytics account.
type DataLakeAnalyticsAccountBasic struct {
// DataLakeAnalyticsAccountPropertiesBasic - The properties defined by Data Lake Analytics all properties are specific to each resource provider.
*DataLakeAnalyticsAccountPropertiesBasic `json:"properties,omitempty"`
@@ -1227,14 +1283,24 @@ type DataLakeAnalyticsAccountListResultIterator struct {
page DataLakeAnalyticsAccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error {
+func (iter *DataLakeAnalyticsAccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1243,6 +1309,13 @@ func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DataLakeAnalyticsAccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DataLakeAnalyticsAccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1262,6 +1335,11 @@ func (iter DataLakeAnalyticsAccountListResultIterator) Value() DataLakeAnalytics
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DataLakeAnalyticsAccountListResultIterator type.
+func NewDataLakeAnalyticsAccountListResultIterator(page DataLakeAnalyticsAccountListResultPage) DataLakeAnalyticsAccountListResultIterator {
+ return DataLakeAnalyticsAccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool {
return dlaalr.Value == nil || len(*dlaalr.Value) == 0
@@ -1269,11 +1347,11 @@ func (dlaalr DataLakeAnalyticsAccountListResult) IsEmpty() bool {
// dataLakeAnalyticsAccountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer() (*http.Request, error) {
+func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListResultPreparer(ctx context.Context) (*http.Request, error) {
if dlaalr.NextLink == nil || len(to.String(dlaalr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dlaalr.NextLink)))
@@ -1281,14 +1359,24 @@ func (dlaalr DataLakeAnalyticsAccountListResult) dataLakeAnalyticsAccountListRes
// DataLakeAnalyticsAccountListResultPage contains a page of DataLakeAnalyticsAccountBasic values.
type DataLakeAnalyticsAccountListResultPage struct {
- fn func(DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)
+ fn func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)
dlaalr DataLakeAnalyticsAccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DataLakeAnalyticsAccountListResultPage) Next() error {
- next, err := page.fn(page.dlaalr)
+func (page *DataLakeAnalyticsAccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeAnalyticsAccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlaalr)
if err != nil {
return err
}
@@ -1296,6 +1384,13 @@ func (page *DataLakeAnalyticsAccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DataLakeAnalyticsAccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DataLakeAnalyticsAccountListResultPage) NotDone() bool {
return !page.dlaalr.IsEmpty()
@@ -1314,8 +1409,13 @@ func (page DataLakeAnalyticsAccountListResultPage) Values() []DataLakeAnalyticsA
return *page.dlaalr.Value
}
-// DataLakeAnalyticsAccountProperties the account specific properties that are associated with an underlying Data
-// Lake Analytics account. Returned only when retrieving a specific account.
+// Creates a new instance of the DataLakeAnalyticsAccountListResultPage type.
+func NewDataLakeAnalyticsAccountListResultPage(getNextPage func(context.Context, DataLakeAnalyticsAccountListResult) (DataLakeAnalyticsAccountListResult, error)) DataLakeAnalyticsAccountListResultPage {
+ return DataLakeAnalyticsAccountListResultPage{fn: getNextPage}
+}
+
+// DataLakeAnalyticsAccountProperties the account specific properties that are associated with an
+// underlying Data Lake Analytics account. Returned only when retrieving a specific account.
type DataLakeAnalyticsAccountProperties struct {
// DefaultDataLakeStoreAccount - The default Data Lake Store account associated with this account.
DefaultDataLakeStoreAccount *string `json:"defaultDataLakeStoreAccount,omitempty"`
@@ -1363,8 +1463,8 @@ type DataLakeAnalyticsAccountProperties struct {
Endpoint *string `json:"endpoint,omitempty"`
}
-// DataLakeAnalyticsAccountPropertiesBasic the basic account specific properties that are associated with an
-// underlying Data Lake Analytics account.
+// DataLakeAnalyticsAccountPropertiesBasic the basic account specific properties that are associated with
+// an underlying Data Lake Analytics account.
type DataLakeAnalyticsAccountPropertiesBasic struct {
// AccountID - The unique identifier associated with this Data Lake Analytics account.
AccountID *uuid.UUID `json:"accountId,omitempty"`
@@ -1478,14 +1578,24 @@ type DataLakeStoreAccountInformationListResultIterator struct {
page DataLakeStoreAccountInformationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error {
+func (iter *DataLakeStoreAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1494,6 +1604,13 @@ func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DataLakeStoreAccountInformationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DataLakeStoreAccountInformationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1513,6 +1630,11 @@ func (iter DataLakeStoreAccountInformationListResultIterator) Value() DataLakeSt
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DataLakeStoreAccountInformationListResultIterator type.
+func NewDataLakeStoreAccountInformationListResultIterator(page DataLakeStoreAccountInformationListResultPage) DataLakeStoreAccountInformationListResultIterator {
+ return DataLakeStoreAccountInformationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dlsailr DataLakeStoreAccountInformationListResult) IsEmpty() bool {
return dlsailr.Value == nil || len(*dlsailr.Value) == 0
@@ -1520,11 +1642,11 @@ func (dlsailr DataLakeStoreAccountInformationListResult) IsEmpty() bool {
// dataLakeStoreAccountInformationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInformationListResultPreparer() (*http.Request, error) {
+func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
if dlsailr.NextLink == nil || len(to.String(dlsailr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dlsailr.NextLink)))
@@ -1532,14 +1654,24 @@ func (dlsailr DataLakeStoreAccountInformationListResult) dataLakeStoreAccountInf
// DataLakeStoreAccountInformationListResultPage contains a page of DataLakeStoreAccountInformation values.
type DataLakeStoreAccountInformationListResultPage struct {
- fn func(DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)
+ fn func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)
dlsailr DataLakeStoreAccountInformationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DataLakeStoreAccountInformationListResultPage) Next() error {
- next, err := page.fn(page.dlsailr)
+func (page *DataLakeStoreAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountInformationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlsailr)
if err != nil {
return err
}
@@ -1547,6 +1679,13 @@ func (page *DataLakeStoreAccountInformationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DataLakeStoreAccountInformationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DataLakeStoreAccountInformationListResultPage) NotDone() bool {
return !page.dlsailr.IsEmpty()
@@ -1565,6 +1704,11 @@ func (page DataLakeStoreAccountInformationListResultPage) Values() []DataLakeSto
return *page.dlsailr.Value
}
+// Creates a new instance of the DataLakeStoreAccountInformationListResultPage type.
+func NewDataLakeStoreAccountInformationListResultPage(getNextPage func(context.Context, DataLakeStoreAccountInformationListResult) (DataLakeStoreAccountInformationListResult, error)) DataLakeStoreAccountInformationListResultPage {
+ return DataLakeStoreAccountInformationListResultPage{fn: getNextPage}
+}
+
// DataLakeStoreAccountInformationProperties the Data Lake Store account properties.
type DataLakeStoreAccountInformationProperties struct {
// Suffix - The optional suffix for the Data Lake Store account.
@@ -1668,14 +1812,24 @@ type FirewallRuleListResultIterator struct {
page FirewallRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *FirewallRuleListResultIterator) Next() error {
+func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1684,6 +1838,13 @@ func (iter *FirewallRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *FirewallRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter FirewallRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1703,6 +1864,11 @@ func (iter FirewallRuleListResultIterator) Value() FirewallRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the FirewallRuleListResultIterator type.
+func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator {
+ return FirewallRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (frlr FirewallRuleListResult) IsEmpty() bool {
return frlr.Value == nil || len(*frlr.Value) == 0
@@ -1710,11 +1876,11 @@ func (frlr FirewallRuleListResult) IsEmpty() bool {
// firewallRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (frlr FirewallRuleListResult) firewallRuleListResultPreparer() (*http.Request, error) {
+func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if frlr.NextLink == nil || len(to.String(frlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(frlr.NextLink)))
@@ -1722,14 +1888,24 @@ func (frlr FirewallRuleListResult) firewallRuleListResultPreparer() (*http.Reque
// FirewallRuleListResultPage contains a page of FirewallRule values.
type FirewallRuleListResultPage struct {
- fn func(FirewallRuleListResult) (FirewallRuleListResult, error)
+ fn func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)
frlr FirewallRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *FirewallRuleListResultPage) Next() error {
- next, err := page.fn(page.frlr)
+func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.frlr)
if err != nil {
return err
}
@@ -1737,6 +1913,13 @@ func (page *FirewallRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *FirewallRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page FirewallRuleListResultPage) NotDone() bool {
return !page.frlr.IsEmpty()
@@ -1755,6 +1938,11 @@ func (page FirewallRuleListResultPage) Values() []FirewallRule {
return *page.frlr.Value
}
+// Creates a new instance of the FirewallRuleListResultPage type.
+func NewFirewallRuleListResultPage(getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage {
+ return FirewallRuleListResultPage{fn: getNextPage}
+}
+
// FirewallRuleProperties the firewall rule properties.
type FirewallRuleProperties struct {
// StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
@@ -1846,8 +2034,8 @@ type SasTokenInformation struct {
AccessToken *string `json:"accessToken,omitempty"`
}
-// SasTokenInformationListResult the SAS response that contains the storage account, container and associated SAS
-// token for connection use.
+// SasTokenInformationListResult the SAS response that contains the storage account, container and
+// associated SAS token for connection use.
type SasTokenInformationListResult struct {
autorest.Response `json:"-"`
// Value - The results of the list operation.
@@ -1856,20 +2044,31 @@ type SasTokenInformationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// SasTokenInformationListResultIterator provides access to a complete listing of SasTokenInformation values.
+// SasTokenInformationListResultIterator provides access to a complete listing of SasTokenInformation
+// values.
type SasTokenInformationListResultIterator struct {
i int
page SasTokenInformationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SasTokenInformationListResultIterator) Next() error {
+func (iter *SasTokenInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1878,6 +2077,13 @@ func (iter *SasTokenInformationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SasTokenInformationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SasTokenInformationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1897,6 +2103,11 @@ func (iter SasTokenInformationListResultIterator) Value() SasTokenInformation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SasTokenInformationListResultIterator type.
+func NewSasTokenInformationListResultIterator(page SasTokenInformationListResultPage) SasTokenInformationListResultIterator {
+ return SasTokenInformationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (stilr SasTokenInformationListResult) IsEmpty() bool {
return stilr.Value == nil || len(*stilr.Value) == 0
@@ -1904,11 +2115,11 @@ func (stilr SasTokenInformationListResult) IsEmpty() bool {
// sasTokenInformationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer() (*http.Request, error) {
+func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
if stilr.NextLink == nil || len(to.String(stilr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(stilr.NextLink)))
@@ -1916,14 +2127,24 @@ func (stilr SasTokenInformationListResult) sasTokenInformationListResultPreparer
// SasTokenInformationListResultPage contains a page of SasTokenInformation values.
type SasTokenInformationListResultPage struct {
- fn func(SasTokenInformationListResult) (SasTokenInformationListResult, error)
+ fn func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)
stilr SasTokenInformationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SasTokenInformationListResultPage) Next() error {
- next, err := page.fn(page.stilr)
+func (page *SasTokenInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SasTokenInformationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.stilr)
if err != nil {
return err
}
@@ -1931,6 +2152,13 @@ func (page *SasTokenInformationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SasTokenInformationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SasTokenInformationListResultPage) NotDone() bool {
return !page.stilr.IsEmpty()
@@ -1949,6 +2177,11 @@ func (page SasTokenInformationListResultPage) Values() []SasTokenInformation {
return *page.stilr.Value
}
+// Creates a new instance of the SasTokenInformationListResultPage type.
+func NewSasTokenInformationListResultPage(getNextPage func(context.Context, SasTokenInformationListResult) (SasTokenInformationListResult, error)) SasTokenInformationListResultPage {
+ return SasTokenInformationListResultPage{fn: getNextPage}
+}
+
// StorageAccountInformation azure Storage account information.
type StorageAccountInformation struct {
autorest.Response `json:"-"`
@@ -2040,21 +2273,31 @@ type StorageAccountInformationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// StorageAccountInformationListResultIterator provides access to a complete listing of StorageAccountInformation
-// values.
+// StorageAccountInformationListResultIterator provides access to a complete listing of
+// StorageAccountInformation values.
type StorageAccountInformationListResultIterator struct {
i int
page StorageAccountInformationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *StorageAccountInformationListResultIterator) Next() error {
+func (iter *StorageAccountInformationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2063,6 +2306,13 @@ func (iter *StorageAccountInformationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *StorageAccountInformationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter StorageAccountInformationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2082,6 +2332,11 @@ func (iter StorageAccountInformationListResultIterator) Value() StorageAccountIn
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the StorageAccountInformationListResultIterator type.
+func NewStorageAccountInformationListResultIterator(page StorageAccountInformationListResultPage) StorageAccountInformationListResultIterator {
+ return StorageAccountInformationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sailr StorageAccountInformationListResult) IsEmpty() bool {
return sailr.Value == nil || len(*sailr.Value) == 0
@@ -2089,11 +2344,11 @@ func (sailr StorageAccountInformationListResult) IsEmpty() bool {
// storageAccountInformationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sailr StorageAccountInformationListResult) storageAccountInformationListResultPreparer() (*http.Request, error) {
+func (sailr StorageAccountInformationListResult) storageAccountInformationListResultPreparer(ctx context.Context) (*http.Request, error) {
if sailr.NextLink == nil || len(to.String(sailr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sailr.NextLink)))
@@ -2101,14 +2356,24 @@ func (sailr StorageAccountInformationListResult) storageAccountInformationListRe
// StorageAccountInformationListResultPage contains a page of StorageAccountInformation values.
type StorageAccountInformationListResultPage struct {
- fn func(StorageAccountInformationListResult) (StorageAccountInformationListResult, error)
+ fn func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)
sailr StorageAccountInformationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *StorageAccountInformationListResultPage) Next() error {
- next, err := page.fn(page.sailr)
+func (page *StorageAccountInformationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountInformationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sailr)
if err != nil {
return err
}
@@ -2116,6 +2381,13 @@ func (page *StorageAccountInformationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *StorageAccountInformationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page StorageAccountInformationListResultPage) NotDone() bool {
return !page.sailr.IsEmpty()
@@ -2134,6 +2406,11 @@ func (page StorageAccountInformationListResultPage) Values() []StorageAccountInf
return *page.sailr.Value
}
+// Creates a new instance of the StorageAccountInformationListResultPage type.
+func NewStorageAccountInformationListResultPage(getNextPage func(context.Context, StorageAccountInformationListResult) (StorageAccountInformationListResult, error)) StorageAccountInformationListResultPage {
+ return StorageAccountInformationListResultPage{fn: getNextPage}
+}
+
// StorageAccountInformationProperties the Azure Storage account properties.
type StorageAccountInformationProperties struct {
// Suffix - The optional suffix for the storage account.
@@ -2222,8 +2499,8 @@ func (sc *StorageContainer) UnmarshalJSON(body []byte) error {
return nil
}
-// StorageContainerListResult the list of blob containers associated with the storage account attached to the Data
-// Lake Analytics account.
+// StorageContainerListResult the list of blob containers associated with the storage account attached to
+// the Data Lake Analytics account.
type StorageContainerListResult struct {
autorest.Response `json:"-"`
// Value - The results of the list operation.
@@ -2238,14 +2515,24 @@ type StorageContainerListResultIterator struct {
page StorageContainerListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *StorageContainerListResultIterator) Next() error {
+func (iter *StorageContainerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2254,6 +2541,13 @@ func (iter *StorageContainerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *StorageContainerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter StorageContainerListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2273,6 +2567,11 @@ func (iter StorageContainerListResultIterator) Value() StorageContainer {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the StorageContainerListResultIterator type.
+func NewStorageContainerListResultIterator(page StorageContainerListResultPage) StorageContainerListResultIterator {
+ return StorageContainerListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sclr StorageContainerListResult) IsEmpty() bool {
return sclr.Value == nil || len(*sclr.Value) == 0
@@ -2280,11 +2579,11 @@ func (sclr StorageContainerListResult) IsEmpty() bool {
// storageContainerListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sclr StorageContainerListResult) storageContainerListResultPreparer() (*http.Request, error) {
+func (sclr StorageContainerListResult) storageContainerListResultPreparer(ctx context.Context) (*http.Request, error) {
if sclr.NextLink == nil || len(to.String(sclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sclr.NextLink)))
@@ -2292,14 +2591,24 @@ func (sclr StorageContainerListResult) storageContainerListResultPreparer() (*ht
// StorageContainerListResultPage contains a page of StorageContainer values.
type StorageContainerListResultPage struct {
- fn func(StorageContainerListResult) (StorageContainerListResult, error)
+ fn func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)
sclr StorageContainerListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *StorageContainerListResultPage) Next() error {
- next, err := page.fn(page.sclr)
+func (page *StorageContainerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageContainerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sclr)
if err != nil {
return err
}
@@ -2307,6 +2616,13 @@ func (page *StorageContainerListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *StorageContainerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page StorageContainerListResultPage) NotDone() bool {
return !page.sclr.IsEmpty()
@@ -2325,6 +2641,11 @@ func (page StorageContainerListResultPage) Values() []StorageContainer {
return *page.sclr.Value
}
+// Creates a new instance of the StorageContainerListResultPage type.
+func NewStorageContainerListResultPage(getNextPage func(context.Context, StorageContainerListResult) (StorageContainerListResult, error)) StorageContainerListResultPage {
+ return StorageContainerListResultPage{fn: getNextPage}
+}
+
// StorageContainerProperties azure Storage blob container properties information.
type StorageContainerProperties struct {
// LastModifiedTime - The last modified time of the blob container.
@@ -2392,8 +2713,8 @@ type UpdateComputePolicyProperties struct {
MinPriorityPerJob *int32 `json:"minPriorityPerJob,omitempty"`
}
-// UpdateComputePolicyWithAccountParameters the parameters used to update a compute policy while updating a Data
-// Lake Analytics account.
+// UpdateComputePolicyWithAccountParameters the parameters used to update a compute policy while updating a
+// Data Lake Analytics account.
type UpdateComputePolicyWithAccountParameters struct {
// Name - The unique name of the compute policy to update.
Name *string `json:"name,omitempty"`
@@ -2500,8 +2821,8 @@ func (udlaap *UpdateDataLakeAnalyticsAccountParameters) UnmarshalJSON(body []byt
return nil
}
-// UpdateDataLakeAnalyticsAccountProperties the properties to update that are associated with an underlying Data
-// Lake Analytics account.
+// UpdateDataLakeAnalyticsAccountProperties the properties to update that are associated with an underlying
+// Data Lake Analytics account.
type UpdateDataLakeAnalyticsAccountProperties struct {
// DataLakeStoreAccounts - The list of Data Lake Store accounts associated with this account.
DataLakeStoreAccounts *[]UpdateDataLakeStoreWithAccountParameters `json:"dataLakeStoreAccounts,omitempty"`
@@ -2529,15 +2850,15 @@ type UpdateDataLakeAnalyticsAccountProperties struct {
QueryStoreRetention *int32 `json:"queryStoreRetention,omitempty"`
}
-// UpdateDataLakeStoreProperties the Data Lake Store account properties to use when updating a Data Lake Store
-// account.
+// UpdateDataLakeStoreProperties the Data Lake Store account properties to use when updating a Data Lake
+// Store account.
type UpdateDataLakeStoreProperties struct {
// Suffix - The optional suffix for the Data Lake Store account.
Suffix *string `json:"suffix,omitempty"`
}
-// UpdateDataLakeStoreWithAccountParameters the parameters used to update a Data Lake Store account while updating
-// a Data Lake Analytics account.
+// UpdateDataLakeStoreWithAccountParameters the parameters used to update a Data Lake Store account while
+// updating a Data Lake Analytics account.
type UpdateDataLakeStoreWithAccountParameters struct {
// Name - The unique name of the Data Lake Store account to update.
Name *string `json:"name,omitempty"`
@@ -2637,8 +2958,8 @@ type UpdateFirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a Data Lake
-// Analytics account.
+// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a
+// Data Lake Analytics account.
type UpdateFirewallRuleWithAccountParameters struct {
// Name - The unique name of the firewall rule to update.
Name *string `json:"name,omitempty"`
@@ -2730,8 +3051,8 @@ func (usap *UpdateStorageAccountParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// UpdateStorageAccountProperties the Azure Storage account properties to use when updating an Azure Storage
-// account.
+// UpdateStorageAccountProperties the Azure Storage account properties to use when updating an Azure
+// Storage account.
type UpdateStorageAccountProperties struct {
// AccessKey - The updated access key associated with this Azure Storage account that will be used to connect to it.
AccessKey *string `json:"accessKey,omitempty"`
@@ -2739,8 +3060,8 @@ type UpdateStorageAccountProperties struct {
Suffix *string `json:"suffix,omitempty"`
}
-// UpdateStorageAccountWithAccountParameters the parameters used to update an Azure Storage account while updating
-// a Data Lake Analytics account.
+// UpdateStorageAccountWithAccountParameters the parameters used to update an Azure Storage account while
+// updating a Data Lake Analytics account.
type UpdateStorageAccountWithAccountParameters struct {
// Name - The unique name of the Azure Storage account to update.
Name *string `json:"name,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/operations.go
index f91cf3757448..99bbf0ab9508 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Data Lake Analytics REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "account.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go
index 63882466a8d6..f83bad37c126 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/analytics/mgmt/2016-11-01/account/storageaccounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewStorageAccountsClientWithBaseURI(baseURI string, subscriptionID string)
// storageAccountName - the name of the Azure Storage account to add
// parameters - the parameters containing the access key and optional suffix for the Azure Storage Account.
func (client StorageAccountsClient) Add(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters AddStorageAccountParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.Add")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AddStorageAccountProperties", Name: validation.Null, Rule: true,
@@ -124,6 +135,16 @@ func (client StorageAccountsClient) AddResponder(resp *http.Response) (result au
// accountName - the name of the Data Lake Analytics account.
// storageAccountName - the name of the Azure Storage account to remove
func (client StorageAccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, storageAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.StorageAccountsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client StorageAccountsClient) DeleteResponder(resp *http.Response) (result
// accountName - the name of the Data Lake Analytics account.
// storageAccountName - the name of the Azure Storage account for which to retrieve the details.
func (client StorageAccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageAccountInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, storageAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.StorageAccountsClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client StorageAccountsClient) GetResponder(resp *http.Response) (result St
// storageAccountName - the name of the Azure storage account from which to retrieve the blob container.
// containerName - the name of the Azure storage container to retrieve
func (client StorageAccountsClient) GetStorageContainer(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result StorageContainer, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.GetStorageContainer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetStorageContainerPreparer(ctx, resourceGroupName, accountName, storageAccountName, containerName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.StorageAccountsClient", "GetStorageContainer", nil, "Failure preparing request")
@@ -343,6 +384,16 @@ func (client StorageAccountsClient) GetStorageContainerResponder(resp *http.Resp
// count - the Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client StorageAccountsClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result StorageAccountInformationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.sailr.Response.Response != nil {
+ sc = result.sailr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -435,8 +486,8 @@ func (client StorageAccountsClient) ListByAccountResponder(resp *http.Response)
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client StorageAccountsClient) listByAccountNextResults(lastResults StorageAccountInformationListResult) (result StorageAccountInformationListResult, err error) {
- req, err := lastResults.storageAccountInformationListResultPreparer()
+func (client StorageAccountsClient) listByAccountNextResults(ctx context.Context, lastResults StorageAccountInformationListResult) (result StorageAccountInformationListResult, err error) {
+ req, err := lastResults.storageAccountInformationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.StorageAccountsClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -457,6 +508,16 @@ func (client StorageAccountsClient) listByAccountNextResults(lastResults Storage
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client StorageAccountsClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result StorageAccountInformationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName, filter, top, skip, selectParameter, orderby, count)
return
}
@@ -469,6 +530,16 @@ func (client StorageAccountsClient) ListByAccountComplete(ctx context.Context, r
// storageAccountName - the name of the Azure storage account for which the SAS token is being requested.
// containerName - the name of the Azure storage container for which the SAS token is being requested.
func (client StorageAccountsClient) ListSasTokens(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result SasTokenInformationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListSasTokens")
+ defer func() {
+ sc := -1
+ if result.stilr.Response.Response != nil {
+ sc = result.stilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listSasTokensNextResults
req, err := client.ListSasTokensPreparer(ctx, resourceGroupName, accountName, storageAccountName, containerName)
if err != nil {
@@ -535,8 +606,8 @@ func (client StorageAccountsClient) ListSasTokensResponder(resp *http.Response)
}
// listSasTokensNextResults retrieves the next set of results, if any.
-func (client StorageAccountsClient) listSasTokensNextResults(lastResults SasTokenInformationListResult) (result SasTokenInformationListResult, err error) {
- req, err := lastResults.sasTokenInformationListResultPreparer()
+func (client StorageAccountsClient) listSasTokensNextResults(ctx context.Context, lastResults SasTokenInformationListResult) (result SasTokenInformationListResult, err error) {
+ req, err := lastResults.sasTokenInformationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.StorageAccountsClient", "listSasTokensNextResults", nil, "Failure preparing next results request")
}
@@ -557,6 +628,16 @@ func (client StorageAccountsClient) listSasTokensNextResults(lastResults SasToke
// ListSasTokensComplete enumerates all values, automatically crossing page boundaries as required.
func (client StorageAccountsClient) ListSasTokensComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, containerName string) (result SasTokenInformationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListSasTokens")
+ 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.ListSasTokens(ctx, resourceGroupName, accountName, storageAccountName, containerName)
return
}
@@ -568,6 +649,16 @@ func (client StorageAccountsClient) ListSasTokensComplete(ctx context.Context, r
// accountName - the name of the Data Lake Analytics account.
// storageAccountName - the name of the Azure storage account from which to list blob containers.
func (client StorageAccountsClient) ListStorageContainers(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageContainerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListStorageContainers")
+ defer func() {
+ sc := -1
+ if result.sclr.Response.Response != nil {
+ sc = result.sclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listStorageContainersNextResults
req, err := client.ListStorageContainersPreparer(ctx, resourceGroupName, accountName, storageAccountName)
if err != nil {
@@ -633,8 +724,8 @@ func (client StorageAccountsClient) ListStorageContainersResponder(resp *http.Re
}
// listStorageContainersNextResults retrieves the next set of results, if any.
-func (client StorageAccountsClient) listStorageContainersNextResults(lastResults StorageContainerListResult) (result StorageContainerListResult, err error) {
- req, err := lastResults.storageContainerListResultPreparer()
+func (client StorageAccountsClient) listStorageContainersNextResults(ctx context.Context, lastResults StorageContainerListResult) (result StorageContainerListResult, err error) {
+ req, err := lastResults.storageContainerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.StorageAccountsClient", "listStorageContainersNextResults", nil, "Failure preparing next results request")
}
@@ -655,6 +746,16 @@ func (client StorageAccountsClient) listStorageContainersNextResults(lastResults
// ListStorageContainersComplete enumerates all values, automatically crossing page boundaries as required.
func (client StorageAccountsClient) ListStorageContainersComplete(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string) (result StorageContainerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.ListStorageContainers")
+ 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.ListStorageContainers(ctx, resourceGroupName, accountName, storageAccountName)
return
}
@@ -668,6 +769,16 @@ func (client StorageAccountsClient) ListStorageContainersComplete(ctx context.Co
// parameters - the parameters containing the access key and suffix to update the storage account with, if any.
// Passing nothing results in no change.
func (client StorageAccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, storageAccountName string, parameters *UpdateStorageAccountParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageAccountsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, storageAccountName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.StorageAccountsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/filesystem.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/filesystem.go
index 9a03cec7936d..8dfbeaba2a2a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/filesystem.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/filesystem.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"io"
"net/http"
@@ -43,7 +44,8 @@ func NewClient() Client {
// Parameters:
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file to which to append.
-// streamContents - the file contents to include when appending to the file.
+// streamContents - the file contents to include when appending to the file. The maximum content size is 4MB.
+// For content larger than 4MB you must append the content in 4MB chunks.
// offset - the optional offset in the stream to begin the append operation. Default is to append at the end of
// the stream.
// syncFlag - optionally indicates what to do after completion of the concurrent append. DATA indicates that
@@ -58,6 +60,16 @@ func NewClient() Client {
// from the same client and same session. This will give a performance benefit when syncFlag is DATA or
// METADATA.
func (client Client) Append(ctx context.Context, accountName string, pathParameter string, streamContents io.ReadCloser, offset *int64, syncFlag SyncFlag, leaseID *uuid.UUID, fileSessionID *uuid.UUID) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Append")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.AppendPreparer(ctx, accountName, pathParameter, streamContents, offset, syncFlag, leaseID, fileSessionID)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Append", nil, "Failure preparing request")
@@ -147,6 +159,16 @@ func (client Client) AppendResponder(resp *http.Response) (result autorest.Respo
// access.
// fsaction - file system operation read/write/execute in string form, matching regex pattern '[rwx-]{3}'
func (client Client) CheckAccess(ctx context.Context, accountName string, pathParameter string, fsaction string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckAccess")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CheckAccessPreparer(ctx, accountName, pathParameter, fsaction)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "CheckAccess", nil, "Failure preparing request")
@@ -221,6 +243,16 @@ func (client Client) CheckAccessResponder(resp *http.Response) (result autorest.
// sources - a list of comma separated Data Lake Store paths (starting with '/') of the files to concatenate,
// in the order in which they should be concatenated.
func (client Client) Concat(ctx context.Context, accountName string, pathParameter string, sources []string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Concat")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: sources,
Constraints: []validation.Constraint{{Target: "sources", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -302,7 +334,8 @@ func (client Client) ConcatResponder(resp *http.Response) (result autorest.Respo
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file to which to append using concurrent
// append.
-// streamContents - the file contents to include when appending to the file.
+// streamContents - the file contents to include when appending to the file. The maximum content size is 4MB.
+// For content larger than 4MB you must append the content in 4MB chunks.
// appendMode - indicates the concurrent append call should create the file if it doesn't exist or just open
// the existing file for append
// syncFlag - optionally indicates what to do after completion of the concurrent append. DATA indicates that
@@ -312,6 +345,16 @@ func (client Client) ConcatResponder(resp *http.Response) (result autorest.Respo
// should get updated. CLOSE indicates that the client is done sending data, the file handle should be
// closed/unlocked, and file metadata should get updated.
func (client Client) ConcurrentAppend(ctx context.Context, accountName string, pathParameter string, streamContents io.ReadCloser, appendMode AppendModeType, syncFlag SyncFlag) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ConcurrentAppend")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ConcurrentAppendPreparer(ctx, accountName, pathParameter, streamContents, appendMode, syncFlag)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "ConcurrentAppend", nil, "Failure preparing request")
@@ -394,7 +437,8 @@ func (client Client) ConcurrentAppendResponder(resp *http.Response) (result auto
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file to create.
// streamContents - the file contents to include when creating the file. This parameter is optional, resulting
-// in an empty file if not specified.
+// in an empty file if not specified. The maximum content size is 4MB. For content larger than 4MB you must
+// append the content in 4MB chunks.
// overwrite - the indication of if the file should be overwritten.
// syncFlag - optionally indicates what to do after completion of the create. DATA indicates that more data
// will be sent immediately by the client, the file handle should remain open/locked, and file metadata
@@ -407,6 +451,16 @@ func (client Client) ConcurrentAppendResponder(resp *http.Response) (result auto
// permission - the octal representation of the unnamed user, mask and other permissions that should be set for
// the file when created. If not specified, it inherits these from the container.
func (client Client) Create(ctx context.Context, accountName string, pathParameter string, streamContents io.ReadCloser, overwrite *bool, syncFlag SyncFlag, leaseID *uuid.UUID, permission *int32) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Create")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, accountName, pathParameter, streamContents, overwrite, syncFlag, leaseID, permission)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Create", nil, "Failure preparing request")
@@ -498,6 +552,16 @@ func (client Client) CreateResponder(resp *http.Response) (result autorest.Respo
// pathParameter - the Data Lake Store path (starting with '/') of the file or directory to delete.
// recursive - the optional switch indicating if the delete should be recursive
func (client Client) Delete(ctx context.Context, accountName string, pathParameter string, recursive *bool) (result FileOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, accountName, pathParameter, recursive)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Delete", nil, "Failure preparing request")
@@ -572,9 +636,19 @@ func (client Client) DeleteResponder(resp *http.Response) (result FileOperationR
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file or directory for which to get the
// ACL.
-// tooID - an optional switch to return friendly names in place of object ID for ACL entries. tooid=false
+// tooID - an optional switch to return friendly names in place of object ID for ACL entries. tooId=false
// returns friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs.
func (client Client) GetACLStatus(ctx context.Context, accountName string, pathParameter string, tooID *bool) (result ACLStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetACLStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetACLStatusPreparer(ctx, accountName, pathParameter, tooID)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "GetACLStatus", nil, "Failure preparing request")
@@ -649,6 +723,16 @@ func (client Client) GetACLStatusResponder(resp *http.Response) (result ACLStatu
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file for which to retrieve the summary.
func (client Client) GetContentSummary(ctx context.Context, accountName string, pathParameter string) (result ContentSummaryResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetContentSummary")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetContentSummaryPreparer(ctx, accountName, pathParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "GetContentSummary", nil, "Failure preparing request")
@@ -720,9 +804,19 @@ func (client Client) GetContentSummaryResponder(resp *http.Response) (result Con
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the file or directory for which to retrieve
// the status.
-// tooID - an optional switch to return friendly names in place of owner and group. tooid=false returns
+// tooID - an optional switch to return friendly names in place of owner and group. tooId=false returns
// friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs.
func (client Client) GetFileStatus(ctx context.Context, accountName string, pathParameter string, tooID *bool) (result FileStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetFileStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetFileStatusPreparer(ctx, accountName, pathParameter, tooID)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "GetFileStatus", nil, "Failure preparing request")
@@ -797,15 +891,25 @@ func (client Client) GetFileStatusResponder(resp *http.Response) (result FileSta
// accountName - the Azure Data Lake Store account to execute filesystem operations on.
// pathParameter - the Data Lake Store path (starting with '/') of the directory to list.
// listSize - gets or sets the number of items to return. Optional.
-// listAfter - gets or sets the item or lexographical index after which to begin returning results. For
+// listAfter - gets or sets the item or lexicographical index after which to begin returning results. For
// example, a file list of 'a','b','d' and listAfter='b' will return 'd', and a listAfter='c' will also return
// 'd'. Optional.
-// listBefore - gets or sets the item or lexographical index before which to begin returning results. For
+// listBefore - gets or sets the item or lexicographical index before which to begin returning results. For
// example, a file list of 'a','b','d' and listBefore='d' will return 'a','b', and a listBefore='c' will also
// return 'a','b'. Optional.
-// tooID - an optional switch to return friendly names in place of owner and group. tooid=false returns
+// tooID - an optional switch to return friendly names in place of owner and group. tooId=false returns
// friendly names instead of the AAD Object ID. Default value is true, returning AAD object IDs.
func (client Client) ListFileStatus(ctx context.Context, accountName string, pathParameter string, listSize *int32, listAfter string, listBefore string, tooID *bool) (result FileStatusesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListFileStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListFileStatusPreparer(ctx, accountName, pathParameter, listSize, listAfter, listBefore, tooID)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "ListFileStatus", nil, "Failure preparing request")
@@ -890,6 +994,16 @@ func (client Client) ListFileStatusResponder(resp *http.Response) (result FileSt
// pathParameter - the Data Lake Store path (starting with '/') of the directory to create.
// permission - optional octal permission with which the directory should be created.
func (client Client) Mkdirs(ctx context.Context, accountName string, pathParameter string, permission *int32) (result FileOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Mkdirs")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.MkdirsPreparer(ctx, accountName, pathParameter, permission)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Mkdirs", nil, "Failure preparing request")
@@ -967,6 +1081,16 @@ func (client Client) MkdirsResponder(resp *http.Response) (result FileOperationR
// aclspec - the ACL specification included in ACL modification operations in the format
// '[default:]user|group|other::r|-w|-x|-'
func (client Client) ModifyACLEntries(ctx context.Context, accountName string, pathParameter string, aclspec string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ModifyACLEntries")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ModifyACLEntriesPreparer(ctx, accountName, pathParameter, aclspec)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "ModifyACLEntries", nil, "Failure preparing request")
@@ -1048,6 +1172,16 @@ func (client Client) ModifyACLEntriesResponder(resp *http.Response) (result auto
// WARNING: This includes the deletion of any other files that are not source files. Only set this to true when
// source files are the only files in the source directory.
func (client Client) MsConcat(ctx context.Context, accountName string, pathParameter string, streamContents io.ReadCloser, deleteSourceDirectory *bool) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.MsConcat")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.MsConcatPreparer(ctx, accountName, pathParameter, streamContents, deleteSourceDirectory)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "MsConcat", nil, "Failure preparing request")
@@ -1127,6 +1261,16 @@ func (client Client) MsConcatResponder(resp *http.Response) (result autorest.Res
// fileSessionID - optional unique GUID per file indicating all the reads with the same fileSessionId are from
// the same client and same session. This will give a performance benefit.
func (client Client) Open(ctx context.Context, accountName string, pathParameter string, length *int64, offset *int64, fileSessionID *uuid.UUID) (result ReadCloser, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Open")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.OpenPreparer(ctx, accountName, pathParameter, length, offset, fileSessionID)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Open", nil, "Failure preparing request")
@@ -1208,6 +1352,16 @@ func (client Client) OpenResponder(resp *http.Response) (result ReadCloser, err
// pathParameter - the Data Lake Store path (starting with '/') of the file or directory with the ACL being
// removed.
func (client Client) RemoveACL(ctx context.Context, accountName string, pathParameter string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.RemoveACL")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RemoveACLPreparer(ctx, accountName, pathParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "RemoveACL", nil, "Failure preparing request")
@@ -1280,6 +1434,16 @@ func (client Client) RemoveACLResponder(resp *http.Response) (result autorest.Re
// removed.
// aclspec - the ACL spec included in ACL removal operations in the format '[default:]user|group|other'
func (client Client) RemoveACLEntries(ctx context.Context, accountName string, pathParameter string, aclspec string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.RemoveACLEntries")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RemoveACLEntriesPreparer(ctx, accountName, pathParameter, aclspec)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "RemoveACLEntries", nil, "Failure preparing request")
@@ -1352,6 +1516,16 @@ func (client Client) RemoveACLEntriesResponder(resp *http.Response) (result auto
// pathParameter - the Data Lake Store path (starting with '/') of the directory with the default ACL being
// removed.
func (client Client) RemoveDefaultACL(ctx context.Context, accountName string, pathParameter string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.RemoveDefaultACL")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RemoveDefaultACLPreparer(ctx, accountName, pathParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "RemoveDefaultACL", nil, "Failure preparing request")
@@ -1423,6 +1597,16 @@ func (client Client) RemoveDefaultACLResponder(resp *http.Response) (result auto
// pathParameter - the Data Lake Store path (starting with '/') of the file or directory to move/rename.
// destination - the path to move/rename the file or folder to
func (client Client) Rename(ctx context.Context, accountName string, pathParameter string, destination string) (result FileOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Rename")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RenamePreparer(ctx, accountName, pathParameter, destination)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "Rename", nil, "Failure preparing request")
@@ -1498,6 +1682,16 @@ func (client Client) RenameResponder(resp *http.Response) (result FileOperationR
// aclspec - the ACL spec included in ACL creation operations in the format
// '[default:]user|group|other::r|-w|-x|-'
func (client Client) SetACL(ctx context.Context, accountName string, pathParameter string, aclspec string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.SetACL")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SetACLPreparer(ctx, accountName, pathParameter, aclspec)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "SetACL", nil, "Failure preparing request")
@@ -1577,6 +1771,16 @@ func (client Client) SetACLResponder(resp *http.Response) (result autorest.Respo
// Unix timestamp relative to 1/1/1970 00:00:00.
// expireTime - the time that the file will expire, corresponding to the ExpiryOption that was set.
func (client Client) SetFileExpiry(ctx context.Context, accountName string, pathParameter string, expiryOption ExpiryOptionType, expireTime *int64) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.SetFileExpiry")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SetFileExpiryPreparer(ctx, accountName, pathParameter, expiryOption, expireTime)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "SetFileExpiry", nil, "Failure preparing request")
@@ -1656,6 +1860,16 @@ func (client Client) SetFileExpiryResponder(resp *http.Response) (result autores
// group - the AAD Object ID of the group owner of the file or directory. If empty, the property will remain
// unchanged.
func (client Client) SetOwner(ctx context.Context, accountName string, pathParameter string, owner string, group string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.SetOwner")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SetOwnerPreparer(ctx, accountName, pathParameter, owner, group)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "SetOwner", nil, "Failure preparing request")
@@ -1735,6 +1949,16 @@ func (client Client) SetOwnerResponder(resp *http.Response) (result autorest.Res
// permission - a string representation of the permission (i.e 'rwx'). If empty, this property remains
// unchanged.
func (client Client) SetPermission(ctx context.Context, accountName string, pathParameter string, permission string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.SetPermission")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SetPermissionPreparer(ctx, accountName, pathParameter, permission)
if err != nil {
err = autorest.NewErrorWithError(err, "filesystem.Client", "SetPermission", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/models.go
index c38c70b92e8e..55d74882b1f7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem/models.go
@@ -23,6 +23,9 @@ import (
"io"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/store/2016-11-01/filesystem"
+
// AppendModeType enumerates the values for append mode type.
type AppendModeType string
@@ -141,8 +144,8 @@ type ACLStatusResult struct {
ACLStatus *ACLStatus `json:"aclStatus,omitempty"`
}
-// AdlsAccessControlException a WebHDFS exception thrown indicating that access is denied due to insufficient
-// permissions. Thrown when a 403 error response code is returned (forbidden).
+// AdlsAccessControlException a WebHDFS exception thrown indicating that access is denied due to
+// insufficient permissions. Thrown when a 403 error response code is returned (forbidden).
type AdlsAccessControlException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -228,8 +231,8 @@ func (aace AdlsAccessControlException) AsBasicAdlsRemoteException() (BasicAdlsRe
return &aace, true
}
-// AdlsBadOffsetException a WebHDFS exception thrown indicating the append or read is from a bad offset. Thrown
-// when a 400 error response code is returned for append and open operations (Bad request).
+// AdlsBadOffsetException a WebHDFS exception thrown indicating the append or read is from a bad offset.
+// Thrown when a 400 error response code is returned for append and open operations (Bad request).
type AdlsBadOffsetException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -344,8 +347,8 @@ func (ae *AdlsError) UnmarshalJSON(body []byte) error {
return nil
}
-// AdlsFileAlreadyExistsException a WebHDFS exception thrown indicating the file or folder already exists. Thrown
-// when a 403 error response code is returned (forbidden).
+// AdlsFileAlreadyExistsException a WebHDFS exception thrown indicating the file or folder already exists.
+// Thrown when a 403 error response code is returned (forbidden).
type AdlsFileAlreadyExistsException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -431,8 +434,8 @@ func (afaee AdlsFileAlreadyExistsException) AsBasicAdlsRemoteException() (BasicA
return &afaee, true
}
-// AdlsFileNotFoundException a WebHDFS exception thrown indicating the file or folder could not be found. Thrown
-// when a 404 error response code is returned (not found).
+// AdlsFileNotFoundException a WebHDFS exception thrown indicating the file or folder could not be found.
+// Thrown when a 404 error response code is returned (not found).
type AdlsFileNotFoundException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -518,8 +521,8 @@ func (afnfe AdlsFileNotFoundException) AsBasicAdlsRemoteException() (BasicAdlsRe
return &afnfe, true
}
-// AdlsIllegalArgumentException a WebHDFS exception thrown indicating that one more arguments is incorrect. Thrown
-// when a 400 error response code is returned (bad request).
+// AdlsIllegalArgumentException a WebHDFS exception thrown indicating that one more arguments is incorrect.
+// Thrown when a 400 error response code is returned (bad request).
type AdlsIllegalArgumentException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -605,8 +608,8 @@ func (aiae AdlsIllegalArgumentException) AsBasicAdlsRemoteException() (BasicAdls
return &aiae, true
}
-// AdlsIOException a WebHDFS exception thrown indicating there was an IO (read or write) error. Thrown when a 403
-// error response code is returned (forbidden).
+// AdlsIOException a WebHDFS exception thrown indicating there was an IO (read or write) error. Thrown when
+// a 403 error response code is returned (forbidden).
type AdlsIOException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -708,8 +711,8 @@ type BasicAdlsRemoteException interface {
AsAdlsRemoteException() (*AdlsRemoteException, bool)
}
-// AdlsRemoteException data Lake Store filesystem exception based on the WebHDFS definition for RemoteExceptions.
-// This is a WebHDFS 'catch all' exception
+// AdlsRemoteException data Lake Store filesystem exception based on the WebHDFS definition for
+// RemoteExceptions. This is a WebHDFS 'catch all' exception
type AdlsRemoteException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -868,8 +871,8 @@ func (are AdlsRemoteException) AsBasicAdlsRemoteException() (BasicAdlsRemoteExce
return &are, true
}
-// AdlsRuntimeException a WebHDFS exception thrown when an unexpected error occurs during an operation. Thrown when
-// a 500 error response code is returned (Internal server error).
+// AdlsRuntimeException a WebHDFS exception thrown when an unexpected error occurs during an operation.
+// Thrown when a 500 error response code is returned (Internal server error).
type AdlsRuntimeException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -955,8 +958,8 @@ func (are AdlsRuntimeException) AsBasicAdlsRemoteException() (BasicAdlsRemoteExc
return &are, true
}
-// AdlsSecurityException a WebHDFS exception thrown indicating that access is denied. Thrown when a 401 error
-// response code is returned (Unauthorized).
+// AdlsSecurityException a WebHDFS exception thrown indicating that access is denied. Thrown when a 401
+// error response code is returned (Unauthorized).
type AdlsSecurityException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -1042,8 +1045,8 @@ func (ase AdlsSecurityException) AsBasicAdlsRemoteException() (BasicAdlsRemoteEx
return &ase, true
}
-// AdlsThrottledException a WebHDFS exception thrown indicating that the request is being throttled. Reducing the
-// number of requests or request size helps to mitigate this error.
+// AdlsThrottledException a WebHDFS exception thrown indicating that the request is being throttled.
+// Reducing the number of requests or request size helps to mitigate this error.
type AdlsThrottledException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
@@ -1129,8 +1132,8 @@ func (ate AdlsThrottledException) AsBasicAdlsRemoteException() (BasicAdlsRemoteE
return &ate, true
}
-// AdlsUnsupportedOperationException a WebHDFS exception thrown indicating that the requested operation is not
-// supported. Thrown when a 400 error response code is returned (bad request).
+// AdlsUnsupportedOperationException a WebHDFS exception thrown indicating that the requested operation is
+// not supported. Thrown when a 400 error response code is returned (bad request).
type AdlsUnsupportedOperationException struct {
// JavaClassName - the full class package name for the exception thrown, such as 'java.lang.IllegalArgumentException'.
JavaClassName *string `json:"javaClassName,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
index 6cce0f738e83..2ca4aeb7b5b4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/accounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAccountsClientWithBaseURI(baseURI string, subscriptionID string) Account
// location - the resource location without whitespace.
// parameters - parameters supplied to check the Data Lake Store account name availability.
func (client AccountsClient) CheckNameAvailability(ctx context.Context, location string, parameters CheckNameAvailabilityParameters) (result NameAvailabilityInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -121,6 +132,16 @@ func (client AccountsClient) CheckNameAvailabilityResponder(resp *http.Response)
// accountName - the name of the Data Lake Store account.
// parameters - parameters supplied to create the Data Lake Store account.
func (client AccountsClient) Create(ctx context.Context, resourceGroupName string, accountName string, parameters CreateDataLakeStoreAccountParameters) (result AccountsCreateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Location", Name: validation.Null, Rule: true, Chain: nil},
@@ -185,10 +206,6 @@ func (client AccountsClient) CreateSender(req *http.Request) (future AccountsCre
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -211,6 +228,16 @@ func (client AccountsClient) CreateResponder(resp *http.Response) (result DataLa
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client AccountsClient) Delete(ctx context.Context, resourceGroupName string, accountName string) (result AccountsDeleteFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Delete", nil, "Failure preparing request")
@@ -256,10 +283,6 @@ func (client AccountsClient) DeleteSender(req *http.Request) (future AccountsDel
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -281,6 +304,16 @@ func (client AccountsClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client AccountsClient) EnableKeyVault(ctx context.Context, resourceGroupName string, accountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.EnableKeyVault")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.EnableKeyVaultPreparer(ctx, resourceGroupName, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "EnableKeyVault", nil, "Failure preparing request")
@@ -347,6 +380,16 @@ func (client AccountsClient) EnableKeyVaultResponder(resp *http.Response) (resul
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client AccountsClient) Get(ctx context.Context, resourceGroupName string, accountName string) (result DataLakeStoreAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Get", nil, "Failure preparing request")
@@ -423,6 +466,16 @@ func (client AccountsClient) GetResponder(resp *http.Response) (result DataLakeS
// count - the Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client AccountsClient) List(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.List")
+ defer func() {
+ sc := -1
+ if result.dlsalr.Response.Response != nil {
+ sc = result.dlsalr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -513,8 +566,8 @@ func (client AccountsClient) ListResponder(resp *http.Response) (result DataLake
}
// listNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listNextResults(lastResults DataLakeStoreAccountListResult) (result DataLakeStoreAccountListResult, err error) {
- req, err := lastResults.dataLakeStoreAccountListResultPreparer()
+func (client AccountsClient) listNextResults(ctx context.Context, lastResults DataLakeStoreAccountListResult) (result DataLakeStoreAccountListResult, err error) {
+ req, err := lastResults.dataLakeStoreAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.AccountsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -535,6 +588,16 @@ func (client AccountsClient) listNextResults(lastResults DataLakeStoreAccountLis
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListComplete(ctx context.Context, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.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, filter, top, skip, selectParameter, orderby, count)
return
}
@@ -554,6 +617,16 @@ func (client AccountsClient) ListComplete(ctx context.Context, filter string, to
// count - a Boolean value of true or false to request a count of the matching resources included with the
// resources in the response, e.g. Categories?$count=true. Optional.
func (client AccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dlsalr.Response.Response != nil {
+ sc = result.dlsalr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: top,
Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
@@ -645,8 +718,8 @@ func (client AccountsClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AccountsClient) listByResourceGroupNextResults(lastResults DataLakeStoreAccountListResult) (result DataLakeStoreAccountListResult, err error) {
- req, err := lastResults.dataLakeStoreAccountListResultPreparer()
+func (client AccountsClient) listByResourceGroupNextResults(ctx context.Context, lastResults DataLakeStoreAccountListResult) (result DataLakeStoreAccountListResult, err error) {
+ req, err := lastResults.dataLakeStoreAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.AccountsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -667,6 +740,16 @@ func (client AccountsClient) listByResourceGroupNextResults(lastResults DataLake
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, top *int32, skip *int32, selectParameter string, orderby string, count *bool) (result DataLakeStoreAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, filter, top, skip, selectParameter, orderby, count)
return
}
@@ -677,6 +760,16 @@ func (client AccountsClient) ListByResourceGroupComplete(ctx context.Context, re
// accountName - the name of the Data Lake Store account.
// parameters - parameters supplied to update the Data Lake Store account.
func (client AccountsClient) Update(ctx context.Context, resourceGroupName string, accountName string, parameters UpdateDataLakeStoreAccountParameters) (result AccountsUpdateFutureType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AccountsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.AccountsClient", "Update", nil, "Failure preparing request")
@@ -724,10 +817,6 @@ func (client AccountsClient) UpdateSender(req *http.Request) (future AccountsUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
index 6ce16a323d8a..b082d1f9c568 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the firewall rule to create or update.
// parameters - parameters supplied to create or update the firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters CreateOrUpdateFirewallRuleParameters) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateFirewallRuleProperties", Name: validation.Null, Rule: true,
@@ -128,6 +139,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// accountName - the name of the Data Lake Store account.
// firewallRuleName - the name of the firewall rule to delete.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -196,6 +217,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// accountName - the name of the Data Lake Store account.
// firewallRuleName - the name of the firewall rule to retrieve.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -264,6 +295,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client FirewallRulesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.frlr.Response.Response != nil {
+ sc = result.frlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByAccountNextResults
req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
if err != nil {
@@ -328,8 +369,8 @@ func (client FirewallRulesClient) ListByAccountResponder(resp *http.Response) (r
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client FirewallRulesClient) listByAccountNextResults(lastResults FirewallRuleListResult) (result FirewallRuleListResult, err error) {
- req, err := lastResults.firewallRuleListResultPreparer()
+func (client FirewallRulesClient) listByAccountNextResults(ctx context.Context, lastResults FirewallRuleListResult) (result FirewallRuleListResult, err error) {
+ req, err := lastResults.firewallRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.FirewallRulesClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -350,6 +391,16 @@ func (client FirewallRulesClient) listByAccountNextResults(lastResults FirewallR
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client FirewallRulesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result FirewallRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName)
return
}
@@ -361,6 +412,16 @@ func (client FirewallRulesClient) ListByAccountComplete(ctx context.Context, res
// firewallRuleName - the name of the firewall rule to update.
// parameters - parameters supplied to update the firewall rule.
func (client FirewallRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, firewallRuleName string, parameters *UpdateFirewallRuleParameters) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, firewallRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.FirewallRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/locations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/locations.go
index 217126cda770..c46c1179b14d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/locations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/locations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string) Locati
// Parameters:
// location - the resource location without whitespace.
func (client LocationsClient) GetCapability(ctx context.Context, location string) (result CapabilityInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.GetCapability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCapabilityPreparer(ctx, location)
if err != nil {
err = autorest.NewErrorWithError(err, "account.LocationsClient", "GetCapability", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
index 17ffe424ce4d..36f61affa143 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/models.go
@@ -18,15 +18,20 @@ package account
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account"
+
// DataLakeStoreAccountState enumerates the values for data lake store account state.
type DataLakeStoreAccountState string
@@ -228,7 +233,8 @@ func PossibleTrustedIDProviderStateValues() []TrustedIDProviderState {
return []TrustedIDProviderState{TrustedIDProviderStateDisabled, TrustedIDProviderStateEnabled}
}
-// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsCreateFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsCreateFutureType struct {
azure.Future
}
@@ -256,7 +262,8 @@ func (future *AccountsCreateFutureType) Result(client AccountsClient) (dlsa Data
return
}
-// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsDeleteFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsDeleteFutureType struct {
azure.Future
}
@@ -278,7 +285,8 @@ func (future *AccountsDeleteFutureType) Result(client AccountsClient) (ar autore
return
}
-// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running operation.
+// AccountsUpdateFutureType an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AccountsUpdateFutureType struct {
azure.Future
}
@@ -434,8 +442,8 @@ type CreateDataLakeStoreAccountProperties struct {
NewTier TierType `json:"newTier,omitempty"`
}
-// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating a new
-// Data Lake Store account.
+// CreateFirewallRuleWithAccountParameters the parameters used to create a new firewall rule while creating
+// a new Data Lake Store account.
type CreateFirewallRuleWithAccountParameters struct {
// Name - The unique name of the firewall rule to create.
Name *string `json:"name,omitempty"`
@@ -527,7 +535,8 @@ func (coufrp *CreateOrUpdateFirewallRuleParameters) UnmarshalJSON(body []byte) e
return nil
}
-// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall rule.
+// CreateOrUpdateFirewallRuleProperties the firewall rule properties to use when creating a new firewall
+// rule.
type CreateOrUpdateFirewallRuleProperties struct {
// StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
StartIPAddress *string `json:"startIpAddress,omitempty"`
@@ -574,8 +583,8 @@ func (coutipp *CreateOrUpdateTrustedIDProviderParameters) UnmarshalJSON(body []b
return nil
}
-// CreateOrUpdateTrustedIDProviderProperties the trusted identity provider properties to use when creating a new
-// trusted identity provider.
+// CreateOrUpdateTrustedIDProviderProperties the trusted identity provider properties to use when creating
+// a new trusted identity provider.
type CreateOrUpdateTrustedIDProviderProperties struct {
// IDProvider - The URL of this trusted identity provider.
IDProvider *string `json:"idProvider,omitempty"`
@@ -620,15 +629,15 @@ func (couvnrp *CreateOrUpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []
return nil
}
-// CreateOrUpdateVirtualNetworkRuleProperties the virtual network rule properties to use when creating a new
-// virtual network rule.
+// CreateOrUpdateVirtualNetworkRuleProperties the virtual network rule properties to use when creating a
+// new virtual network rule.
type CreateOrUpdateVirtualNetworkRuleProperties struct {
// SubnetID - The resource identifier for the subnet.
SubnetID *string `json:"subnetId,omitempty"`
}
-// CreateTrustedIDProviderWithAccountParameters the parameters used to create a new trusted identity provider while
-// creating a new Data Lake Store account.
+// CreateTrustedIDProviderWithAccountParameters the parameters used to create a new trusted identity
+// provider while creating a new Data Lake Store account.
type CreateTrustedIDProviderWithAccountParameters struct {
// Name - The unique name of the trusted identity provider to create.
Name *string `json:"name,omitempty"`
@@ -681,8 +690,8 @@ func (ctipwap *CreateTrustedIDProviderWithAccountParameters) UnmarshalJSON(body
return nil
}
-// CreateVirtualNetworkRuleWithAccountParameters the parameters used to create a new virtual network rule while
-// creating a new Data Lake Store account.
+// CreateVirtualNetworkRuleWithAccountParameters the parameters used to create a new virtual network rule
+// while creating a new Data Lake Store account.
type CreateVirtualNetworkRuleWithAccountParameters struct {
// Name - The unique name of the virtual network rule to create.
Name *string `json:"name,omitempty"`
@@ -977,21 +986,31 @@ type DataLakeStoreAccountListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// DataLakeStoreAccountListResultIterator provides access to a complete listing of DataLakeStoreAccountBasic
-// values.
+// DataLakeStoreAccountListResultIterator provides access to a complete listing of
+// DataLakeStoreAccountBasic values.
type DataLakeStoreAccountListResultIterator struct {
i int
page DataLakeStoreAccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DataLakeStoreAccountListResultIterator) Next() error {
+func (iter *DataLakeStoreAccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1000,6 +1019,13 @@ func (iter *DataLakeStoreAccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DataLakeStoreAccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DataLakeStoreAccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1019,6 +1045,11 @@ func (iter DataLakeStoreAccountListResultIterator) Value() DataLakeStoreAccountB
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DataLakeStoreAccountListResultIterator type.
+func NewDataLakeStoreAccountListResultIterator(page DataLakeStoreAccountListResultPage) DataLakeStoreAccountListResultIterator {
+ return DataLakeStoreAccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dlsalr DataLakeStoreAccountListResult) IsEmpty() bool {
return dlsalr.Value == nil || len(*dlsalr.Value) == 0
@@ -1026,11 +1057,11 @@ func (dlsalr DataLakeStoreAccountListResult) IsEmpty() bool {
// dataLakeStoreAccountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dlsalr DataLakeStoreAccountListResult) dataLakeStoreAccountListResultPreparer() (*http.Request, error) {
+func (dlsalr DataLakeStoreAccountListResult) dataLakeStoreAccountListResultPreparer(ctx context.Context) (*http.Request, error) {
if dlsalr.NextLink == nil || len(to.String(dlsalr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dlsalr.NextLink)))
@@ -1038,14 +1069,24 @@ func (dlsalr DataLakeStoreAccountListResult) dataLakeStoreAccountListResultPrepa
// DataLakeStoreAccountListResultPage contains a page of DataLakeStoreAccountBasic values.
type DataLakeStoreAccountListResultPage struct {
- fn func(DataLakeStoreAccountListResult) (DataLakeStoreAccountListResult, error)
+ fn func(context.Context, DataLakeStoreAccountListResult) (DataLakeStoreAccountListResult, error)
dlsalr DataLakeStoreAccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DataLakeStoreAccountListResultPage) Next() error {
- next, err := page.fn(page.dlsalr)
+func (page *DataLakeStoreAccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataLakeStoreAccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dlsalr)
if err != nil {
return err
}
@@ -1053,6 +1094,13 @@ func (page *DataLakeStoreAccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DataLakeStoreAccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DataLakeStoreAccountListResultPage) NotDone() bool {
return !page.dlsalr.IsEmpty()
@@ -1071,6 +1119,11 @@ func (page DataLakeStoreAccountListResultPage) Values() []DataLakeStoreAccountBa
return *page.dlsalr.Value
}
+// Creates a new instance of the DataLakeStoreAccountListResultPage type.
+func NewDataLakeStoreAccountListResultPage(getNextPage func(context.Context, DataLakeStoreAccountListResult) (DataLakeStoreAccountListResult, error)) DataLakeStoreAccountListResultPage {
+ return DataLakeStoreAccountListResultPage{fn: getNextPage}
+}
+
// DataLakeStoreAccountProperties data Lake Store account properties information.
type DataLakeStoreAccountProperties struct {
// DefaultGroup - The default owner group for all new folders and files created in the Data Lake Store account.
@@ -1111,8 +1164,8 @@ type DataLakeStoreAccountProperties struct {
Endpoint *string `json:"endpoint,omitempty"`
}
-// DataLakeStoreAccountPropertiesBasic the basic account specific properties that are associated with an underlying
-// Data Lake Store account.
+// DataLakeStoreAccountPropertiesBasic the basic account specific properties that are associated with an
+// underlying Data Lake Store account.
type DataLakeStoreAccountPropertiesBasic struct {
// AccountID - The unique identifier associated with this Data Lake Store account.
AccountID *uuid.UUID `json:"accountId,omitempty"`
@@ -1243,14 +1296,24 @@ type FirewallRuleListResultIterator struct {
page FirewallRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *FirewallRuleListResultIterator) Next() error {
+func (iter *FirewallRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1259,6 +1322,13 @@ func (iter *FirewallRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *FirewallRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter FirewallRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1278,6 +1348,11 @@ func (iter FirewallRuleListResultIterator) Value() FirewallRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the FirewallRuleListResultIterator type.
+func NewFirewallRuleListResultIterator(page FirewallRuleListResultPage) FirewallRuleListResultIterator {
+ return FirewallRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (frlr FirewallRuleListResult) IsEmpty() bool {
return frlr.Value == nil || len(*frlr.Value) == 0
@@ -1285,11 +1360,11 @@ func (frlr FirewallRuleListResult) IsEmpty() bool {
// firewallRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (frlr FirewallRuleListResult) firewallRuleListResultPreparer() (*http.Request, error) {
+func (frlr FirewallRuleListResult) firewallRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if frlr.NextLink == nil || len(to.String(frlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(frlr.NextLink)))
@@ -1297,14 +1372,24 @@ func (frlr FirewallRuleListResult) firewallRuleListResultPreparer() (*http.Reque
// FirewallRuleListResultPage contains a page of FirewallRule values.
type FirewallRuleListResultPage struct {
- fn func(FirewallRuleListResult) (FirewallRuleListResult, error)
+ fn func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)
frlr FirewallRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *FirewallRuleListResultPage) Next() error {
- next, err := page.fn(page.frlr)
+func (page *FirewallRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.frlr)
if err != nil {
return err
}
@@ -1312,6 +1397,13 @@ func (page *FirewallRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *FirewallRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page FirewallRuleListResultPage) NotDone() bool {
return !page.frlr.IsEmpty()
@@ -1330,6 +1422,11 @@ func (page FirewallRuleListResultPage) Values() []FirewallRule {
return *page.frlr.Value
}
+// Creates a new instance of the FirewallRuleListResultPage type.
+func NewFirewallRuleListResultPage(getNextPage func(context.Context, FirewallRuleListResult) (FirewallRuleListResult, error)) FirewallRuleListResultPage {
+ return FirewallRuleListResultPage{fn: getNextPage}
+}
+
// FirewallRuleProperties the firewall rule properties.
type FirewallRuleProperties struct {
// StartIPAddress - The start IP address for the firewall rule. This can be either ipv4 or ipv6. Start and End should be in the same protocol.
@@ -1532,14 +1629,24 @@ type TrustedIDProviderListResultIterator struct {
page TrustedIDProviderListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TrustedIDProviderListResultIterator) Next() error {
+func (iter *TrustedIDProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProviderListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1548,6 +1655,13 @@ func (iter *TrustedIDProviderListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TrustedIDProviderListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TrustedIDProviderListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1567,6 +1681,11 @@ func (iter TrustedIDProviderListResultIterator) Value() TrustedIDProvider {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TrustedIDProviderListResultIterator type.
+func NewTrustedIDProviderListResultIterator(page TrustedIDProviderListResultPage) TrustedIDProviderListResultIterator {
+ return TrustedIDProviderListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (tiplr TrustedIDProviderListResult) IsEmpty() bool {
return tiplr.Value == nil || len(*tiplr.Value) == 0
@@ -1574,11 +1693,11 @@ func (tiplr TrustedIDProviderListResult) IsEmpty() bool {
// trustedIDProviderListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (tiplr TrustedIDProviderListResult) trustedIDProviderListResultPreparer() (*http.Request, error) {
+func (tiplr TrustedIDProviderListResult) trustedIDProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
if tiplr.NextLink == nil || len(to.String(tiplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(tiplr.NextLink)))
@@ -1586,14 +1705,24 @@ func (tiplr TrustedIDProviderListResult) trustedIDProviderListResultPreparer() (
// TrustedIDProviderListResultPage contains a page of TrustedIDProvider values.
type TrustedIDProviderListResultPage struct {
- fn func(TrustedIDProviderListResult) (TrustedIDProviderListResult, error)
+ fn func(context.Context, TrustedIDProviderListResult) (TrustedIDProviderListResult, error)
tiplr TrustedIDProviderListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TrustedIDProviderListResultPage) Next() error {
- next, err := page.fn(page.tiplr)
+func (page *TrustedIDProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProviderListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tiplr)
if err != nil {
return err
}
@@ -1601,6 +1730,13 @@ func (page *TrustedIDProviderListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TrustedIDProviderListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TrustedIDProviderListResultPage) NotDone() bool {
return !page.tiplr.IsEmpty()
@@ -1619,6 +1755,11 @@ func (page TrustedIDProviderListResultPage) Values() []TrustedIDProvider {
return *page.tiplr.Value
}
+// Creates a new instance of the TrustedIDProviderListResultPage type.
+func NewTrustedIDProviderListResultPage(getNextPage func(context.Context, TrustedIDProviderListResult) (TrustedIDProviderListResult, error)) TrustedIDProviderListResultPage {
+ return TrustedIDProviderListResultPage{fn: getNextPage}
+}
+
// TrustedIDProviderProperties the trusted identity provider properties.
type TrustedIDProviderProperties struct {
// IDProvider - The URL of this trusted identity provider.
@@ -1753,8 +1894,8 @@ type UpdateFirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a Data Lake
-// Store account.
+// UpdateFirewallRuleWithAccountParameters the parameters used to update a firewall rule while updating a
+// Data Lake Store account.
type UpdateFirewallRuleWithAccountParameters struct {
// Name - The unique name of the firewall rule to update.
Name *string `json:"name,omitempty"`
@@ -1852,15 +1993,15 @@ func (utipp *UpdateTrustedIDProviderParameters) UnmarshalJSON(body []byte) error
return nil
}
-// UpdateTrustedIDProviderProperties the trusted identity provider properties to use when updating a trusted
-// identity provider.
+// UpdateTrustedIDProviderProperties the trusted identity provider properties to use when updating a
+// trusted identity provider.
type UpdateTrustedIDProviderProperties struct {
// IDProvider - The URL of this trusted identity provider.
IDProvider *string `json:"idProvider,omitempty"`
}
-// UpdateTrustedIDProviderWithAccountParameters the parameters used to update a trusted identity provider while
-// updating a Data Lake Store account.
+// UpdateTrustedIDProviderWithAccountParameters the parameters used to update a trusted identity provider
+// while updating a Data Lake Store account.
type UpdateTrustedIDProviderWithAccountParameters struct {
// Name - The unique name of the trusted identity provider to update.
Name *string `json:"name,omitempty"`
@@ -1952,8 +2093,8 @@ func (uvnrp *UpdateVirtualNetworkRuleParameters) UnmarshalJSON(body []byte) erro
return nil
}
-// UpdateVirtualNetworkRuleProperties the virtual network rule properties to use when updating a virtual network
-// rule.
+// UpdateVirtualNetworkRuleProperties the virtual network rule properties to use when updating a virtual
+// network rule.
type UpdateVirtualNetworkRuleProperties struct {
// SubnetID - The resource identifier for the subnet.
SubnetID *string `json:"subnetId,omitempty"`
@@ -2110,14 +2251,24 @@ type VirtualNetworkRuleListResultIterator struct {
page VirtualNetworkRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2126,6 +2277,13 @@ func (iter *VirtualNetworkRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2145,6 +2303,11 @@ func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkRuleListResultIterator type.
+func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator {
+ return VirtualNetworkRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
return vnrlr.Value == nil || len(*vnrlr.Value) == 0
@@ -2152,11 +2315,11 @@ func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnrlr.NextLink)))
@@ -2164,14 +2327,24 @@ func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer()
// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
type VirtualNetworkRuleListResultPage struct {
- fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
vnrlr VirtualNetworkRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkRuleListResultPage) Next() error {
- next, err := page.fn(page.vnrlr)
+func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnrlr)
if err != nil {
return err
}
@@ -2179,6 +2352,13 @@ func (page *VirtualNetworkRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkRuleListResultPage) NotDone() bool {
return !page.vnrlr.IsEmpty()
@@ -2197,6 +2377,11 @@ func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
return *page.vnrlr.Value
}
+// Creates a new instance of the VirtualNetworkRuleListResultPage type.
+func NewVirtualNetworkRuleListResultPage(getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage {
+ return VirtualNetworkRuleListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkRuleProperties the virtual network rule properties.
type VirtualNetworkRuleProperties struct {
// SubnetID - The resource identifier for the subnet.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/operations.go
index 569e7554aca5..00da7e5fe683 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Data Lake Store REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "account.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go
index 01f92849a62b..b2b602712cfe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/trustedidproviders.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewTrustedIDProvidersClientWithBaseURI(baseURI string, subscriptionID strin
// providers in the account.
// parameters - parameters supplied to create or replace the trusted identity provider.
func (client TrustedIDProvidersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, parameters CreateOrUpdateTrustedIDProviderParameters) (result TrustedIDProvider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateTrustedIDProviderProperties", Name: validation.Null, Rule: true,
@@ -127,6 +138,16 @@ func (client TrustedIDProvidersClient) CreateOrUpdateResponder(resp *http.Respon
// accountName - the name of the Data Lake Store account.
// trustedIDProviderName - the name of the trusted identity provider to delete.
func (client TrustedIDProvidersClient) Delete(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, trustedIDProviderName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.TrustedIDProvidersClient", "Delete", nil, "Failure preparing request")
@@ -195,6 +216,16 @@ func (client TrustedIDProvidersClient) DeleteResponder(resp *http.Response) (res
// accountName - the name of the Data Lake Store account.
// trustedIDProviderName - the name of the trusted identity provider to retrieve.
func (client TrustedIDProvidersClient) Get(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string) (result TrustedIDProvider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, trustedIDProviderName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.TrustedIDProvidersClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client TrustedIDProvidersClient) GetResponder(resp *http.Response) (result
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client TrustedIDProvidersClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result TrustedIDProviderListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.tiplr.Response.Response != nil {
+ sc = result.tiplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByAccountNextResults
req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
if err != nil {
@@ -327,8 +368,8 @@ func (client TrustedIDProvidersClient) ListByAccountResponder(resp *http.Respons
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client TrustedIDProvidersClient) listByAccountNextResults(lastResults TrustedIDProviderListResult) (result TrustedIDProviderListResult, err error) {
- req, err := lastResults.trustedIDProviderListResultPreparer()
+func (client TrustedIDProvidersClient) listByAccountNextResults(ctx context.Context, lastResults TrustedIDProviderListResult) (result TrustedIDProviderListResult, err error) {
+ req, err := lastResults.trustedIDProviderListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.TrustedIDProvidersClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -349,6 +390,16 @@ func (client TrustedIDProvidersClient) listByAccountNextResults(lastResults Trus
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client TrustedIDProvidersClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result TrustedIDProviderListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName)
return
}
@@ -361,6 +412,16 @@ func (client TrustedIDProvidersClient) ListByAccountComplete(ctx context.Context
// providers in the account.
// parameters - parameters supplied to update the trusted identity provider.
func (client TrustedIDProvidersClient) Update(ctx context.Context, resourceGroupName string, accountName string, trustedIDProviderName string, parameters *UpdateTrustedIDProviderParameters) (result TrustedIDProvider, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TrustedIDProvidersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, trustedIDProviderName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.TrustedIDProvidersClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go
index d44ef296b9d6..1055a93eb803 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/datalake/store/mgmt/2016-11-01/account/virtualnetworkrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID stri
// virtualNetworkRuleName - the name of the virtual network rule to create or update.
// parameters - parameters supplied to create or update the virtual network rule.
func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters CreateOrUpdateVirtualNetworkRuleParameters) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.CreateOrUpdateVirtualNetworkRuleProperties", Name: validation.Null, Rule: true,
@@ -126,6 +137,16 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Respo
// accountName - the name of the Data Lake Store account.
// virtualNetworkRuleName - the name of the virtual network rule to delete.
func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
@@ -194,6 +215,16 @@ func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (re
// accountName - the name of the Data Lake Store account.
// virtualNetworkRuleName - the name of the virtual network rule to retrieve.
func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (resul
// resourceGroupName - the name of the Azure resource group.
// accountName - the name of the Data Lake Store account.
func (client VirtualNetworkRulesClient) ListByAccount(ctx context.Context, resourceGroupName string, accountName string) (result VirtualNetworkRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByAccount")
+ defer func() {
+ sc := -1
+ if result.vnrlr.Response.Response != nil {
+ sc = result.vnrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByAccountNextResults
req, err := client.ListByAccountPreparer(ctx, resourceGroupName, accountName)
if err != nil {
@@ -326,8 +367,8 @@ func (client VirtualNetworkRulesClient) ListByAccountResponder(resp *http.Respon
}
// listByAccountNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkRulesClient) listByAccountNextResults(lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
- req, err := lastResults.virtualNetworkRuleListResultPreparer()
+func (client VirtualNetworkRulesClient) listByAccountNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
+ req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "listByAccountNextResults", nil, "Failure preparing next results request")
}
@@ -348,6 +389,16 @@ func (client VirtualNetworkRulesClient) listByAccountNextResults(lastResults Vir
// ListByAccountComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkRulesClient) ListByAccountComplete(ctx context.Context, resourceGroupName string, accountName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByAccount")
+ 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.ListByAccount(ctx, resourceGroupName, accountName)
return
}
@@ -359,6 +410,16 @@ func (client VirtualNetworkRulesClient) ListByAccountComplete(ctx context.Contex
// virtualNetworkRuleName - the name of the virtual network rule to update.
// parameters - parameters supplied to update the virtual network rule.
func (client VirtualNetworkRulesClient) Update(ctx context.Context, resourceGroupName string, accountName string, virtualNetworkRuleName string, parameters *UpdateVirtualNetworkRuleParameters) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, accountName, virtualNetworkRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "account.VirtualNetworkRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go
index 75643b1e8fa3..9dcf6ea7cce4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/armtemplates.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewArmTemplatesClientWithBaseURI(baseURI string, subscriptionID string) Arm
// name - the name of the azure Resource Manager template.
// expand - specify the $expand query. Example: 'properties($select=displayName)'
func (client ArmTemplatesClient) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result ArmTemplate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArmTemplatesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, artifactSourceName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArmTemplatesClient", "Get", nil, "Failure preparing request")
@@ -124,6 +135,16 @@ func (client ArmTemplatesClient) GetResponder(resp *http.Response) (result ArmTe
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client ArmTemplatesClient) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArmTemplatePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArmTemplatesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcat.Response.Response != nil {
+ sc = result.rwcat.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
if err != nil {
@@ -201,8 +222,8 @@ func (client ArmTemplatesClient) ListResponder(resp *http.Response) (result Resp
}
// listNextResults retrieves the next set of results, if any.
-func (client ArmTemplatesClient) listNextResults(lastResults ResponseWithContinuationArmTemplate) (result ResponseWithContinuationArmTemplate, err error) {
- req, err := lastResults.responseWithContinuationArmTemplatePreparer()
+func (client ArmTemplatesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationArmTemplate) (result ResponseWithContinuationArmTemplate, err error) {
+ req, err := lastResults.responseWithContinuationArmTemplatePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.ArmTemplatesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -223,6 +244,16 @@ func (client ArmTemplatesClient) listNextResults(lastResults ResponseWithContinu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ArmTemplatesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArmTemplateIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArmTemplatesClient.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, resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go
index 6d8451d45e08..73cc6be04270 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifacts.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewArtifactsClientWithBaseURI(baseURI string, subscriptionID string) Artifa
// name - the name of the artifact.
// generateArmTemplateRequest - parameters for generating an ARM template for deploying artifacts.
func (client ArtifactsClient) GenerateArmTemplate(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, generateArmTemplateRequest GenerateArmTemplateRequest) (result ArmTemplateInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.GenerateArmTemplate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GenerateArmTemplatePreparer(ctx, resourceGroupName, labName, artifactSourceName, name, generateArmTemplateRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArtifactsClient", "GenerateArmTemplate", nil, "Failure preparing request")
@@ -122,6 +133,16 @@ func (client ArtifactsClient) GenerateArmTemplateResponder(resp *http.Response)
// name - the name of the artifact.
// expand - specify the $expand query. Example: 'properties($select=title)'
func (client ArtifactsClient) Get(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, name string, expand string) (result Artifact, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, artifactSourceName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArtifactsClient", "Get", nil, "Failure preparing request")
@@ -199,6 +220,16 @@ func (client ArtifactsClient) GetResponder(resp *http.Response) (result Artifact
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client ArtifactsClient) List(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.List")
+ defer func() {
+ sc := -1
+ if result.rwca.Response.Response != nil {
+ sc = result.rwca.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
if err != nil {
@@ -276,8 +307,8 @@ func (client ArtifactsClient) ListResponder(resp *http.Response) (result Respons
}
// listNextResults retrieves the next set of results, if any.
-func (client ArtifactsClient) listNextResults(lastResults ResponseWithContinuationArtifact) (result ResponseWithContinuationArtifact, err error) {
- req, err := lastResults.responseWithContinuationArtifactPreparer()
+func (client ArtifactsClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationArtifact) (result ResponseWithContinuationArtifact, err error) {
+ req, err := lastResults.responseWithContinuationArtifactPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.ArtifactsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -298,6 +329,16 @@ func (client ArtifactsClient) listNextResults(lastResults ResponseWithContinuati
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ArtifactsClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, artifactSourceName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactsClient.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, resourceGroupName, labName, artifactSourceName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go
index 609bb72b3a0c..1da6557483ae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/artifactsources.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewArtifactSourcesClientWithBaseURI(baseURI string, subscriptionID string)
// name - the name of the artifact source.
// artifactSource - properties of an artifact source.
func (client ArtifactSourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource ArtifactSource) (result ArtifactSource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.CreateOrUpdate")
+ 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: artifactSource,
Constraints: []validation.Constraint{{Target: "artifactSource.ArtifactSourceProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -124,6 +135,16 @@ func (client ArtifactSourcesClient) CreateOrUpdateResponder(resp *http.Response)
// labName - the name of the lab.
// name - the name of the artifact source.
func (client ArtifactSourcesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArtifactSourcesClient", "Delete", nil, "Failure preparing request")
@@ -193,6 +214,16 @@ func (client ArtifactSourcesClient) DeleteResponder(resp *http.Response) (result
// name - the name of the artifact source.
// expand - specify the $expand query. Example: 'properties($select=displayName)'
func (client ArtifactSourcesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result ArtifactSource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArtifactSourcesClient", "Get", nil, "Failure preparing request")
@@ -268,6 +299,16 @@ func (client ArtifactSourcesClient) GetResponder(resp *http.Response) (result Ar
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client ArtifactSourcesClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactSourcePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcas.Response.Response != nil {
+ sc = result.rwcas.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -344,8 +385,8 @@ func (client ArtifactSourcesClient) ListResponder(resp *http.Response) (result R
}
// listNextResults retrieves the next set of results, if any.
-func (client ArtifactSourcesClient) listNextResults(lastResults ResponseWithContinuationArtifactSource) (result ResponseWithContinuationArtifactSource, err error) {
- req, err := lastResults.responseWithContinuationArtifactSourcePreparer()
+func (client ArtifactSourcesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationArtifactSource) (result ResponseWithContinuationArtifactSource, err error) {
+ req, err := lastResults.responseWithContinuationArtifactSourcePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.ArtifactSourcesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -366,6 +407,16 @@ func (client ArtifactSourcesClient) listNextResults(lastResults ResponseWithCont
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ArtifactSourcesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationArtifactSourceIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -377,6 +428,16 @@ func (client ArtifactSourcesClient) ListComplete(ctx context.Context, resourceGr
// name - the name of the artifact source.
// artifactSource - properties of an artifact source.
func (client ArtifactSourcesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, artifactSource ArtifactSourceFragment) (result ArtifactSource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArtifactSourcesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, artifactSource)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ArtifactSourcesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go
index dec29625150b..a2cf02ae9a33 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/costs.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewCostsClientWithBaseURI(baseURI string, subscriptionID string) CostsClien
// name - the name of the cost.
// labCost - a cost item.
func (client CostsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, labCost LabCost) (result LabCost, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CostsClient.CreateOrUpdate")
+ 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: labCost,
Constraints: []validation.Constraint{{Target: "labCost.LabCostProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -125,6 +136,16 @@ func (client CostsClient) CreateOrUpdateResponder(resp *http.Response) (result L
// name - the name of the cost.
// expand - specify the $expand query. Example: 'properties($expand=labCostDetails)'
func (client CostsClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result LabCost, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CostsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.CostsClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
index 7c2c9007a45d..ccc3771aeefa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/customimages.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewCustomImagesClientWithBaseURI(baseURI string, subscriptionID string) Cus
// name - the name of the custom image.
// customImage - a custom image.
func (client CustomImagesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, customImage CustomImage) (result CustomImagesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomImagesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: customImage,
Constraints: []validation.Constraint{{Target: "customImage.CustomImageProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -101,10 +112,6 @@ func (client CustomImagesClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -128,6 +135,16 @@ func (client CustomImagesClient) CreateOrUpdateResponder(resp *http.Response) (r
// labName - the name of the lab.
// name - the name of the custom image.
func (client CustomImagesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result CustomImagesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomImagesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.CustomImagesClient", "Delete", nil, "Failure preparing request")
@@ -174,10 +191,6 @@ func (client CustomImagesClient) DeleteSender(req *http.Request) (future CustomI
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -201,6 +214,16 @@ func (client CustomImagesClient) DeleteResponder(resp *http.Response) (result au
// name - the name of the custom image.
// expand - specify the $expand query. Example: 'properties($select=vm)'
func (client CustomImagesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result CustomImage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomImagesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.CustomImagesClient", "Get", nil, "Failure preparing request")
@@ -276,6 +299,16 @@ func (client CustomImagesClient) GetResponder(resp *http.Response) (result Custo
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client CustomImagesClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationCustomImagePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcci.Response.Response != nil {
+ sc = result.rwcci.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -352,8 +385,8 @@ func (client CustomImagesClient) ListResponder(resp *http.Response) (result Resp
}
// listNextResults retrieves the next set of results, if any.
-func (client CustomImagesClient) listNextResults(lastResults ResponseWithContinuationCustomImage) (result ResponseWithContinuationCustomImage, err error) {
- req, err := lastResults.responseWithContinuationCustomImagePreparer()
+func (client CustomImagesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationCustomImage) (result ResponseWithContinuationCustomImage, err error) {
+ req, err := lastResults.responseWithContinuationCustomImagePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.CustomImagesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -374,6 +407,16 @@ func (client CustomImagesClient) listNextResults(lastResults ResponseWithContinu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client CustomImagesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationCustomImageIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CustomImagesClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
index 5792fc4b5eb1..20ce44e0a9b2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/disks.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewDisksClientWithBaseURI(baseURI string, subscriptionID string) DisksClien
// name - the name of the disk.
// attachDiskProperties - properties of the disk to attach.
func (client DisksClient) Attach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, attachDiskProperties AttachDiskProperties) (result DisksAttachFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Attach")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.AttachPreparer(ctx, resourceGroupName, labName, userName, name, attachDiskProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.DisksClient", "Attach", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client DisksClient) AttachSender(req *http.Request) (future DisksAttachFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client DisksClient) AttachResponder(resp *http.Response) (result autorest.
// name - the name of the disk.
// disk - a Disk.
func (client DisksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, disk Disk) (result DisksCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: disk,
Constraints: []validation.Constraint{{Target: "disk.DiskProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -180,10 +197,6 @@ func (client DisksClient) CreateOrUpdateSender(req *http.Request) (future DisksC
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -208,6 +221,16 @@ func (client DisksClient) CreateOrUpdateResponder(resp *http.Response) (result D
// userName - the name of the user profile.
// name - the name of the disk.
func (client DisksClient) Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result DisksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, userName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.DisksClient", "Delete", nil, "Failure preparing request")
@@ -255,10 +278,6 @@ func (client DisksClient) DeleteSender(req *http.Request) (future DisksDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -284,6 +303,16 @@ func (client DisksClient) DeleteResponder(resp *http.Response) (result autorest.
// name - the name of the disk.
// detachDiskProperties - properties of the disk to detach.
func (client DisksClient) Detach(ctx context.Context, resourceGroupName string, labName string, userName string, name string, detachDiskProperties DetachDiskProperties) (result DisksDetachFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Detach")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DetachPreparer(ctx, resourceGroupName, labName, userName, name, detachDiskProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.DisksClient", "Detach", nil, "Failure preparing request")
@@ -333,10 +362,6 @@ func (client DisksClient) DetachSender(req *http.Request) (future DisksDetachFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -361,6 +386,16 @@ func (client DisksClient) DetachResponder(resp *http.Response) (result autorest.
// name - the name of the disk.
// expand - specify the $expand query. Example: 'properties($select=diskType)'
func (client DisksClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result Disk, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, userName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.DisksClient", "Get", nil, "Failure preparing request")
@@ -438,6 +473,16 @@ func (client DisksClient) GetResponder(resp *http.Response) (result Disk, err er
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client DisksClient) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDiskPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcd.Response.Response != nil {
+ sc = result.rwcd.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -515,8 +560,8 @@ func (client DisksClient) ListResponder(resp *http.Response) (result ResponseWit
}
// listNextResults retrieves the next set of results, if any.
-func (client DisksClient) listNextResults(lastResults ResponseWithContinuationDisk) (result ResponseWithContinuationDisk, err error) {
- req, err := lastResults.responseWithContinuationDiskPreparer()
+func (client DisksClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationDisk) (result ResponseWithContinuationDisk, err error) {
+ req, err := lastResults.responseWithContinuationDiskPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.DisksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -537,6 +582,16 @@ func (client DisksClient) listNextResults(lastResults ResponseWithContinuationDi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DisksClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDiskIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisksClient.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, resourceGroupName, labName, userName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
index 6e1e06ed2947..02358ac20807 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/environments.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewEnvironmentsClientWithBaseURI(baseURI string, subscriptionID string) Env
// name - the name of the environment.
// dtlEnvironment - an environment, which is essentially an ARM template deployment.
func (client EnvironmentsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, dtlEnvironment Environment) (result EnvironmentsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: dtlEnvironment,
Constraints: []validation.Constraint{{Target: "dtlEnvironment.EnvironmentProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -103,10 +114,6 @@ func (client EnvironmentsClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -131,6 +138,16 @@ func (client EnvironmentsClient) CreateOrUpdateResponder(resp *http.Response) (r
// userName - the name of the user profile.
// name - the name of the environment.
func (client EnvironmentsClient) Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result EnvironmentsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, userName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.EnvironmentsClient", "Delete", nil, "Failure preparing request")
@@ -178,10 +195,6 @@ func (client EnvironmentsClient) DeleteSender(req *http.Request) (future Environ
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -206,6 +219,16 @@ func (client EnvironmentsClient) DeleteResponder(resp *http.Response) (result au
// name - the name of the environment.
// expand - specify the $expand query. Example: 'properties($select=deploymentProperties)'
func (client EnvironmentsClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result Environment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, userName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.EnvironmentsClient", "Get", nil, "Failure preparing request")
@@ -283,6 +306,16 @@ func (client EnvironmentsClient) GetResponder(resp *http.Response) (result Envir
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client EnvironmentsClient) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDtlEnvironmentPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcde.Response.Response != nil {
+ sc = result.rwcde.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -360,8 +393,8 @@ func (client EnvironmentsClient) ListResponder(resp *http.Response) (result Resp
}
// listNextResults retrieves the next set of results, if any.
-func (client EnvironmentsClient) listNextResults(lastResults ResponseWithContinuationDtlEnvironment) (result ResponseWithContinuationDtlEnvironment, err error) {
- req, err := lastResults.responseWithContinuationDtlEnvironmentPreparer()
+func (client EnvironmentsClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationDtlEnvironment) (result ResponseWithContinuationDtlEnvironment, err error) {
+ req, err := lastResults.responseWithContinuationDtlEnvironmentPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.EnvironmentsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -382,6 +415,16 @@ func (client EnvironmentsClient) listNextResults(lastResults ResponseWithContinu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client EnvironmentsClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationDtlEnvironmentIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EnvironmentsClient.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, resourceGroupName, labName, userName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
index 0bc96e0f7fdf..2c4ca8e7c50b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/formulas.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewFormulasClientWithBaseURI(baseURI string, subscriptionID string) Formula
// name - the name of the formula.
// formula - a formula for creating a VM, specifying an image base and other parameters
func (client FormulasClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, formula Formula) (result FormulasCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FormulasClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: formula,
Constraints: []validation.Constraint{{Target: "formula.FormulaProperties", Name: validation.Null, Rule: true,
@@ -114,10 +125,6 @@ func (client FormulasClient) CreateOrUpdateSender(req *http.Request) (future For
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -141,6 +148,16 @@ func (client FormulasClient) CreateOrUpdateResponder(resp *http.Response) (resul
// labName - the name of the lab.
// name - the name of the formula.
func (client FormulasClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FormulasClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.FormulasClient", "Delete", nil, "Failure preparing request")
@@ -210,6 +227,16 @@ func (client FormulasClient) DeleteResponder(resp *http.Response) (result autore
// name - the name of the formula.
// expand - specify the $expand query. Example: 'properties($select=description)'
func (client FormulasClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result Formula, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FormulasClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.FormulasClient", "Get", nil, "Failure preparing request")
@@ -285,6 +312,16 @@ func (client FormulasClient) GetResponder(resp *http.Response) (result Formula,
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client FormulasClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationFormulaPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FormulasClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcf.Response.Response != nil {
+ sc = result.rwcf.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -361,8 +398,8 @@ func (client FormulasClient) ListResponder(resp *http.Response) (result Response
}
// listNextResults retrieves the next set of results, if any.
-func (client FormulasClient) listNextResults(lastResults ResponseWithContinuationFormula) (result ResponseWithContinuationFormula, err error) {
- req, err := lastResults.responseWithContinuationFormulaPreparer()
+func (client FormulasClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationFormula) (result ResponseWithContinuationFormula, err error) {
+ req, err := lastResults.responseWithContinuationFormulaPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.FormulasClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -383,6 +420,16 @@ func (client FormulasClient) listNextResults(lastResults ResponseWithContinuatio
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client FormulasClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationFormulaIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FormulasClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go
index 6741399c9ed3..e5725e639800 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/galleryimages.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewGalleryImagesClientWithBaseURI(baseURI string, subscriptionID string) Ga
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client GalleryImagesClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationGalleryImagePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcgi.Response.Response != nil {
+ sc = result.rwcgi.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -124,8 +135,8 @@ func (client GalleryImagesClient) ListResponder(resp *http.Response) (result Res
}
// listNextResults retrieves the next set of results, if any.
-func (client GalleryImagesClient) listNextResults(lastResults ResponseWithContinuationGalleryImage) (result ResponseWithContinuationGalleryImage, err error) {
- req, err := lastResults.responseWithContinuationGalleryImagePreparer()
+func (client GalleryImagesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationGalleryImage) (result ResponseWithContinuationGalleryImage, err error) {
+ req, err := lastResults.responseWithContinuationGalleryImagePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.GalleryImagesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -146,6 +157,16 @@ func (client GalleryImagesClient) listNextResults(lastResults ResponseWithContin
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client GalleryImagesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationGalleryImageIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GalleryImagesClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
index cbb18431b4cb..1506ac2fee89 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/globalschedules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewGlobalSchedulesClientWithBaseURI(baseURI string, subscriptionID string)
// name - the name of the schedule.
// schedule - a schedule.
func (client GlobalSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, schedule Schedule) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.CreateOrUpdate")
+ 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: schedule,
Constraints: []validation.Constraint{{Target: "schedule.ScheduleProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -121,6 +132,16 @@ func (client GlobalSchedulesClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// name - the name of the schedule.
func (client GlobalSchedulesClient) Delete(ctx context.Context, resourceGroupName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "Delete", nil, "Failure preparing request")
@@ -187,6 +208,16 @@ func (client GlobalSchedulesClient) DeleteResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// name - the name of the schedule.
func (client GlobalSchedulesClient) Execute(ctx context.Context, resourceGroupName string, name string) (result GlobalSchedulesExecuteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.Execute")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ExecutePreparer(ctx, resourceGroupName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "Execute", nil, "Failure preparing request")
@@ -232,10 +263,6 @@ func (client GlobalSchedulesClient) ExecuteSender(req *http.Request) (future Glo
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -258,6 +285,16 @@ func (client GlobalSchedulesClient) ExecuteResponder(resp *http.Response) (resul
// name - the name of the schedule.
// expand - specify the $expand query. Example: 'properties($select=status)'
func (client GlobalSchedulesClient) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "Get", nil, "Failure preparing request")
@@ -331,6 +368,16 @@ func (client GlobalSchedulesClient) GetResponder(resp *http.Response) (result Sc
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client GlobalSchedulesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedulePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand, filter, top, orderby)
if err != nil {
@@ -406,8 +453,8 @@ func (client GlobalSchedulesClient) ListByResourceGroupResponder(resp *http.Resp
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client GlobalSchedulesClient) listByResourceGroupNextResults(lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
- req, err := lastResults.responseWithContinuationSchedulePreparer()
+func (client GlobalSchedulesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
+ req, err := lastResults.responseWithContinuationSchedulePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -428,6 +475,16 @@ func (client GlobalSchedulesClient) listByResourceGroupNextResults(lastResults R
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client GlobalSchedulesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationScheduleIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, expand, filter, top, orderby)
return
}
@@ -439,6 +496,16 @@ func (client GlobalSchedulesClient) ListByResourceGroupComplete(ctx context.Cont
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client GlobalSchedulesClient) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedulePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx, expand, filter, top, orderby)
if err != nil {
@@ -513,8 +580,8 @@ func (client GlobalSchedulesClient) ListBySubscriptionResponder(resp *http.Respo
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client GlobalSchedulesClient) listBySubscriptionNextResults(lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
- req, err := lastResults.responseWithContinuationSchedulePreparer()
+func (client GlobalSchedulesClient) listBySubscriptionNextResults(ctx context.Context, lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
+ req, err := lastResults.responseWithContinuationSchedulePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -535,6 +602,16 @@ func (client GlobalSchedulesClient) listBySubscriptionNextResults(lastResults Re
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client GlobalSchedulesClient) ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationScheduleIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.ListBySubscription")
+ 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.ListBySubscription(ctx, expand, filter, top, orderby)
return
}
@@ -545,6 +622,16 @@ func (client GlobalSchedulesClient) ListBySubscriptionComplete(ctx context.Conte
// name - the name of the schedule.
// retargetScheduleProperties - properties for retargeting a virtual machine schedule.
func (client GlobalSchedulesClient) Retarget(ctx context.Context, resourceGroupName string, name string, retargetScheduleProperties RetargetScheduleProperties) (result GlobalSchedulesRetargetFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.Retarget")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RetargetPreparer(ctx, resourceGroupName, name, retargetScheduleProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "Retarget", nil, "Failure preparing request")
@@ -592,10 +679,6 @@ func (client GlobalSchedulesClient) RetargetSender(req *http.Request) (future Gl
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -618,6 +701,16 @@ func (client GlobalSchedulesClient) RetargetResponder(resp *http.Response) (resu
// name - the name of the schedule.
// schedule - a schedule.
func (client GlobalSchedulesClient) Update(ctx context.Context, resourceGroupName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GlobalSchedulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, name, schedule)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.GlobalSchedulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
index 11f27dc90df9..35d8db45f29a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/labs.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLabsClientWithBaseURI(baseURI string, subscriptionID string) LabsClient
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) ClaimAnyVM(ctx context.Context, resourceGroupName string, name string) (result LabsClaimAnyVMFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ClaimAnyVM")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ClaimAnyVMPreparer(ctx, resourceGroupName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ClaimAnyVM", nil, "Failure preparing request")
@@ -90,10 +101,6 @@ func (client LabsClient) ClaimAnyVMSender(req *http.Request) (future LabsClaimAn
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -116,6 +123,16 @@ func (client LabsClient) ClaimAnyVMResponder(resp *http.Response) (result autore
// name - the name of the lab.
// labVirtualMachineCreationParameter - properties for creating a virtual machine.
func (client LabsClient) CreateEnvironment(ctx context.Context, resourceGroupName string, name string, labVirtualMachineCreationParameter LabVirtualMachineCreationParameter) (result LabsCreateEnvironmentFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.CreateEnvironment")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: labVirtualMachineCreationParameter,
Constraints: []validation.Constraint{{Target: "labVirtualMachineCreationParameter.LabVirtualMachineCreationParameterProperties", Name: validation.Null, Rule: false,
@@ -178,10 +195,6 @@ func (client LabsClient) CreateEnvironmentSender(req *http.Request) (future Labs
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -204,6 +217,16 @@ func (client LabsClient) CreateEnvironmentResponder(resp *http.Response) (result
// name - the name of the lab.
// lab - a lab.
func (client LabsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, name string, lab Lab) (result LabsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, name, lab)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -251,10 +274,6 @@ func (client LabsClient) CreateOrUpdateSender(req *http.Request) (future LabsCre
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -277,6 +296,16 @@ func (client LabsClient) CreateOrUpdateResponder(resp *http.Response) (result La
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) Delete(ctx context.Context, resourceGroupName string, name string) (result LabsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Delete", nil, "Failure preparing request")
@@ -322,10 +351,6 @@ func (client LabsClient) DeleteSender(req *http.Request) (future LabsDeleteFutur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -349,6 +374,16 @@ func (client LabsClient) DeleteResponder(resp *http.Response) (result autorest.R
// name - the name of the lab.
// exportResourceUsageParameters - the parameters of the export operation.
func (client LabsClient) ExportResourceUsage(ctx context.Context, resourceGroupName string, name string, exportResourceUsageParameters ExportResourceUsageParameters) (result LabsExportResourceUsageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ExportResourceUsage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ExportResourceUsagePreparer(ctx, resourceGroupName, name, exportResourceUsageParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "ExportResourceUsage", nil, "Failure preparing request")
@@ -396,10 +431,6 @@ func (client LabsClient) ExportResourceUsageSender(req *http.Request) (future La
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -422,6 +453,16 @@ func (client LabsClient) ExportResourceUsageResponder(resp *http.Response) (resu
// name - the name of the lab.
// generateUploadURIParameter - properties for generating an upload URI.
func (client LabsClient) GenerateUploadURI(ctx context.Context, resourceGroupName string, name string, generateUploadURIParameter GenerateUploadURIParameter) (result GenerateUploadURIResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.GenerateUploadURI")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GenerateUploadURIPreparer(ctx, resourceGroupName, name, generateUploadURIParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "GenerateUploadURI", nil, "Failure preparing request")
@@ -492,6 +533,16 @@ func (client LabsClient) GenerateUploadURIResponder(resp *http.Response) (result
// name - the name of the lab.
// expand - specify the $expand query. Example: 'properties($select=defaultStorageAccount)'
func (client LabsClient) Get(ctx context.Context, resourceGroupName string, name string, expand string) (result Lab, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Get", nil, "Failure preparing request")
@@ -565,6 +616,16 @@ func (client LabsClient) GetResponder(resp *http.Response) (result Lab, err erro
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client LabsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.rwcl.Response.Response != nil {
+ sc = result.rwcl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, expand, filter, top, orderby)
if err != nil {
@@ -640,8 +701,8 @@ func (client LabsClient) ListByResourceGroupResponder(resp *http.Response) (resu
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client LabsClient) listByResourceGroupNextResults(lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
- req, err := lastResults.responseWithContinuationLabPreparer()
+func (client LabsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
+ req, err := lastResults.responseWithContinuationLabPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -662,6 +723,16 @@ func (client LabsClient) listByResourceGroupNextResults(lastResults ResponseWith
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, expand, filter, top, orderby)
return
}
@@ -673,6 +744,16 @@ func (client LabsClient) ListByResourceGroupComplete(ctx context.Context, resour
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client LabsClient) ListBySubscription(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.rwcl.Response.Response != nil {
+ sc = result.rwcl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx, expand, filter, top, orderby)
if err != nil {
@@ -747,8 +828,8 @@ func (client LabsClient) ListBySubscriptionResponder(resp *http.Response) (resul
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client LabsClient) listBySubscriptionNextResults(lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
- req, err := lastResults.responseWithContinuationLabPreparer()
+func (client LabsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ResponseWithContinuationLab) (result ResponseWithContinuationLab, err error) {
+ req, err := lastResults.responseWithContinuationLabPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -769,6 +850,16 @@ func (client LabsClient) listBySubscriptionNextResults(lastResults ResponseWithC
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListBySubscriptionComplete(ctx context.Context, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListBySubscription")
+ 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.ListBySubscription(ctx, expand, filter, top, orderby)
return
}
@@ -778,6 +869,16 @@ func (client LabsClient) ListBySubscriptionComplete(ctx context.Context, expand
// resourceGroupName - the name of the resource group.
// name - the name of the lab.
func (client LabsClient) ListVhds(ctx context.Context, resourceGroupName string, name string) (result ResponseWithContinuationLabVhdPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListVhds")
+ defer func() {
+ sc := -1
+ if result.rwclv.Response.Response != nil {
+ sc = result.rwclv.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVhdsNextResults
req, err := client.ListVhdsPreparer(ctx, resourceGroupName, name)
if err != nil {
@@ -842,8 +943,8 @@ func (client LabsClient) ListVhdsResponder(resp *http.Response) (result Response
}
// listVhdsNextResults retrieves the next set of results, if any.
-func (client LabsClient) listVhdsNextResults(lastResults ResponseWithContinuationLabVhd) (result ResponseWithContinuationLabVhd, err error) {
- req, err := lastResults.responseWithContinuationLabVhdPreparer()
+func (client LabsClient) listVhdsNextResults(ctx context.Context, lastResults ResponseWithContinuationLabVhd) (result ResponseWithContinuationLabVhd, err error) {
+ req, err := lastResults.responseWithContinuationLabVhdPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.LabsClient", "listVhdsNextResults", nil, "Failure preparing next results request")
}
@@ -864,6 +965,16 @@ func (client LabsClient) listVhdsNextResults(lastResults ResponseWithContinuatio
// ListVhdsComplete enumerates all values, automatically crossing page boundaries as required.
func (client LabsClient) ListVhdsComplete(ctx context.Context, resourceGroupName string, name string) (result ResponseWithContinuationLabVhdIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.ListVhds")
+ 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.ListVhds(ctx, resourceGroupName, name)
return
}
@@ -874,6 +985,16 @@ func (client LabsClient) ListVhdsComplete(ctx context.Context, resourceGroupName
// name - the name of the lab.
// lab - a lab.
func (client LabsClient) Update(ctx context.Context, resourceGroupName string, name string, lab LabFragment) (result Lab, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LabsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, name, lab)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.LabsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
index acd828195a30..36884030fea8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/models.go
@@ -18,14 +18,19 @@ package dtl
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl"
+
// CostThresholdStatus enumerates the values for cost threshold status.
type CostThresholdStatus string
@@ -460,8 +465,8 @@ func PossibleWindowsOsStateValues() []WindowsOsState {
return []WindowsOsState{NonSysprepped, SysprepApplied, SysprepRequested}
}
-// ApplicableSchedule schedules applicable to a virtual machine. The schedules may have been defined on a VM or on
-// lab level.
+// ApplicableSchedule schedules applicable to a virtual machine. The schedules may have been defined on a
+// VM or on lab level.
type ApplicableSchedule struct {
autorest.Response `json:"-"`
// ApplicableScheduleProperties - The properties of the resource.
@@ -571,8 +576,8 @@ func (as *ApplicableSchedule) UnmarshalJSON(body []byte) error {
return nil
}
-// ApplicableScheduleFragment schedules applicable to a virtual machine. The schedules may have been defined on a
-// VM or on lab level.
+// ApplicableScheduleFragment schedules applicable to a virtual machine. The schedules may have been
+// defined on a VM or on lab level.
type ApplicableScheduleFragment struct {
// ApplicableSchedulePropertiesFragment - The properties of the resource.
*ApplicableSchedulePropertiesFragment `json:"properties,omitempty"`
@@ -1323,7 +1328,7 @@ type AttachDiskProperties struct {
// AttachNewDataDiskOptions properties to attach new disk to the Virtual Machine.
type AttachNewDataDiskOptions struct {
- // DiskSizeGiB - Size of the disk to be attached in GibiBytes.
+ // DiskSizeGiB - Size of the disk to be attached in Gibibytes.
DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
// DiskName - The name of the disk to be attached.
DiskName *string `json:"diskName,omitempty"`
@@ -1595,8 +1600,8 @@ type CustomImagePropertiesFromVM struct {
LinuxOsInfo *LinuxOsInfo `json:"linuxOsInfo,omitempty"`
}
-// CustomImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// CustomImagesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type CustomImagesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1624,7 +1629,8 @@ func (future *CustomImagesCreateOrUpdateFuture) Result(client CustomImagesClient
return
}
-// CustomImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CustomImagesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CustomImagesDeleteFuture struct {
azure.Future
}
@@ -1794,7 +1800,7 @@ func (d *Disk) UnmarshalJSON(body []byte) error {
type DiskProperties struct {
// DiskType - The storage type for the disk (i.e. Standard, Premium). Possible values include: 'Standard', 'Premium'
DiskType StorageType `json:"diskType,omitempty"`
- // DiskSizeGiB - The size of the disk in GibiBytes.
+ // DiskSizeGiB - The size of the disk in Gibibytes.
DiskSizeGiB *int32 `json:"diskSizeGiB,omitempty"`
// LeasedByLabVMID - The resource ID of the VM to which this disk is leased.
LeasedByLabVMID *string `json:"leasedByLabVmId,omitempty"`
@@ -1836,7 +1842,8 @@ func (future *DisksAttachFuture) Result(client DisksClient) (ar autorest.Respons
return
}
-// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DisksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DisksCreateOrUpdateFuture struct {
azure.Future
}
@@ -2042,8 +2049,8 @@ type EnvironmentProperties struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
-// EnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// EnvironmentsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type EnvironmentsCreateOrUpdateFuture struct {
azure.Future
}
@@ -2071,7 +2078,8 @@ func (future *EnvironmentsCreateOrUpdateFuture) Result(client EnvironmentsClient
return
}
-// EnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// EnvironmentsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type EnvironmentsDeleteFuture struct {
azure.Future
}
@@ -2488,7 +2496,7 @@ type GenerateUploadURIParameter struct {
BlobName *string `json:"blobName,omitempty"`
}
-// GenerateUploadURIResponse reponse body for generating an upload URI.
+// GenerateUploadURIResponse response body for generating an upload URI.
type GenerateUploadURIResponse struct {
autorest.Response `json:"-"`
// UploadURI - The upload URI for the VHD.
@@ -2576,8 +2584,8 @@ type InboundNatRule struct {
BackendPort *int32 `json:"backendPort,omitempty"`
}
-// InboundNatRuleFragment a rule for NAT - exposing a VM's port (backendPort) on the public IP address using a load
-// balancer.
+// InboundNatRuleFragment a rule for NAT - exposing a VM's port (backendPort) on the public IP address
+// using a load balancer.
type InboundNatRuleFragment struct {
// TransportProtocol - The transport protocol for the endpoint. Possible values include: 'TCP', 'UDP'
TransportProtocol TransportProtocol `json:"transportProtocol,omitempty"`
@@ -3018,7 +3026,8 @@ type LabResourceCostProperties struct {
ExternalResourceID *string `json:"externalResourceId,omitempty"`
}
-// LabsClaimAnyVMFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// LabsClaimAnyVMFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type LabsClaimAnyVMFuture struct {
azure.Future
}
@@ -3063,7 +3072,8 @@ func (future *LabsCreateEnvironmentFuture) Result(client LabsClient) (ar autores
return
}
-// LabsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// LabsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type LabsCreateOrUpdateFuture struct {
azure.Future
}
@@ -4334,14 +4344,24 @@ type ProviderOperationResultIterator struct {
page ProviderOperationResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ProviderOperationResultIterator) Next() error {
+func (iter *ProviderOperationResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4350,6 +4370,13 @@ func (iter *ProviderOperationResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProviderOperationResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProviderOperationResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4369,6 +4396,11 @@ func (iter ProviderOperationResultIterator) Value() OperationMetadata {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ProviderOperationResultIterator type.
+func NewProviderOperationResultIterator(page ProviderOperationResultPage) ProviderOperationResultIterator {
+ return ProviderOperationResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (por ProviderOperationResult) IsEmpty() bool {
return por.Value == nil || len(*por.Value) == 0
@@ -4376,11 +4408,11 @@ func (por ProviderOperationResult) IsEmpty() bool {
// providerOperationResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (por ProviderOperationResult) providerOperationResultPreparer() (*http.Request, error) {
+func (por ProviderOperationResult) providerOperationResultPreparer(ctx context.Context) (*http.Request, error) {
if por.NextLink == nil || len(to.String(por.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(por.NextLink)))
@@ -4388,14 +4420,24 @@ func (por ProviderOperationResult) providerOperationResultPreparer() (*http.Requ
// ProviderOperationResultPage contains a page of OperationMetadata values.
type ProviderOperationResultPage struct {
- fn func(ProviderOperationResult) (ProviderOperationResult, error)
+ fn func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)
por ProviderOperationResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ProviderOperationResultPage) Next() error {
- next, err := page.fn(page.por)
+func (page *ProviderOperationResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.por)
if err != nil {
return err
}
@@ -4403,6 +4445,13 @@ func (page *ProviderOperationResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProviderOperationResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProviderOperationResultPage) NotDone() bool {
return !page.por.IsEmpty()
@@ -4421,6 +4470,11 @@ func (page ProviderOperationResultPage) Values() []OperationMetadata {
return *page.por.Value
}
+// Creates a new instance of the ProviderOperationResultPage type.
+func NewProviderOperationResultPage(getNextPage func(context.Context, ProviderOperationResult) (ProviderOperationResult, error)) ProviderOperationResultPage {
+ return ProviderOperationResultPage{fn: getNextPage}
+}
+
// Resource an Azure resource.
type Resource struct {
// ID - The identifier of the resource.
@@ -4471,14 +4525,24 @@ type ResponseWithContinuationArmTemplateIterator struct {
page ResponseWithContinuationArmTemplatePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationArmTemplateIterator) Next() error {
+func (iter *ResponseWithContinuationArmTemplateIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplateIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4487,6 +4551,13 @@ func (iter *ResponseWithContinuationArmTemplateIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationArmTemplateIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationArmTemplateIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4506,6 +4577,11 @@ func (iter ResponseWithContinuationArmTemplateIterator) Value() ArmTemplate {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationArmTemplateIterator type.
+func NewResponseWithContinuationArmTemplateIterator(page ResponseWithContinuationArmTemplatePage) ResponseWithContinuationArmTemplateIterator {
+ return ResponseWithContinuationArmTemplateIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcAt ResponseWithContinuationArmTemplate) IsEmpty() bool {
return rwcAt.Value == nil || len(*rwcAt.Value) == 0
@@ -4513,11 +4589,11 @@ func (rwcAt ResponseWithContinuationArmTemplate) IsEmpty() bool {
// responseWithContinuationArmTemplatePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcAt ResponseWithContinuationArmTemplate) responseWithContinuationArmTemplatePreparer() (*http.Request, error) {
+func (rwcAt ResponseWithContinuationArmTemplate) responseWithContinuationArmTemplatePreparer(ctx context.Context) (*http.Request, error) {
if rwcAt.NextLink == nil || len(to.String(rwcAt.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcAt.NextLink)))
@@ -4525,14 +4601,24 @@ func (rwcAt ResponseWithContinuationArmTemplate) responseWithContinuationArmTemp
// ResponseWithContinuationArmTemplatePage contains a page of ArmTemplate values.
type ResponseWithContinuationArmTemplatePage struct {
- fn func(ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)
+ fn func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)
rwcat ResponseWithContinuationArmTemplate
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationArmTemplatePage) Next() error {
- next, err := page.fn(page.rwcat)
+func (page *ResponseWithContinuationArmTemplatePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArmTemplatePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcat)
if err != nil {
return err
}
@@ -4540,6 +4626,13 @@ func (page *ResponseWithContinuationArmTemplatePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationArmTemplatePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationArmTemplatePage) NotDone() bool {
return !page.rwcat.IsEmpty()
@@ -4558,6 +4651,11 @@ func (page ResponseWithContinuationArmTemplatePage) Values() []ArmTemplate {
return *page.rwcat.Value
}
+// Creates a new instance of the ResponseWithContinuationArmTemplatePage type.
+func NewResponseWithContinuationArmTemplatePage(getNextPage func(context.Context, ResponseWithContinuationArmTemplate) (ResponseWithContinuationArmTemplate, error)) ResponseWithContinuationArmTemplatePage {
+ return ResponseWithContinuationArmTemplatePage{fn: getNextPage}
+}
+
// ResponseWithContinuationArtifact the response of a list operation.
type ResponseWithContinuationArtifact struct {
autorest.Response `json:"-"`
@@ -4573,14 +4671,24 @@ type ResponseWithContinuationArtifactIterator struct {
page ResponseWithContinuationArtifactPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationArtifactIterator) Next() error {
+func (iter *ResponseWithContinuationArtifactIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4589,6 +4697,13 @@ func (iter *ResponseWithContinuationArtifactIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationArtifactIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationArtifactIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4608,6 +4723,11 @@ func (iter ResponseWithContinuationArtifactIterator) Value() Artifact {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationArtifactIterator type.
+func NewResponseWithContinuationArtifactIterator(page ResponseWithContinuationArtifactPage) ResponseWithContinuationArtifactIterator {
+ return ResponseWithContinuationArtifactIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcA ResponseWithContinuationArtifact) IsEmpty() bool {
return rwcA.Value == nil || len(*rwcA.Value) == 0
@@ -4615,11 +4735,11 @@ func (rwcA ResponseWithContinuationArtifact) IsEmpty() bool {
// responseWithContinuationArtifactPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcA ResponseWithContinuationArtifact) responseWithContinuationArtifactPreparer() (*http.Request, error) {
+func (rwcA ResponseWithContinuationArtifact) responseWithContinuationArtifactPreparer(ctx context.Context) (*http.Request, error) {
if rwcA.NextLink == nil || len(to.String(rwcA.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcA.NextLink)))
@@ -4627,14 +4747,24 @@ func (rwcA ResponseWithContinuationArtifact) responseWithContinuationArtifactPre
// ResponseWithContinuationArtifactPage contains a page of Artifact values.
type ResponseWithContinuationArtifactPage struct {
- fn func(ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)
+ fn func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)
rwca ResponseWithContinuationArtifact
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationArtifactPage) Next() error {
- next, err := page.fn(page.rwca)
+func (page *ResponseWithContinuationArtifactPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwca)
if err != nil {
return err
}
@@ -4642,6 +4772,13 @@ func (page *ResponseWithContinuationArtifactPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationArtifactPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationArtifactPage) NotDone() bool {
return !page.rwca.IsEmpty()
@@ -4660,6 +4797,11 @@ func (page ResponseWithContinuationArtifactPage) Values() []Artifact {
return *page.rwca.Value
}
+// Creates a new instance of the ResponseWithContinuationArtifactPage type.
+func NewResponseWithContinuationArtifactPage(getNextPage func(context.Context, ResponseWithContinuationArtifact) (ResponseWithContinuationArtifact, error)) ResponseWithContinuationArtifactPage {
+ return ResponseWithContinuationArtifactPage{fn: getNextPage}
+}
+
// ResponseWithContinuationArtifactSource the response of a list operation.
type ResponseWithContinuationArtifactSource struct {
autorest.Response `json:"-"`
@@ -4669,20 +4811,31 @@ type ResponseWithContinuationArtifactSource struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationArtifactSourceIterator provides access to a complete listing of ArtifactSource values.
+// ResponseWithContinuationArtifactSourceIterator provides access to a complete listing of ArtifactSource
+// values.
type ResponseWithContinuationArtifactSourceIterator struct {
i int
page ResponseWithContinuationArtifactSourcePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationArtifactSourceIterator) Next() error {
+func (iter *ResponseWithContinuationArtifactSourceIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourceIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4691,6 +4844,13 @@ func (iter *ResponseWithContinuationArtifactSourceIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationArtifactSourceIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationArtifactSourceIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4710,6 +4870,11 @@ func (iter ResponseWithContinuationArtifactSourceIterator) Value() ArtifactSourc
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationArtifactSourceIterator type.
+func NewResponseWithContinuationArtifactSourceIterator(page ResponseWithContinuationArtifactSourcePage) ResponseWithContinuationArtifactSourceIterator {
+ return ResponseWithContinuationArtifactSourceIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcAs ResponseWithContinuationArtifactSource) IsEmpty() bool {
return rwcAs.Value == nil || len(*rwcAs.Value) == 0
@@ -4717,11 +4882,11 @@ func (rwcAs ResponseWithContinuationArtifactSource) IsEmpty() bool {
// responseWithContinuationArtifactSourcePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcAs ResponseWithContinuationArtifactSource) responseWithContinuationArtifactSourcePreparer() (*http.Request, error) {
+func (rwcAs ResponseWithContinuationArtifactSource) responseWithContinuationArtifactSourcePreparer(ctx context.Context) (*http.Request, error) {
if rwcAs.NextLink == nil || len(to.String(rwcAs.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcAs.NextLink)))
@@ -4729,14 +4894,24 @@ func (rwcAs ResponseWithContinuationArtifactSource) responseWithContinuationArti
// ResponseWithContinuationArtifactSourcePage contains a page of ArtifactSource values.
type ResponseWithContinuationArtifactSourcePage struct {
- fn func(ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)
+ fn func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)
rwcas ResponseWithContinuationArtifactSource
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationArtifactSourcePage) Next() error {
- next, err := page.fn(page.rwcas)
+func (page *ResponseWithContinuationArtifactSourcePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationArtifactSourcePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcas)
if err != nil {
return err
}
@@ -4744,6 +4919,13 @@ func (page *ResponseWithContinuationArtifactSourcePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationArtifactSourcePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationArtifactSourcePage) NotDone() bool {
return !page.rwcas.IsEmpty()
@@ -4762,6 +4944,11 @@ func (page ResponseWithContinuationArtifactSourcePage) Values() []ArtifactSource
return *page.rwcas.Value
}
+// Creates a new instance of the ResponseWithContinuationArtifactSourcePage type.
+func NewResponseWithContinuationArtifactSourcePage(getNextPage func(context.Context, ResponseWithContinuationArtifactSource) (ResponseWithContinuationArtifactSource, error)) ResponseWithContinuationArtifactSourcePage {
+ return ResponseWithContinuationArtifactSourcePage{fn: getNextPage}
+}
+
// ResponseWithContinuationCustomImage the response of a list operation.
type ResponseWithContinuationCustomImage struct {
autorest.Response `json:"-"`
@@ -4777,14 +4964,24 @@ type ResponseWithContinuationCustomImageIterator struct {
page ResponseWithContinuationCustomImagePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationCustomImageIterator) Next() error {
+func (iter *ResponseWithContinuationCustomImageIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImageIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4793,6 +4990,13 @@ func (iter *ResponseWithContinuationCustomImageIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationCustomImageIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationCustomImageIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4812,6 +5016,11 @@ func (iter ResponseWithContinuationCustomImageIterator) Value() CustomImage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationCustomImageIterator type.
+func NewResponseWithContinuationCustomImageIterator(page ResponseWithContinuationCustomImagePage) ResponseWithContinuationCustomImageIterator {
+ return ResponseWithContinuationCustomImageIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcCi ResponseWithContinuationCustomImage) IsEmpty() bool {
return rwcCi.Value == nil || len(*rwcCi.Value) == 0
@@ -4819,11 +5028,11 @@ func (rwcCi ResponseWithContinuationCustomImage) IsEmpty() bool {
// responseWithContinuationCustomImagePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcCi ResponseWithContinuationCustomImage) responseWithContinuationCustomImagePreparer() (*http.Request, error) {
+func (rwcCi ResponseWithContinuationCustomImage) responseWithContinuationCustomImagePreparer(ctx context.Context) (*http.Request, error) {
if rwcCi.NextLink == nil || len(to.String(rwcCi.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcCi.NextLink)))
@@ -4831,14 +5040,24 @@ func (rwcCi ResponseWithContinuationCustomImage) responseWithContinuationCustomI
// ResponseWithContinuationCustomImagePage contains a page of CustomImage values.
type ResponseWithContinuationCustomImagePage struct {
- fn func(ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)
+ fn func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)
rwcci ResponseWithContinuationCustomImage
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationCustomImagePage) Next() error {
- next, err := page.fn(page.rwcci)
+func (page *ResponseWithContinuationCustomImagePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationCustomImagePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcci)
if err != nil {
return err
}
@@ -4846,6 +5065,13 @@ func (page *ResponseWithContinuationCustomImagePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationCustomImagePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationCustomImagePage) NotDone() bool {
return !page.rwcci.IsEmpty()
@@ -4864,6 +5090,11 @@ func (page ResponseWithContinuationCustomImagePage) Values() []CustomImage {
return *page.rwcci.Value
}
+// Creates a new instance of the ResponseWithContinuationCustomImagePage type.
+func NewResponseWithContinuationCustomImagePage(getNextPage func(context.Context, ResponseWithContinuationCustomImage) (ResponseWithContinuationCustomImage, error)) ResponseWithContinuationCustomImagePage {
+ return ResponseWithContinuationCustomImagePage{fn: getNextPage}
+}
+
// ResponseWithContinuationDisk the response of a list operation.
type ResponseWithContinuationDisk struct {
autorest.Response `json:"-"`
@@ -4879,14 +5110,24 @@ type ResponseWithContinuationDiskIterator struct {
page ResponseWithContinuationDiskPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationDiskIterator) Next() error {
+func (iter *ResponseWithContinuationDiskIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4895,6 +5136,13 @@ func (iter *ResponseWithContinuationDiskIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationDiskIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationDiskIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4914,6 +5162,11 @@ func (iter ResponseWithContinuationDiskIterator) Value() Disk {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationDiskIterator type.
+func NewResponseWithContinuationDiskIterator(page ResponseWithContinuationDiskPage) ResponseWithContinuationDiskIterator {
+ return ResponseWithContinuationDiskIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcD ResponseWithContinuationDisk) IsEmpty() bool {
return rwcD.Value == nil || len(*rwcD.Value) == 0
@@ -4921,11 +5174,11 @@ func (rwcD ResponseWithContinuationDisk) IsEmpty() bool {
// responseWithContinuationDiskPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcD ResponseWithContinuationDisk) responseWithContinuationDiskPreparer() (*http.Request, error) {
+func (rwcD ResponseWithContinuationDisk) responseWithContinuationDiskPreparer(ctx context.Context) (*http.Request, error) {
if rwcD.NextLink == nil || len(to.String(rwcD.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcD.NextLink)))
@@ -4933,14 +5186,24 @@ func (rwcD ResponseWithContinuationDisk) responseWithContinuationDiskPreparer()
// ResponseWithContinuationDiskPage contains a page of Disk values.
type ResponseWithContinuationDiskPage struct {
- fn func(ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)
+ fn func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)
rwcd ResponseWithContinuationDisk
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationDiskPage) Next() error {
- next, err := page.fn(page.rwcd)
+func (page *ResponseWithContinuationDiskPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDiskPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcd)
if err != nil {
return err
}
@@ -4948,6 +5211,13 @@ func (page *ResponseWithContinuationDiskPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationDiskPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationDiskPage) NotDone() bool {
return !page.rwcd.IsEmpty()
@@ -4966,6 +5236,11 @@ func (page ResponseWithContinuationDiskPage) Values() []Disk {
return *page.rwcd.Value
}
+// Creates a new instance of the ResponseWithContinuationDiskPage type.
+func NewResponseWithContinuationDiskPage(getNextPage func(context.Context, ResponseWithContinuationDisk) (ResponseWithContinuationDisk, error)) ResponseWithContinuationDiskPage {
+ return ResponseWithContinuationDiskPage{fn: getNextPage}
+}
+
// ResponseWithContinuationDtlEnvironment the response of a list operation.
type ResponseWithContinuationDtlEnvironment struct {
autorest.Response `json:"-"`
@@ -4975,20 +5250,31 @@ type ResponseWithContinuationDtlEnvironment struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationDtlEnvironmentIterator provides access to a complete listing of Environment values.
+// ResponseWithContinuationDtlEnvironmentIterator provides access to a complete listing of Environment
+// values.
type ResponseWithContinuationDtlEnvironmentIterator struct {
i int
page ResponseWithContinuationDtlEnvironmentPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationDtlEnvironmentIterator) Next() error {
+func (iter *ResponseWithContinuationDtlEnvironmentIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4997,6 +5283,13 @@ func (iter *ResponseWithContinuationDtlEnvironmentIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationDtlEnvironmentIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationDtlEnvironmentIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5016,6 +5309,11 @@ func (iter ResponseWithContinuationDtlEnvironmentIterator) Value() Environment {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationDtlEnvironmentIterator type.
+func NewResponseWithContinuationDtlEnvironmentIterator(page ResponseWithContinuationDtlEnvironmentPage) ResponseWithContinuationDtlEnvironmentIterator {
+ return ResponseWithContinuationDtlEnvironmentIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcDe ResponseWithContinuationDtlEnvironment) IsEmpty() bool {
return rwcDe.Value == nil || len(*rwcDe.Value) == 0
@@ -5023,11 +5321,11 @@ func (rwcDe ResponseWithContinuationDtlEnvironment) IsEmpty() bool {
// responseWithContinuationDtlEnvironmentPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcDe ResponseWithContinuationDtlEnvironment) responseWithContinuationDtlEnvironmentPreparer() (*http.Request, error) {
+func (rwcDe ResponseWithContinuationDtlEnvironment) responseWithContinuationDtlEnvironmentPreparer(ctx context.Context) (*http.Request, error) {
if rwcDe.NextLink == nil || len(to.String(rwcDe.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcDe.NextLink)))
@@ -5035,14 +5333,24 @@ func (rwcDe ResponseWithContinuationDtlEnvironment) responseWithContinuationDtlE
// ResponseWithContinuationDtlEnvironmentPage contains a page of Environment values.
type ResponseWithContinuationDtlEnvironmentPage struct {
- fn func(ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)
+ fn func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)
rwcde ResponseWithContinuationDtlEnvironment
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationDtlEnvironmentPage) Next() error {
- next, err := page.fn(page.rwcde)
+func (page *ResponseWithContinuationDtlEnvironmentPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationDtlEnvironmentPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcde)
if err != nil {
return err
}
@@ -5050,6 +5358,13 @@ func (page *ResponseWithContinuationDtlEnvironmentPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationDtlEnvironmentPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationDtlEnvironmentPage) NotDone() bool {
return !page.rwcde.IsEmpty()
@@ -5068,6 +5383,11 @@ func (page ResponseWithContinuationDtlEnvironmentPage) Values() []Environment {
return *page.rwcde.Value
}
+// Creates a new instance of the ResponseWithContinuationDtlEnvironmentPage type.
+func NewResponseWithContinuationDtlEnvironmentPage(getNextPage func(context.Context, ResponseWithContinuationDtlEnvironment) (ResponseWithContinuationDtlEnvironment, error)) ResponseWithContinuationDtlEnvironmentPage {
+ return ResponseWithContinuationDtlEnvironmentPage{fn: getNextPage}
+}
+
// ResponseWithContinuationFormula the response of a list operation.
type ResponseWithContinuationFormula struct {
autorest.Response `json:"-"`
@@ -5083,14 +5403,24 @@ type ResponseWithContinuationFormulaIterator struct {
page ResponseWithContinuationFormulaPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationFormulaIterator) Next() error {
+func (iter *ResponseWithContinuationFormulaIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5099,6 +5429,13 @@ func (iter *ResponseWithContinuationFormulaIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationFormulaIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationFormulaIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5118,6 +5455,11 @@ func (iter ResponseWithContinuationFormulaIterator) Value() Formula {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationFormulaIterator type.
+func NewResponseWithContinuationFormulaIterator(page ResponseWithContinuationFormulaPage) ResponseWithContinuationFormulaIterator {
+ return ResponseWithContinuationFormulaIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcF ResponseWithContinuationFormula) IsEmpty() bool {
return rwcF.Value == nil || len(*rwcF.Value) == 0
@@ -5125,11 +5467,11 @@ func (rwcF ResponseWithContinuationFormula) IsEmpty() bool {
// responseWithContinuationFormulaPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcF ResponseWithContinuationFormula) responseWithContinuationFormulaPreparer() (*http.Request, error) {
+func (rwcF ResponseWithContinuationFormula) responseWithContinuationFormulaPreparer(ctx context.Context) (*http.Request, error) {
if rwcF.NextLink == nil || len(to.String(rwcF.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcF.NextLink)))
@@ -5137,14 +5479,24 @@ func (rwcF ResponseWithContinuationFormula) responseWithContinuationFormulaPrepa
// ResponseWithContinuationFormulaPage contains a page of Formula values.
type ResponseWithContinuationFormulaPage struct {
- fn func(ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)
+ fn func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)
rwcf ResponseWithContinuationFormula
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationFormulaPage) Next() error {
- next, err := page.fn(page.rwcf)
+func (page *ResponseWithContinuationFormulaPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationFormulaPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcf)
if err != nil {
return err
}
@@ -5152,6 +5504,13 @@ func (page *ResponseWithContinuationFormulaPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationFormulaPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationFormulaPage) NotDone() bool {
return !page.rwcf.IsEmpty()
@@ -5170,6 +5529,11 @@ func (page ResponseWithContinuationFormulaPage) Values() []Formula {
return *page.rwcf.Value
}
+// Creates a new instance of the ResponseWithContinuationFormulaPage type.
+func NewResponseWithContinuationFormulaPage(getNextPage func(context.Context, ResponseWithContinuationFormula) (ResponseWithContinuationFormula, error)) ResponseWithContinuationFormulaPage {
+ return ResponseWithContinuationFormulaPage{fn: getNextPage}
+}
+
// ResponseWithContinuationGalleryImage the response of a list operation.
type ResponseWithContinuationGalleryImage struct {
autorest.Response `json:"-"`
@@ -5179,20 +5543,31 @@ type ResponseWithContinuationGalleryImage struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationGalleryImageIterator provides access to a complete listing of GalleryImage values.
+// ResponseWithContinuationGalleryImageIterator provides access to a complete listing of GalleryImage
+// values.
type ResponseWithContinuationGalleryImageIterator struct {
i int
page ResponseWithContinuationGalleryImagePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
+func (iter *ResponseWithContinuationGalleryImageIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImageIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5201,6 +5576,13 @@ func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationGalleryImageIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationGalleryImageIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5220,6 +5602,11 @@ func (iter ResponseWithContinuationGalleryImageIterator) Value() GalleryImage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationGalleryImageIterator type.
+func NewResponseWithContinuationGalleryImageIterator(page ResponseWithContinuationGalleryImagePage) ResponseWithContinuationGalleryImageIterator {
+ return ResponseWithContinuationGalleryImageIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcGi ResponseWithContinuationGalleryImage) IsEmpty() bool {
return rwcGi.Value == nil || len(*rwcGi.Value) == 0
@@ -5227,11 +5614,11 @@ func (rwcGi ResponseWithContinuationGalleryImage) IsEmpty() bool {
// responseWithContinuationGalleryImagePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGalleryImagePreparer() (*http.Request, error) {
+func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGalleryImagePreparer(ctx context.Context) (*http.Request, error) {
if rwcGi.NextLink == nil || len(to.String(rwcGi.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcGi.NextLink)))
@@ -5239,14 +5626,24 @@ func (rwcGi ResponseWithContinuationGalleryImage) responseWithContinuationGaller
// ResponseWithContinuationGalleryImagePage contains a page of GalleryImage values.
type ResponseWithContinuationGalleryImagePage struct {
- fn func(ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)
+ fn func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)
rwcgi ResponseWithContinuationGalleryImage
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationGalleryImagePage) Next() error {
- next, err := page.fn(page.rwcgi)
+func (page *ResponseWithContinuationGalleryImagePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationGalleryImagePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcgi)
if err != nil {
return err
}
@@ -5254,6 +5651,13 @@ func (page *ResponseWithContinuationGalleryImagePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationGalleryImagePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationGalleryImagePage) NotDone() bool {
return !page.rwcgi.IsEmpty()
@@ -5272,6 +5676,11 @@ func (page ResponseWithContinuationGalleryImagePage) Values() []GalleryImage {
return *page.rwcgi.Value
}
+// Creates a new instance of the ResponseWithContinuationGalleryImagePage type.
+func NewResponseWithContinuationGalleryImagePage(getNextPage func(context.Context, ResponseWithContinuationGalleryImage) (ResponseWithContinuationGalleryImage, error)) ResponseWithContinuationGalleryImagePage {
+ return ResponseWithContinuationGalleryImagePage{fn: getNextPage}
+}
+
// ResponseWithContinuationLab the response of a list operation.
type ResponseWithContinuationLab struct {
autorest.Response `json:"-"`
@@ -5287,14 +5696,24 @@ type ResponseWithContinuationLabIterator struct {
page ResponseWithContinuationLabPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationLabIterator) Next() error {
+func (iter *ResponseWithContinuationLabIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5303,6 +5722,13 @@ func (iter *ResponseWithContinuationLabIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationLabIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationLabIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5322,6 +5748,11 @@ func (iter ResponseWithContinuationLabIterator) Value() Lab {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationLabIterator type.
+func NewResponseWithContinuationLabIterator(page ResponseWithContinuationLabPage) ResponseWithContinuationLabIterator {
+ return ResponseWithContinuationLabIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcL ResponseWithContinuationLab) IsEmpty() bool {
return rwcL.Value == nil || len(*rwcL.Value) == 0
@@ -5329,11 +5760,11 @@ func (rwcL ResponseWithContinuationLab) IsEmpty() bool {
// responseWithContinuationLabPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer() (*http.Request, error) {
+func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer(ctx context.Context) (*http.Request, error) {
if rwcL.NextLink == nil || len(to.String(rwcL.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcL.NextLink)))
@@ -5341,14 +5772,24 @@ func (rwcL ResponseWithContinuationLab) responseWithContinuationLabPreparer() (*
// ResponseWithContinuationLabPage contains a page of Lab values.
type ResponseWithContinuationLabPage struct {
- fn func(ResponseWithContinuationLab) (ResponseWithContinuationLab, error)
+ fn func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)
rwcl ResponseWithContinuationLab
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationLabPage) Next() error {
- next, err := page.fn(page.rwcl)
+func (page *ResponseWithContinuationLabPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcl)
if err != nil {
return err
}
@@ -5356,6 +5797,13 @@ func (page *ResponseWithContinuationLabPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationLabPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationLabPage) NotDone() bool {
return !page.rwcl.IsEmpty()
@@ -5374,6 +5822,11 @@ func (page ResponseWithContinuationLabPage) Values() []Lab {
return *page.rwcl.Value
}
+// Creates a new instance of the ResponseWithContinuationLabPage type.
+func NewResponseWithContinuationLabPage(getNextPage func(context.Context, ResponseWithContinuationLab) (ResponseWithContinuationLab, error)) ResponseWithContinuationLabPage {
+ return ResponseWithContinuationLabPage{fn: getNextPage}
+}
+
// ResponseWithContinuationLabVhd the response of a list operation.
type ResponseWithContinuationLabVhd struct {
autorest.Response `json:"-"`
@@ -5389,14 +5842,24 @@ type ResponseWithContinuationLabVhdIterator struct {
page ResponseWithContinuationLabVhdPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationLabVhdIterator) Next() error {
+func (iter *ResponseWithContinuationLabVhdIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5405,6 +5868,13 @@ func (iter *ResponseWithContinuationLabVhdIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationLabVhdIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationLabVhdIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5424,6 +5894,11 @@ func (iter ResponseWithContinuationLabVhdIterator) Value() LabVhd {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationLabVhdIterator type.
+func NewResponseWithContinuationLabVhdIterator(page ResponseWithContinuationLabVhdPage) ResponseWithContinuationLabVhdIterator {
+ return ResponseWithContinuationLabVhdIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcLv ResponseWithContinuationLabVhd) IsEmpty() bool {
return rwcLv.Value == nil || len(*rwcLv.Value) == 0
@@ -5431,11 +5906,11 @@ func (rwcLv ResponseWithContinuationLabVhd) IsEmpty() bool {
// responseWithContinuationLabVhdPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcLv ResponseWithContinuationLabVhd) responseWithContinuationLabVhdPreparer() (*http.Request, error) {
+func (rwcLv ResponseWithContinuationLabVhd) responseWithContinuationLabVhdPreparer(ctx context.Context) (*http.Request, error) {
if rwcLv.NextLink == nil || len(to.String(rwcLv.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcLv.NextLink)))
@@ -5443,14 +5918,24 @@ func (rwcLv ResponseWithContinuationLabVhd) responseWithContinuationLabVhdPrepar
// ResponseWithContinuationLabVhdPage contains a page of LabVhd values.
type ResponseWithContinuationLabVhdPage struct {
- fn func(ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)
+ fn func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)
rwclv ResponseWithContinuationLabVhd
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationLabVhdPage) Next() error {
- next, err := page.fn(page.rwclv)
+func (page *ResponseWithContinuationLabVhdPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVhdPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwclv)
if err != nil {
return err
}
@@ -5458,6 +5943,13 @@ func (page *ResponseWithContinuationLabVhdPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationLabVhdPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationLabVhdPage) NotDone() bool {
return !page.rwclv.IsEmpty()
@@ -5476,6 +5968,11 @@ func (page ResponseWithContinuationLabVhdPage) Values() []LabVhd {
return *page.rwclv.Value
}
+// Creates a new instance of the ResponseWithContinuationLabVhdPage type.
+func NewResponseWithContinuationLabVhdPage(getNextPage func(context.Context, ResponseWithContinuationLabVhd) (ResponseWithContinuationLabVhd, error)) ResponseWithContinuationLabVhdPage {
+ return ResponseWithContinuationLabVhdPage{fn: getNextPage}
+}
+
// ResponseWithContinuationLabVirtualMachine the response of a list operation.
type ResponseWithContinuationLabVirtualMachine struct {
autorest.Response `json:"-"`
@@ -5485,21 +5982,31 @@ type ResponseWithContinuationLabVirtualMachine struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationLabVirtualMachineIterator provides access to a complete listing of LabVirtualMachine
-// values.
+// ResponseWithContinuationLabVirtualMachineIterator provides access to a complete listing of
+// LabVirtualMachine values.
type ResponseWithContinuationLabVirtualMachineIterator struct {
i int
page ResponseWithContinuationLabVirtualMachinePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationLabVirtualMachineIterator) Next() error {
+func (iter *ResponseWithContinuationLabVirtualMachineIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachineIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5508,6 +6015,13 @@ func (iter *ResponseWithContinuationLabVirtualMachineIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationLabVirtualMachineIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationLabVirtualMachineIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5527,6 +6041,11 @@ func (iter ResponseWithContinuationLabVirtualMachineIterator) Value() LabVirtual
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationLabVirtualMachineIterator type.
+func NewResponseWithContinuationLabVirtualMachineIterator(page ResponseWithContinuationLabVirtualMachinePage) ResponseWithContinuationLabVirtualMachineIterator {
+ return ResponseWithContinuationLabVirtualMachineIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcLvm ResponseWithContinuationLabVirtualMachine) IsEmpty() bool {
return rwcLvm.Value == nil || len(*rwcLvm.Value) == 0
@@ -5534,11 +6053,11 @@ func (rwcLvm ResponseWithContinuationLabVirtualMachine) IsEmpty() bool {
// responseWithContinuationLabVirtualMachinePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcLvm ResponseWithContinuationLabVirtualMachine) responseWithContinuationLabVirtualMachinePreparer() (*http.Request, error) {
+func (rwcLvm ResponseWithContinuationLabVirtualMachine) responseWithContinuationLabVirtualMachinePreparer(ctx context.Context) (*http.Request, error) {
if rwcLvm.NextLink == nil || len(to.String(rwcLvm.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcLvm.NextLink)))
@@ -5546,14 +6065,24 @@ func (rwcLvm ResponseWithContinuationLabVirtualMachine) responseWithContinuation
// ResponseWithContinuationLabVirtualMachinePage contains a page of LabVirtualMachine values.
type ResponseWithContinuationLabVirtualMachinePage struct {
- fn func(ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)
+ fn func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)
rwclvm ResponseWithContinuationLabVirtualMachine
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationLabVirtualMachinePage) Next() error {
- next, err := page.fn(page.rwclvm)
+func (page *ResponseWithContinuationLabVirtualMachinePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationLabVirtualMachinePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwclvm)
if err != nil {
return err
}
@@ -5561,6 +6090,13 @@ func (page *ResponseWithContinuationLabVirtualMachinePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationLabVirtualMachinePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationLabVirtualMachinePage) NotDone() bool {
return !page.rwclvm.IsEmpty()
@@ -5579,6 +6115,11 @@ func (page ResponseWithContinuationLabVirtualMachinePage) Values() []LabVirtualM
return *page.rwclvm.Value
}
+// Creates a new instance of the ResponseWithContinuationLabVirtualMachinePage type.
+func NewResponseWithContinuationLabVirtualMachinePage(getNextPage func(context.Context, ResponseWithContinuationLabVirtualMachine) (ResponseWithContinuationLabVirtualMachine, error)) ResponseWithContinuationLabVirtualMachinePage {
+ return ResponseWithContinuationLabVirtualMachinePage{fn: getNextPage}
+}
+
// ResponseWithContinuationNotificationChannel the response of a list operation.
type ResponseWithContinuationNotificationChannel struct {
autorest.Response `json:"-"`
@@ -5588,21 +6129,31 @@ type ResponseWithContinuationNotificationChannel struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationNotificationChannelIterator provides access to a complete listing of NotificationChannel
-// values.
+// ResponseWithContinuationNotificationChannelIterator provides access to a complete listing of
+// NotificationChannel values.
type ResponseWithContinuationNotificationChannelIterator struct {
i int
page ResponseWithContinuationNotificationChannelPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationNotificationChannelIterator) Next() error {
+func (iter *ResponseWithContinuationNotificationChannelIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5611,6 +6162,13 @@ func (iter *ResponseWithContinuationNotificationChannelIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationNotificationChannelIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationNotificationChannelIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5630,6 +6188,11 @@ func (iter ResponseWithContinuationNotificationChannelIterator) Value() Notifica
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationNotificationChannelIterator type.
+func NewResponseWithContinuationNotificationChannelIterator(page ResponseWithContinuationNotificationChannelPage) ResponseWithContinuationNotificationChannelIterator {
+ return ResponseWithContinuationNotificationChannelIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcNc ResponseWithContinuationNotificationChannel) IsEmpty() bool {
return rwcNc.Value == nil || len(*rwcNc.Value) == 0
@@ -5637,11 +6200,11 @@ func (rwcNc ResponseWithContinuationNotificationChannel) IsEmpty() bool {
// responseWithContinuationNotificationChannelPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcNc ResponseWithContinuationNotificationChannel) responseWithContinuationNotificationChannelPreparer() (*http.Request, error) {
+func (rwcNc ResponseWithContinuationNotificationChannel) responseWithContinuationNotificationChannelPreparer(ctx context.Context) (*http.Request, error) {
if rwcNc.NextLink == nil || len(to.String(rwcNc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcNc.NextLink)))
@@ -5649,14 +6212,24 @@ func (rwcNc ResponseWithContinuationNotificationChannel) responseWithContinuatio
// ResponseWithContinuationNotificationChannelPage contains a page of NotificationChannel values.
type ResponseWithContinuationNotificationChannelPage struct {
- fn func(ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)
+ fn func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)
rwcnc ResponseWithContinuationNotificationChannel
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationNotificationChannelPage) Next() error {
- next, err := page.fn(page.rwcnc)
+func (page *ResponseWithContinuationNotificationChannelPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationNotificationChannelPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcnc)
if err != nil {
return err
}
@@ -5664,6 +6237,13 @@ func (page *ResponseWithContinuationNotificationChannelPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationNotificationChannelPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationNotificationChannelPage) NotDone() bool {
return !page.rwcnc.IsEmpty()
@@ -5682,6 +6262,11 @@ func (page ResponseWithContinuationNotificationChannelPage) Values() []Notificat
return *page.rwcnc.Value
}
+// Creates a new instance of the ResponseWithContinuationNotificationChannelPage type.
+func NewResponseWithContinuationNotificationChannelPage(getNextPage func(context.Context, ResponseWithContinuationNotificationChannel) (ResponseWithContinuationNotificationChannel, error)) ResponseWithContinuationNotificationChannelPage {
+ return ResponseWithContinuationNotificationChannelPage{fn: getNextPage}
+}
+
// ResponseWithContinuationPolicy the response of a list operation.
type ResponseWithContinuationPolicy struct {
autorest.Response `json:"-"`
@@ -5697,14 +6282,24 @@ type ResponseWithContinuationPolicyIterator struct {
page ResponseWithContinuationPolicyPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationPolicyIterator) Next() error {
+func (iter *ResponseWithContinuationPolicyIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5713,6 +6308,13 @@ func (iter *ResponseWithContinuationPolicyIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationPolicyIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationPolicyIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5732,6 +6334,11 @@ func (iter ResponseWithContinuationPolicyIterator) Value() Policy {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationPolicyIterator type.
+func NewResponseWithContinuationPolicyIterator(page ResponseWithContinuationPolicyPage) ResponseWithContinuationPolicyIterator {
+ return ResponseWithContinuationPolicyIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcP ResponseWithContinuationPolicy) IsEmpty() bool {
return rwcP.Value == nil || len(*rwcP.Value) == 0
@@ -5739,11 +6346,11 @@ func (rwcP ResponseWithContinuationPolicy) IsEmpty() bool {
// responseWithContinuationPolicyPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcP ResponseWithContinuationPolicy) responseWithContinuationPolicyPreparer() (*http.Request, error) {
+func (rwcP ResponseWithContinuationPolicy) responseWithContinuationPolicyPreparer(ctx context.Context) (*http.Request, error) {
if rwcP.NextLink == nil || len(to.String(rwcP.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcP.NextLink)))
@@ -5751,14 +6358,24 @@ func (rwcP ResponseWithContinuationPolicy) responseWithContinuationPolicyPrepare
// ResponseWithContinuationPolicyPage contains a page of Policy values.
type ResponseWithContinuationPolicyPage struct {
- fn func(ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)
+ fn func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)
rwcp ResponseWithContinuationPolicy
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationPolicyPage) Next() error {
- next, err := page.fn(page.rwcp)
+func (page *ResponseWithContinuationPolicyPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationPolicyPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcp)
if err != nil {
return err
}
@@ -5766,6 +6383,13 @@ func (page *ResponseWithContinuationPolicyPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationPolicyPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationPolicyPage) NotDone() bool {
return !page.rwcp.IsEmpty()
@@ -5784,6 +6408,11 @@ func (page ResponseWithContinuationPolicyPage) Values() []Policy {
return *page.rwcp.Value
}
+// Creates a new instance of the ResponseWithContinuationPolicyPage type.
+func NewResponseWithContinuationPolicyPage(getNextPage func(context.Context, ResponseWithContinuationPolicy) (ResponseWithContinuationPolicy, error)) ResponseWithContinuationPolicyPage {
+ return ResponseWithContinuationPolicyPage{fn: getNextPage}
+}
+
// ResponseWithContinuationSchedule the response of a list operation.
type ResponseWithContinuationSchedule struct {
autorest.Response `json:"-"`
@@ -5799,14 +6428,24 @@ type ResponseWithContinuationScheduleIterator struct {
page ResponseWithContinuationSchedulePage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationScheduleIterator) Next() error {
+func (iter *ResponseWithContinuationScheduleIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationScheduleIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5815,6 +6454,13 @@ func (iter *ResponseWithContinuationScheduleIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationScheduleIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationScheduleIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5834,6 +6480,11 @@ func (iter ResponseWithContinuationScheduleIterator) Value() Schedule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationScheduleIterator type.
+func NewResponseWithContinuationScheduleIterator(page ResponseWithContinuationSchedulePage) ResponseWithContinuationScheduleIterator {
+ return ResponseWithContinuationScheduleIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcS ResponseWithContinuationSchedule) IsEmpty() bool {
return rwcS.Value == nil || len(*rwcS.Value) == 0
@@ -5841,11 +6492,11 @@ func (rwcS ResponseWithContinuationSchedule) IsEmpty() bool {
// responseWithContinuationSchedulePreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcS ResponseWithContinuationSchedule) responseWithContinuationSchedulePreparer() (*http.Request, error) {
+func (rwcS ResponseWithContinuationSchedule) responseWithContinuationSchedulePreparer(ctx context.Context) (*http.Request, error) {
if rwcS.NextLink == nil || len(to.String(rwcS.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcS.NextLink)))
@@ -5853,14 +6504,24 @@ func (rwcS ResponseWithContinuationSchedule) responseWithContinuationSchedulePre
// ResponseWithContinuationSchedulePage contains a page of Schedule values.
type ResponseWithContinuationSchedulePage struct {
- fn func(ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)
+ fn func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)
rwcs ResponseWithContinuationSchedule
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationSchedulePage) Next() error {
- next, err := page.fn(page.rwcs)
+func (page *ResponseWithContinuationSchedulePage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSchedulePage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcs)
if err != nil {
return err
}
@@ -5868,6 +6529,13 @@ func (page *ResponseWithContinuationSchedulePage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationSchedulePage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationSchedulePage) NotDone() bool {
return !page.rwcs.IsEmpty()
@@ -5886,6 +6554,11 @@ func (page ResponseWithContinuationSchedulePage) Values() []Schedule {
return *page.rwcs.Value
}
+// Creates a new instance of the ResponseWithContinuationSchedulePage type.
+func NewResponseWithContinuationSchedulePage(getNextPage func(context.Context, ResponseWithContinuationSchedule) (ResponseWithContinuationSchedule, error)) ResponseWithContinuationSchedulePage {
+ return ResponseWithContinuationSchedulePage{fn: getNextPage}
+}
+
// ResponseWithContinuationSecret the response of a list operation.
type ResponseWithContinuationSecret struct {
autorest.Response `json:"-"`
@@ -5901,14 +6574,24 @@ type ResponseWithContinuationSecretIterator struct {
page ResponseWithContinuationSecretPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationSecretIterator) Next() error {
+func (iter *ResponseWithContinuationSecretIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5917,6 +6600,13 @@ func (iter *ResponseWithContinuationSecretIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationSecretIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationSecretIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5936,6 +6626,11 @@ func (iter ResponseWithContinuationSecretIterator) Value() Secret {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationSecretIterator type.
+func NewResponseWithContinuationSecretIterator(page ResponseWithContinuationSecretPage) ResponseWithContinuationSecretIterator {
+ return ResponseWithContinuationSecretIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcS ResponseWithContinuationSecret) IsEmpty() bool {
return rwcS.Value == nil || len(*rwcS.Value) == 0
@@ -5943,11 +6638,11 @@ func (rwcS ResponseWithContinuationSecret) IsEmpty() bool {
// responseWithContinuationSecretPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcS ResponseWithContinuationSecret) responseWithContinuationSecretPreparer() (*http.Request, error) {
+func (rwcS ResponseWithContinuationSecret) responseWithContinuationSecretPreparer(ctx context.Context) (*http.Request, error) {
if rwcS.NextLink == nil || len(to.String(rwcS.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcS.NextLink)))
@@ -5955,14 +6650,24 @@ func (rwcS ResponseWithContinuationSecret) responseWithContinuationSecretPrepare
// ResponseWithContinuationSecretPage contains a page of Secret values.
type ResponseWithContinuationSecretPage struct {
- fn func(ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)
+ fn func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)
rwcs ResponseWithContinuationSecret
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationSecretPage) Next() error {
- next, err := page.fn(page.rwcs)
+func (page *ResponseWithContinuationSecretPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationSecretPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcs)
if err != nil {
return err
}
@@ -5970,6 +6675,13 @@ func (page *ResponseWithContinuationSecretPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationSecretPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationSecretPage) NotDone() bool {
return !page.rwcs.IsEmpty()
@@ -5988,6 +6700,11 @@ func (page ResponseWithContinuationSecretPage) Values() []Secret {
return *page.rwcs.Value
}
+// Creates a new instance of the ResponseWithContinuationSecretPage type.
+func NewResponseWithContinuationSecretPage(getNextPage func(context.Context, ResponseWithContinuationSecret) (ResponseWithContinuationSecret, error)) ResponseWithContinuationSecretPage {
+ return ResponseWithContinuationSecretPage{fn: getNextPage}
+}
+
// ResponseWithContinuationServiceRunner the response of a list operation.
type ResponseWithContinuationServiceRunner struct {
autorest.Response `json:"-"`
@@ -5997,20 +6714,31 @@ type ResponseWithContinuationServiceRunner struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationServiceRunnerIterator provides access to a complete listing of ServiceRunner values.
+// ResponseWithContinuationServiceRunnerIterator provides access to a complete listing of ServiceRunner
+// values.
type ResponseWithContinuationServiceRunnerIterator struct {
i int
page ResponseWithContinuationServiceRunnerPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationServiceRunnerIterator) Next() error {
+func (iter *ResponseWithContinuationServiceRunnerIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6019,6 +6747,13 @@ func (iter *ResponseWithContinuationServiceRunnerIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationServiceRunnerIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationServiceRunnerIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6038,6 +6773,11 @@ func (iter ResponseWithContinuationServiceRunnerIterator) Value() ServiceRunner
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationServiceRunnerIterator type.
+func NewResponseWithContinuationServiceRunnerIterator(page ResponseWithContinuationServiceRunnerPage) ResponseWithContinuationServiceRunnerIterator {
+ return ResponseWithContinuationServiceRunnerIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcSr ResponseWithContinuationServiceRunner) IsEmpty() bool {
return rwcSr.Value == nil || len(*rwcSr.Value) == 0
@@ -6045,11 +6785,11 @@ func (rwcSr ResponseWithContinuationServiceRunner) IsEmpty() bool {
// responseWithContinuationServiceRunnerPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcSr ResponseWithContinuationServiceRunner) responseWithContinuationServiceRunnerPreparer() (*http.Request, error) {
+func (rwcSr ResponseWithContinuationServiceRunner) responseWithContinuationServiceRunnerPreparer(ctx context.Context) (*http.Request, error) {
if rwcSr.NextLink == nil || len(to.String(rwcSr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcSr.NextLink)))
@@ -6057,14 +6797,24 @@ func (rwcSr ResponseWithContinuationServiceRunner) responseWithContinuationServi
// ResponseWithContinuationServiceRunnerPage contains a page of ServiceRunner values.
type ResponseWithContinuationServiceRunnerPage struct {
- fn func(ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)
+ fn func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)
rwcsr ResponseWithContinuationServiceRunner
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationServiceRunnerPage) Next() error {
- next, err := page.fn(page.rwcsr)
+func (page *ResponseWithContinuationServiceRunnerPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationServiceRunnerPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcsr)
if err != nil {
return err
}
@@ -6072,6 +6822,13 @@ func (page *ResponseWithContinuationServiceRunnerPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationServiceRunnerPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationServiceRunnerPage) NotDone() bool {
return !page.rwcsr.IsEmpty()
@@ -6090,6 +6847,11 @@ func (page ResponseWithContinuationServiceRunnerPage) Values() []ServiceRunner {
return *page.rwcsr.Value
}
+// Creates a new instance of the ResponseWithContinuationServiceRunnerPage type.
+func NewResponseWithContinuationServiceRunnerPage(getNextPage func(context.Context, ResponseWithContinuationServiceRunner) (ResponseWithContinuationServiceRunner, error)) ResponseWithContinuationServiceRunnerPage {
+ return ResponseWithContinuationServiceRunnerPage{fn: getNextPage}
+}
+
// ResponseWithContinuationUser the response of a list operation.
type ResponseWithContinuationUser struct {
autorest.Response `json:"-"`
@@ -6105,14 +6867,24 @@ type ResponseWithContinuationUserIterator struct {
page ResponseWithContinuationUserPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationUserIterator) Next() error {
+func (iter *ResponseWithContinuationUserIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6121,6 +6893,13 @@ func (iter *ResponseWithContinuationUserIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationUserIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationUserIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6140,6 +6919,11 @@ func (iter ResponseWithContinuationUserIterator) Value() User {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationUserIterator type.
+func NewResponseWithContinuationUserIterator(page ResponseWithContinuationUserPage) ResponseWithContinuationUserIterator {
+ return ResponseWithContinuationUserIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcU ResponseWithContinuationUser) IsEmpty() bool {
return rwcU.Value == nil || len(*rwcU.Value) == 0
@@ -6147,11 +6931,11 @@ func (rwcU ResponseWithContinuationUser) IsEmpty() bool {
// responseWithContinuationUserPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer() (*http.Request, error) {
+func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer(ctx context.Context) (*http.Request, error) {
if rwcU.NextLink == nil || len(to.String(rwcU.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcU.NextLink)))
@@ -6159,14 +6943,24 @@ func (rwcU ResponseWithContinuationUser) responseWithContinuationUserPreparer()
// ResponseWithContinuationUserPage contains a page of User values.
type ResponseWithContinuationUserPage struct {
- fn func(ResponseWithContinuationUser) (ResponseWithContinuationUser, error)
+ fn func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)
rwcu ResponseWithContinuationUser
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationUserPage) Next() error {
- next, err := page.fn(page.rwcu)
+func (page *ResponseWithContinuationUserPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationUserPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcu)
if err != nil {
return err
}
@@ -6174,6 +6968,13 @@ func (page *ResponseWithContinuationUserPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationUserPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationUserPage) NotDone() bool {
return !page.rwcu.IsEmpty()
@@ -6192,6 +6993,11 @@ func (page ResponseWithContinuationUserPage) Values() []User {
return *page.rwcu.Value
}
+// Creates a new instance of the ResponseWithContinuationUserPage type.
+func NewResponseWithContinuationUserPage(getNextPage func(context.Context, ResponseWithContinuationUser) (ResponseWithContinuationUser, error)) ResponseWithContinuationUserPage {
+ return ResponseWithContinuationUserPage{fn: getNextPage}
+}
+
// ResponseWithContinuationVirtualNetwork the response of a list operation.
type ResponseWithContinuationVirtualNetwork struct {
autorest.Response `json:"-"`
@@ -6201,20 +7007,31 @@ type ResponseWithContinuationVirtualNetwork struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ResponseWithContinuationVirtualNetworkIterator provides access to a complete listing of VirtualNetwork values.
+// ResponseWithContinuationVirtualNetworkIterator provides access to a complete listing of VirtualNetwork
+// values.
type ResponseWithContinuationVirtualNetworkIterator struct {
i int
page ResponseWithContinuationVirtualNetworkPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResponseWithContinuationVirtualNetworkIterator) Next() error {
+func (iter *ResponseWithContinuationVirtualNetworkIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6223,6 +7040,13 @@ func (iter *ResponseWithContinuationVirtualNetworkIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResponseWithContinuationVirtualNetworkIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResponseWithContinuationVirtualNetworkIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6242,6 +7066,11 @@ func (iter ResponseWithContinuationVirtualNetworkIterator) Value() VirtualNetwor
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResponseWithContinuationVirtualNetworkIterator type.
+func NewResponseWithContinuationVirtualNetworkIterator(page ResponseWithContinuationVirtualNetworkPage) ResponseWithContinuationVirtualNetworkIterator {
+ return ResponseWithContinuationVirtualNetworkIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rwcVn ResponseWithContinuationVirtualNetwork) IsEmpty() bool {
return rwcVn.Value == nil || len(*rwcVn.Value) == 0
@@ -6249,11 +7078,11 @@ func (rwcVn ResponseWithContinuationVirtualNetwork) IsEmpty() bool {
// responseWithContinuationVirtualNetworkPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rwcVn ResponseWithContinuationVirtualNetwork) responseWithContinuationVirtualNetworkPreparer() (*http.Request, error) {
+func (rwcVn ResponseWithContinuationVirtualNetwork) responseWithContinuationVirtualNetworkPreparer(ctx context.Context) (*http.Request, error) {
if rwcVn.NextLink == nil || len(to.String(rwcVn.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rwcVn.NextLink)))
@@ -6261,14 +7090,24 @@ func (rwcVn ResponseWithContinuationVirtualNetwork) responseWithContinuationVirt
// ResponseWithContinuationVirtualNetworkPage contains a page of VirtualNetwork values.
type ResponseWithContinuationVirtualNetworkPage struct {
- fn func(ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)
+ fn func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)
rwcvn ResponseWithContinuationVirtualNetwork
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResponseWithContinuationVirtualNetworkPage) Next() error {
- next, err := page.fn(page.rwcvn)
+func (page *ResponseWithContinuationVirtualNetworkPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResponseWithContinuationVirtualNetworkPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rwcvn)
if err != nil {
return err
}
@@ -6276,6 +7115,13 @@ func (page *ResponseWithContinuationVirtualNetworkPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResponseWithContinuationVirtualNetworkPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResponseWithContinuationVirtualNetworkPage) NotDone() bool {
return !page.rwcvn.IsEmpty()
@@ -6294,6 +7140,11 @@ func (page ResponseWithContinuationVirtualNetworkPage) Values() []VirtualNetwork
return *page.rwcvn.Value
}
+// Creates a new instance of the ResponseWithContinuationVirtualNetworkPage type.
+func NewResponseWithContinuationVirtualNetworkPage(getNextPage func(context.Context, ResponseWithContinuationVirtualNetwork) (ResponseWithContinuationVirtualNetwork, error)) ResponseWithContinuationVirtualNetworkPage {
+ return ResponseWithContinuationVirtualNetworkPage{fn: getNextPage}
+}
+
// RetargetScheduleProperties properties for retargeting a virtual machine schedule.
type RetargetScheduleProperties struct {
// CurrentResourceID - The resource Id of the virtual machine on which the schedule operates
@@ -6571,7 +7422,8 @@ type SchedulePropertiesFragment struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
-// SchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SchedulesExecuteFuture struct {
azure.Future
}
@@ -6754,22 +7606,22 @@ func (sr ServiceRunner) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// SharedPublicIPAddressConfiguration properties of a virtual machine that determine how it is connected to a load
-// balancer.
+// SharedPublicIPAddressConfiguration properties of a virtual machine that determine how it is connected to
+// a load balancer.
type SharedPublicIPAddressConfiguration struct {
// InboundNatRules - The incoming NAT rules
InboundNatRules *[]InboundNatRule `json:"inboundNatRules,omitempty"`
}
-// SharedPublicIPAddressConfigurationFragment properties of a virtual machine that determine how it is connected to
-// a load balancer.
+// SharedPublicIPAddressConfigurationFragment properties of a virtual machine that determine how it is
+// connected to a load balancer.
type SharedPublicIPAddressConfigurationFragment struct {
// InboundNatRules - The incoming NAT rules
InboundNatRules *[]InboundNatRuleFragment `json:"inboundNatRules,omitempty"`
}
-// ShutdownNotificationContent the contents of a shutdown notification. Webhooks can use this type to deserialize
-// the request body when they get notified of an imminent shutdown.
+// ShutdownNotificationContent the contents of a shutdown notification. Webhooks can use this type to
+// deserialize the request body when they get notified of an imminent shutdown.
type ShutdownNotificationContent struct {
// SkipURL - The URL to skip auto-shutdown.
SkipURL *string `json:"skipUrl,omitempty"`
@@ -7186,8 +8038,8 @@ type UserSecretStoreFragment struct {
KeyVaultID *string `json:"keyVaultId,omitempty"`
}
-// VirtualMachinesAddDataDiskFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesAddDataDiskFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesAddDataDiskFuture struct {
azure.Future
}
@@ -7209,8 +8061,8 @@ func (future *VirtualMachinesAddDataDiskFuture) Result(client VirtualMachinesCli
return
}
-// VirtualMachinesApplyArtifactsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesApplyArtifactsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesApplyArtifactsFuture struct {
azure.Future
}
@@ -7232,8 +8084,8 @@ func (future *VirtualMachinesApplyArtifactsFuture) Result(client VirtualMachines
return
}
-// VirtualMachineSchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachineSchedulesExecuteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachineSchedulesExecuteFuture struct {
azure.Future
}
@@ -7255,7 +8107,8 @@ func (future *VirtualMachineSchedulesExecuteFuture) Result(client VirtualMachine
return
}
-// VirtualMachinesClaimFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualMachinesClaimFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualMachinesClaimFuture struct {
azure.Future
}
@@ -7277,8 +8130,8 @@ func (future *VirtualMachinesClaimFuture) Result(client VirtualMachinesClient) (
return
}
-// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesCreateOrUpdateFuture struct {
azure.Future
}
@@ -7329,8 +8182,8 @@ func (future *VirtualMachinesDeleteFuture) Result(client VirtualMachinesClient)
return
}
-// VirtualMachinesDetachDataDiskFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualMachinesDetachDataDiskFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualMachinesDetachDataDiskFuture struct {
azure.Future
}
@@ -7352,7 +8205,8 @@ func (future *VirtualMachinesDetachDataDiskFuture) Result(client VirtualMachines
return
}
-// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualMachinesStartFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualMachinesStartFuture struct {
azure.Future
}
@@ -7374,7 +8228,8 @@ func (future *VirtualMachinesStartFuture) Result(client VirtualMachinesClient) (
return
}
-// VirtualMachinesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualMachinesStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualMachinesStopFuture struct {
azure.Future
}
@@ -7653,8 +8508,8 @@ type VirtualNetworkPropertiesFragment struct {
UniqueIdentifier *string `json:"uniqueIdentifier,omitempty"`
}
-// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go
index 00d689f3a33d..771b8421a920 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/notificationchannels.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewNotificationChannelsClientWithBaseURI(baseURI string, subscriptionID str
// name - the name of the notificationChannel.
// notificationChannel - a notification.
func (client NotificationChannelsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel NotificationChannel) (result NotificationChannel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.CreateOrUpdate")
+ 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: notificationChannel,
Constraints: []validation.Constraint{{Target: "notificationChannel.NotificationChannelProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -118,12 +129,22 @@ func (client NotificationChannelsClient) CreateOrUpdateResponder(resp *http.Resp
return
}
-// Delete delete notificationchannel.
+// Delete delete notification channel.
// Parameters:
// resourceGroupName - the name of the resource group.
// labName - the name of the lab.
// name - the name of the notificationChannel.
func (client NotificationChannelsClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.NotificationChannelsClient", "Delete", nil, "Failure preparing request")
@@ -186,13 +207,23 @@ func (client NotificationChannelsClient) DeleteResponder(resp *http.Response) (r
return
}
-// Get get notificationchannel.
+// Get get notification channels.
// Parameters:
// resourceGroupName - the name of the resource group.
// labName - the name of the lab.
// name - the name of the notificationChannel.
// expand - specify the $expand query. Example: 'properties($select=webHookUrl)'
func (client NotificationChannelsClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result NotificationChannel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.NotificationChannelsClient", "Get", nil, "Failure preparing request")
@@ -259,7 +290,7 @@ func (client NotificationChannelsClient) GetResponder(resp *http.Response) (resu
return
}
-// List list notificationchannels in a given lab.
+// List list notification channels in a given lab.
// Parameters:
// resourceGroupName - the name of the resource group.
// labName - the name of the lab.
@@ -268,6 +299,16 @@ func (client NotificationChannelsClient) GetResponder(resp *http.Response) (resu
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client NotificationChannelsClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationNotificationChannelPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcnc.Response.Response != nil {
+ sc = result.rwcnc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -344,8 +385,8 @@ func (client NotificationChannelsClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client NotificationChannelsClient) listNextResults(lastResults ResponseWithContinuationNotificationChannel) (result ResponseWithContinuationNotificationChannel, err error) {
- req, err := lastResults.responseWithContinuationNotificationChannelPreparer()
+func (client NotificationChannelsClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationNotificationChannel) (result ResponseWithContinuationNotificationChannel, err error) {
+ req, err := lastResults.responseWithContinuationNotificationChannelPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.NotificationChannelsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -366,6 +407,16 @@ func (client NotificationChannelsClient) listNextResults(lastResults ResponseWit
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client NotificationChannelsClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationNotificationChannelIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -377,6 +428,16 @@ func (client NotificationChannelsClient) ListComplete(ctx context.Context, resou
// name - the name of the notificationChannel.
// notifyParameters - properties for generating a Notification.
func (client NotificationChannelsClient) Notify(ctx context.Context, resourceGroupName string, labName string, name string, notifyParameters NotifyParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.Notify")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.NotifyPreparer(ctx, resourceGroupName, labName, name, notifyParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.NotificationChannelsClient", "Notify", nil, "Failure preparing request")
@@ -441,13 +502,23 @@ func (client NotificationChannelsClient) NotifyResponder(resp *http.Response) (r
return
}
-// Update modify properties of notificationchannels.
+// Update modify properties of notification channels.
// Parameters:
// resourceGroupName - the name of the resource group.
// labName - the name of the lab.
// name - the name of the notificationChannel.
// notificationChannel - a notification.
func (client NotificationChannelsClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, notificationChannel NotificationChannelFragment) (result NotificationChannel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationChannelsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, notificationChannel)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.NotificationChannelsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go
index d62f6736ae17..d03b53bf8d57 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// locationName - the name of the location.
// name - the name of the operation.
func (client OperationsClient) Get(ctx context.Context, locationName string, name string) (result OperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, locationName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.OperationsClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go
index 868bd2e12828..1e05eb3d7e5f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewPoliciesClientWithBaseURI(baseURI string, subscriptionID string) Policie
// name - the name of the policy.
// policy - a Policy.
func (client PoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy Policy) (result Policy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.CreateOrUpdate")
+ 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: policy,
Constraints: []validation.Constraint{{Target: "policy.PolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -127,6 +138,16 @@ func (client PoliciesClient) CreateOrUpdateResponder(resp *http.Response) (resul
// policySetName - the name of the policy set.
// name - the name of the policy.
func (client PoliciesClient) Delete(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, policySetName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.PoliciesClient", "Delete", nil, "Failure preparing request")
@@ -198,6 +219,16 @@ func (client PoliciesClient) DeleteResponder(resp *http.Response) (result autore
// name - the name of the policy.
// expand - specify the $expand query. Example: 'properties($select=description)'
func (client PoliciesClient) Get(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, expand string) (result Policy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, policySetName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.PoliciesClient", "Get", nil, "Failure preparing request")
@@ -275,6 +306,16 @@ func (client PoliciesClient) GetResponder(resp *http.Response) (result Policy, e
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client PoliciesClient) List(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationPolicyPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcp.Response.Response != nil {
+ sc = result.rwcp.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, policySetName, expand, filter, top, orderby)
if err != nil {
@@ -352,8 +393,8 @@ func (client PoliciesClient) ListResponder(resp *http.Response) (result Response
}
// listNextResults retrieves the next set of results, if any.
-func (client PoliciesClient) listNextResults(lastResults ResponseWithContinuationPolicy) (result ResponseWithContinuationPolicy, err error) {
- req, err := lastResults.responseWithContinuationPolicyPreparer()
+func (client PoliciesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationPolicy) (result ResponseWithContinuationPolicy, err error) {
+ req, err := lastResults.responseWithContinuationPolicyPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.PoliciesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -374,6 +415,16 @@ func (client PoliciesClient) listNextResults(lastResults ResponseWithContinuatio
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client PoliciesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, policySetName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationPolicyIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.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, resourceGroupName, labName, policySetName, expand, filter, top, orderby)
return
}
@@ -386,6 +437,16 @@ func (client PoliciesClient) ListComplete(ctx context.Context, resourceGroupName
// name - the name of the policy.
// policy - a Policy.
func (client PoliciesClient) Update(ctx context.Context, resourceGroupName string, labName string, policySetName string, name string, policy PolicyFragment) (result Policy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PoliciesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, policySetName, name, policy)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.PoliciesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go
index 12a8e75030df..6b43923f3a52 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/policysets.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewPolicySetsClientWithBaseURI(baseURI string, subscriptionID string) Polic
// name - the name of the policy set.
// evaluatePoliciesRequest - request body for evaluating a policy set.
func (client PolicySetsClient) EvaluatePolicies(ctx context.Context, resourceGroupName string, labName string, name string, evaluatePoliciesRequest EvaluatePoliciesRequest) (result EvaluatePoliciesResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicySetsClient.EvaluatePolicies")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.EvaluatePoliciesPreparer(ctx, resourceGroupName, labName, name, evaluatePoliciesRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.PolicySetsClient", "EvaluatePolicies", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go
index 8d20d3b6e01d..4fbc5ccaef5f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/provideroperations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewProviderOperationsClientWithBaseURI(baseURI string, subscriptionID strin
// List result of the request to list REST API operations
func (client ProviderOperationsClient) List(ctx context.Context) (result ProviderOperationResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.por.Response.Response != nil {
+ sc = result.por.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client ProviderOperationsClient) ListResponder(resp *http.Response) (resul
}
// listNextResults retrieves the next set of results, if any.
-func (client ProviderOperationsClient) listNextResults(lastResults ProviderOperationResult) (result ProviderOperationResult, err error) {
- req, err := lastResults.providerOperationResultPreparer()
+func (client ProviderOperationsClient) listNextResults(ctx context.Context, lastResults ProviderOperationResult) (result ProviderOperationResult, err error) {
+ req, err := lastResults.providerOperationResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.ProviderOperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client ProviderOperationsClient) listNextResults(lastResults ProviderOpera
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProviderOperationsClient) ListComplete(ctx context.Context) (result ProviderOperationResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
index 4ca911a3cbdc..2fd8908a08b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/schedules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewSchedulesClientWithBaseURI(baseURI string, subscriptionID string) Schedu
// name - the name of the schedule.
// schedule - a schedule.
func (client SchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, schedule Schedule) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.CreateOrUpdate")
+ 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: schedule,
Constraints: []validation.Constraint{{Target: "schedule.ScheduleProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -124,6 +135,16 @@ func (client SchedulesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// labName - the name of the lab.
// name - the name of the schedule.
func (client SchedulesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SchedulesClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client SchedulesClient) DeleteResponder(resp *http.Response) (result autor
// labName - the name of the lab.
// name - the name of the schedule.
func (client SchedulesClient) Execute(ctx context.Context, resourceGroupName string, labName string, name string) (result SchedulesExecuteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.Execute")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ExecutePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SchedulesClient", "Execute", nil, "Failure preparing request")
@@ -238,10 +269,6 @@ func (client SchedulesClient) ExecuteSender(req *http.Request) (future Schedules
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -265,6 +292,16 @@ func (client SchedulesClient) ExecuteResponder(resp *http.Response) (result auto
// name - the name of the schedule.
// expand - specify the $expand query. Example: 'properties($select=status)'
func (client SchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SchedulesClient", "Get", nil, "Failure preparing request")
@@ -340,6 +377,16 @@ func (client SchedulesClient) GetResponder(resp *http.Response) (result Schedule
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client SchedulesClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedulePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -416,8 +463,8 @@ func (client SchedulesClient) ListResponder(resp *http.Response) (result Respons
}
// listNextResults retrieves the next set of results, if any.
-func (client SchedulesClient) listNextResults(lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
- req, err := lastResults.responseWithContinuationSchedulePreparer()
+func (client SchedulesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
+ req, err := lastResults.responseWithContinuationSchedulePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.SchedulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -438,6 +485,16 @@ func (client SchedulesClient) listNextResults(lastResults ResponseWithContinuati
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SchedulesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationScheduleIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -448,6 +505,16 @@ func (client SchedulesClient) ListComplete(ctx context.Context, resourceGroupNam
// labName - the name of the lab.
// name - the name of the schedule.
func (client SchedulesClient) ListApplicable(ctx context.Context, resourceGroupName string, labName string, name string) (result ResponseWithContinuationSchedulePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.ListApplicable")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listApplicableNextResults
req, err := client.ListApplicablePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
@@ -513,8 +580,8 @@ func (client SchedulesClient) ListApplicableResponder(resp *http.Response) (resu
}
// listApplicableNextResults retrieves the next set of results, if any.
-func (client SchedulesClient) listApplicableNextResults(lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
- req, err := lastResults.responseWithContinuationSchedulePreparer()
+func (client SchedulesClient) listApplicableNextResults(ctx context.Context, lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
+ req, err := lastResults.responseWithContinuationSchedulePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.SchedulesClient", "listApplicableNextResults", nil, "Failure preparing next results request")
}
@@ -535,6 +602,16 @@ func (client SchedulesClient) listApplicableNextResults(lastResults ResponseWith
// ListApplicableComplete enumerates all values, automatically crossing page boundaries as required.
func (client SchedulesClient) ListApplicableComplete(ctx context.Context, resourceGroupName string, labName string, name string) (result ResponseWithContinuationScheduleIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.ListApplicable")
+ 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.ListApplicable(ctx, resourceGroupName, labName, name)
return
}
@@ -546,6 +623,16 @@ func (client SchedulesClient) ListApplicableComplete(ctx context.Context, resour
// name - the name of the schedule.
// schedule - a schedule.
func (client SchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchedulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, schedule)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SchedulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go
index 2200a20e916f..9793aa2e5ff3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/secrets.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewSecretsClientWithBaseURI(baseURI string, subscriptionID string) SecretsC
// name - the name of the secret.
// secret - a secret.
func (client SecretsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, userName string, name string, secret Secret) (result Secret, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretsClient.CreateOrUpdate")
+ 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: secret,
Constraints: []validation.Constraint{{Target: "secret.SecretProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -127,6 +138,16 @@ func (client SecretsClient) CreateOrUpdateResponder(resp *http.Response) (result
// userName - the name of the user profile.
// name - the name of the secret.
func (client SecretsClient) Delete(ctx context.Context, resourceGroupName string, labName string, userName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, userName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SecretsClient", "Delete", nil, "Failure preparing request")
@@ -198,6 +219,16 @@ func (client SecretsClient) DeleteResponder(resp *http.Response) (result autores
// name - the name of the secret.
// expand - specify the $expand query. Example: 'properties($select=value)'
func (client SecretsClient) Get(ctx context.Context, resourceGroupName string, labName string, userName string, name string, expand string) (result Secret, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, userName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.SecretsClient", "Get", nil, "Failure preparing request")
@@ -275,6 +306,16 @@ func (client SecretsClient) GetResponder(resp *http.Response) (result Secret, er
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client SecretsClient) List(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSecretPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretsClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, userName, expand, filter, top, orderby)
if err != nil {
@@ -352,8 +393,8 @@ func (client SecretsClient) ListResponder(resp *http.Response) (result ResponseW
}
// listNextResults retrieves the next set of results, if any.
-func (client SecretsClient) listNextResults(lastResults ResponseWithContinuationSecret) (result ResponseWithContinuationSecret, err error) {
- req, err := lastResults.responseWithContinuationSecretPreparer()
+func (client SecretsClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationSecret) (result ResponseWithContinuationSecret, err error) {
+ req, err := lastResults.responseWithContinuationSecretPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.SecretsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -374,6 +415,16 @@ func (client SecretsClient) listNextResults(lastResults ResponseWithContinuation
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SecretsClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, userName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSecretIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretsClient.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, resourceGroupName, labName, userName, expand, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go
index 657d0229bfe3..bc956cab64a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/servicerunners.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewServiceRunnersClientWithBaseURI(baseURI string, subscriptionID string) S
// name - the name of the service runner.
// serviceRunner - a container for a managed identity to execute DevTest lab services.
func (client ServiceRunnersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, serviceRunner ServiceRunner) (result ServiceRunner, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceRunnersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, labName, name, serviceRunner)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ServiceRunnersClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client ServiceRunnersClient) CreateOrUpdateResponder(resp *http.Response)
// labName - the name of the lab.
// name - the name of the service runner.
func (client ServiceRunnersClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceRunnersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ServiceRunnersClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client ServiceRunnersClient) DeleteResponder(resp *http.Response) (result
// labName - the name of the lab.
// name - the name of the service runner.
func (client ServiceRunnersClient) Get(ctx context.Context, resourceGroupName string, labName string, name string) (result ServiceRunner, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceRunnersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.ServiceRunnersClient", "Get", nil, "Failure preparing request")
@@ -256,6 +287,16 @@ func (client ServiceRunnersClient) GetResponder(resp *http.Response) (result Ser
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client ServiceRunnersClient) List(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderby string) (result ResponseWithContinuationServiceRunnerPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceRunnersClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcsr.Response.Response != nil {
+ sc = result.rwcsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, filter, top, orderby)
if err != nil {
@@ -329,8 +370,8 @@ func (client ServiceRunnersClient) ListResponder(resp *http.Response) (result Re
}
// listNextResults retrieves the next set of results, if any.
-func (client ServiceRunnersClient) listNextResults(lastResults ResponseWithContinuationServiceRunner) (result ResponseWithContinuationServiceRunner, err error) {
- req, err := lastResults.responseWithContinuationServiceRunnerPreparer()
+func (client ServiceRunnersClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationServiceRunner) (result ResponseWithContinuationServiceRunner, err error) {
+ req, err := lastResults.responseWithContinuationServiceRunnerPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.ServiceRunnersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -351,6 +392,16 @@ func (client ServiceRunnersClient) listNextResults(lastResults ResponseWithConti
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceRunnersClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, filter string, top *int32, orderby string) (result ResponseWithContinuationServiceRunnerIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceRunnersClient.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, resourceGroupName, labName, filter, top, orderby)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
index d15cba9c6179..4c0fd3ff2d56 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/users.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewUsersClientWithBaseURI(baseURI string, subscriptionID string) UsersClien
// name - the name of the user profile.
// userParameter - profile of a lab user.
func (client UsersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, userParameter User) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, labName, name, userParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.UsersClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client UsersClient) CreateOrUpdateResponder(resp *http.Response) (result U
// labName - the name of the lab.
// name - the name of the user profile.
func (client UsersClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result UsersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.UsersClient", "Delete", nil, "Failure preparing request")
@@ -163,10 +184,6 @@ func (client UsersClient) DeleteSender(req *http.Request) (future UsersDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -190,6 +207,16 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest.
// name - the name of the user profile.
// expand - specify the $expand query. Example: 'properties($select=identity)'
func (client UsersClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.UsersClient", "Get", nil, "Failure preparing request")
@@ -265,6 +292,16 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client UsersClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationUserPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcu.Response.Response != nil {
+ sc = result.rwcu.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -341,8 +378,8 @@ func (client UsersClient) ListResponder(resp *http.Response) (result ResponseWit
}
// listNextResults retrieves the next set of results, if any.
-func (client UsersClient) listNextResults(lastResults ResponseWithContinuationUser) (result ResponseWithContinuationUser, err error) {
- req, err := lastResults.responseWithContinuationUserPreparer()
+func (client UsersClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationUser) (result ResponseWithContinuationUser, err error) {
+ req, err := lastResults.responseWithContinuationUserPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.UsersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -363,6 +400,16 @@ func (client UsersClient) listNextResults(lastResults ResponseWithContinuationUs
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsersClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationUserIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -374,6 +421,16 @@ func (client UsersClient) ListComplete(ctx context.Context, resourceGroupName st
// name - the name of the user profile.
// userParameter - profile of a lab user.
func (client UsersClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, userParameter UserFragment) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, userParameter)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.UsersClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
index 25468038e0c8..412aad0403f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachines.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualMachinesClientWithBaseURI(baseURI string, subscriptionID string)
// name - the name of the virtual machine.
// dataDiskProperties - request body for adding a new or existing data disk to a virtual machine.
func (client VirtualMachinesClient) AddDataDisk(ctx context.Context, resourceGroupName string, labName string, name string, dataDiskProperties DataDiskProperties) (result VirtualMachinesAddDataDiskFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.AddDataDisk")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.AddDataDiskPreparer(ctx, resourceGroupName, labName, name, dataDiskProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "AddDataDisk", nil, "Failure preparing request")
@@ -95,10 +106,6 @@ func (client VirtualMachinesClient) AddDataDiskSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -122,6 +129,16 @@ func (client VirtualMachinesClient) AddDataDiskResponder(resp *http.Response) (r
// name - the name of the virtual machine.
// applyArtifactsRequest - request body for applying artifacts to a virtual machine.
func (client VirtualMachinesClient) ApplyArtifacts(ctx context.Context, resourceGroupName string, labName string, name string, applyArtifactsRequest ApplyArtifactsRequest) (result VirtualMachinesApplyArtifactsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ApplyArtifacts")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ApplyArtifactsPreparer(ctx, resourceGroupName, labName, name, applyArtifactsRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "ApplyArtifacts", nil, "Failure preparing request")
@@ -170,10 +187,6 @@ func (client VirtualMachinesClient) ApplyArtifactsSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -196,6 +209,16 @@ func (client VirtualMachinesClient) ApplyArtifactsResponder(resp *http.Response)
// labName - the name of the lab.
// name - the name of the virtual machine.
func (client VirtualMachinesClient) Claim(ctx context.Context, resourceGroupName string, labName string, name string) (result VirtualMachinesClaimFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Claim")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ClaimPreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Claim", nil, "Failure preparing request")
@@ -242,10 +265,6 @@ func (client VirtualMachinesClient) ClaimSender(req *http.Request) (future Virtu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -269,6 +288,16 @@ func (client VirtualMachinesClient) ClaimResponder(resp *http.Response) (result
// name - the name of the virtual machine.
// labVirtualMachine - a virtual machine.
func (client VirtualMachinesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachine) (result VirtualMachinesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: labVirtualMachine,
Constraints: []validation.Constraint{{Target: "labVirtualMachine.LabVirtualMachineProperties", Name: validation.Null, Rule: true,
@@ -332,10 +361,6 @@ func (client VirtualMachinesClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -359,6 +384,16 @@ func (client VirtualMachinesClient) CreateOrUpdateResponder(resp *http.Response)
// labName - the name of the lab.
// name - the name of the virtual machine.
func (client VirtualMachinesClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result VirtualMachinesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Delete", nil, "Failure preparing request")
@@ -405,10 +440,6 @@ func (client VirtualMachinesClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -432,6 +463,16 @@ func (client VirtualMachinesClient) DeleteResponder(resp *http.Response) (result
// name - the name of the virtual machine.
// detachDataDiskProperties - request body for detaching data disk from a virtual machine.
func (client VirtualMachinesClient) DetachDataDisk(ctx context.Context, resourceGroupName string, labName string, name string, detachDataDiskProperties DetachDataDiskProperties) (result VirtualMachinesDetachDataDiskFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.DetachDataDisk")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DetachDataDiskPreparer(ctx, resourceGroupName, labName, name, detachDataDiskProperties)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "DetachDataDisk", nil, "Failure preparing request")
@@ -480,10 +521,6 @@ func (client VirtualMachinesClient) DetachDataDiskSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -508,6 +545,16 @@ func (client VirtualMachinesClient) DetachDataDiskResponder(resp *http.Response)
// expand - specify the $expand query. Example:
// 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'
func (client VirtualMachinesClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result LabVirtualMachine, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Get", nil, "Failure preparing request")
@@ -584,6 +631,16 @@ func (client VirtualMachinesClient) GetResponder(resp *http.Response) (result La
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client VirtualMachinesClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabVirtualMachinePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwclvm.Response.Response != nil {
+ sc = result.rwclvm.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -660,8 +717,8 @@ func (client VirtualMachinesClient) ListResponder(resp *http.Response) (result R
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachinesClient) listNextResults(lastResults ResponseWithContinuationLabVirtualMachine) (result ResponseWithContinuationLabVirtualMachine, err error) {
- req, err := lastResults.responseWithContinuationLabVirtualMachinePreparer()
+func (client VirtualMachinesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationLabVirtualMachine) (result ResponseWithContinuationLabVirtualMachine, err error) {
+ req, err := lastResults.responseWithContinuationLabVirtualMachinePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -682,6 +739,16 @@ func (client VirtualMachinesClient) listNextResults(lastResults ResponseWithCont
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationLabVirtualMachineIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -692,6 +759,16 @@ func (client VirtualMachinesClient) ListComplete(ctx context.Context, resourceGr
// labName - the name of the lab.
// name - the name of the virtual machine.
func (client VirtualMachinesClient) ListApplicableSchedules(ctx context.Context, resourceGroupName string, labName string, name string) (result ApplicableSchedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.ListApplicableSchedules")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListApplicableSchedulesPreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "ListApplicableSchedules", nil, "Failure preparing request")
@@ -761,6 +838,16 @@ func (client VirtualMachinesClient) ListApplicableSchedulesResponder(resp *http.
// labName - the name of the lab.
// name - the name of the virtual machine.
func (client VirtualMachinesClient) Start(ctx context.Context, resourceGroupName string, labName string, name string) (result VirtualMachinesStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Start", nil, "Failure preparing request")
@@ -807,10 +894,6 @@ func (client VirtualMachinesClient) StartSender(req *http.Request) (future Virtu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -833,6 +916,16 @@ func (client VirtualMachinesClient) StartResponder(resp *http.Response) (result
// labName - the name of the lab.
// name - the name of the virtual machine.
func (client VirtualMachinesClient) Stop(ctx context.Context, resourceGroupName string, labName string, name string) (result VirtualMachinesStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Stop")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StopPreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Stop", nil, "Failure preparing request")
@@ -879,10 +972,6 @@ func (client VirtualMachinesClient) StopSender(req *http.Request) (future Virtua
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -906,6 +995,16 @@ func (client VirtualMachinesClient) StopResponder(resp *http.Response) (result a
// name - the name of the virtual machine.
// labVirtualMachine - a virtual machine.
func (client VirtualMachinesClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, labVirtualMachine LabVirtualMachineFragment) (result LabVirtualMachine, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachinesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, labVirtualMachine)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachinesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
index c6799a34be92..27c505f218fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualmachineschedules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewVirtualMachineSchedulesClientWithBaseURI(baseURI string, subscriptionID
// name - the name of the schedule.
// schedule - a schedule.
func (client VirtualMachineSchedulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule Schedule) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.CreateOrUpdate")
+ 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: schedule,
Constraints: []validation.Constraint{{Target: "schedule.ScheduleProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -127,6 +138,16 @@ func (client VirtualMachineSchedulesClient) CreateOrUpdateResponder(resp *http.R
// virtualMachineName - the name of the virtual machine.
// name - the name of the schedule.
func (client VirtualMachineSchedulesClient) Delete(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, virtualMachineName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesClient", "Delete", nil, "Failure preparing request")
@@ -197,6 +218,16 @@ func (client VirtualMachineSchedulesClient) DeleteResponder(resp *http.Response)
// virtualMachineName - the name of the virtual machine.
// name - the name of the schedule.
func (client VirtualMachineSchedulesClient) Execute(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string) (result VirtualMachineSchedulesExecuteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.Execute")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ExecutePreparer(ctx, resourceGroupName, labName, virtualMachineName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesClient", "Execute", nil, "Failure preparing request")
@@ -244,10 +275,6 @@ func (client VirtualMachineSchedulesClient) ExecuteSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -272,6 +299,16 @@ func (client VirtualMachineSchedulesClient) ExecuteResponder(resp *http.Response
// name - the name of the schedule.
// expand - specify the $expand query. Example: 'properties($select=status)'
func (client VirtualMachineSchedulesClient) Get(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, expand string) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, virtualMachineName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesClient", "Get", nil, "Failure preparing request")
@@ -349,6 +386,16 @@ func (client VirtualMachineSchedulesClient) GetResponder(resp *http.Response) (r
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client VirtualMachineSchedulesClient) List(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationSchedulePage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcs.Response.Response != nil {
+ sc = result.rwcs.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby)
if err != nil {
@@ -426,8 +473,8 @@ func (client VirtualMachineSchedulesClient) ListResponder(resp *http.Response) (
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualMachineSchedulesClient) listNextResults(lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
- req, err := lastResults.responseWithContinuationSchedulePreparer()
+func (client VirtualMachineSchedulesClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationSchedule) (result ResponseWithContinuationSchedule, err error) {
+ req, err := lastResults.responseWithContinuationSchedulePreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -448,6 +495,16 @@ func (client VirtualMachineSchedulesClient) listNextResults(lastResults Response
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualMachineSchedulesClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationScheduleIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.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, resourceGroupName, labName, virtualMachineName, expand, filter, top, orderby)
return
}
@@ -460,6 +517,16 @@ func (client VirtualMachineSchedulesClient) ListComplete(ctx context.Context, re
// name - the name of the schedule.
// schedule - a schedule.
func (client VirtualMachineSchedulesClient) Update(ctx context.Context, resourceGroupName string, labName string, virtualMachineName string, name string, schedule ScheduleFragment) (result Schedule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualMachineSchedulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, virtualMachineName, name, schedule)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualMachineSchedulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
index f0af59dfae8f..e07875c7a802 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/devtestlabs/mgmt/2016-05-15/dtl/virtualnetworks.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string)
// name - the name of the virtual network.
// virtualNetwork - a virtual network.
func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, labName, name, virtualNetwork)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -94,10 +105,6 @@ func (client VirtualNetworksClient) CreateOrUpdateSender(req *http.Request) (fut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -121,6 +128,16 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response)
// labName - the name of the lab.
// name - the name of the virtual network.
func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, labName string, name string) (result VirtualNetworksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, labName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Delete", nil, "Failure preparing request")
@@ -167,10 +184,6 @@ func (client VirtualNetworksClient) DeleteSender(req *http.Request) (future Virt
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -194,6 +207,16 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result
// name - the name of the virtual network.
// expand - specify the $expand query. Example: 'properties($expand=externalSubnets)'
func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, labName string, name string, expand string) (result VirtualNetwork, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, labName, name, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Get", nil, "Failure preparing request")
@@ -269,6 +292,16 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi
// top - the maximum number of resources to return from the operation.
// orderby - the ordering expression for the results, using OData notation.
func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationVirtualNetworkPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List")
+ defer func() {
+ sc := -1
+ if result.rwcvn.Response.Response != nil {
+ sc = result.rwcvn.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, labName, expand, filter, top, orderby)
if err != nil {
@@ -345,8 +378,8 @@ func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result R
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualNetworksClient) listNextResults(lastResults ResponseWithContinuationVirtualNetwork) (result ResponseWithContinuationVirtualNetwork, err error) {
- req, err := lastResults.responseWithContinuationVirtualNetworkPreparer()
+func (client VirtualNetworksClient) listNextResults(ctx context.Context, lastResults ResponseWithContinuationVirtualNetwork) (result ResponseWithContinuationVirtualNetwork, err error) {
+ req, err := lastResults.responseWithContinuationVirtualNetworkPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -367,6 +400,16 @@ func (client VirtualNetworksClient) listNextResults(lastResults ResponseWithCont
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string, labName string, expand string, filter string, top *int32, orderby string) (result ResponseWithContinuationVirtualNetworkIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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, resourceGroupName, labName, expand, filter, top, orderby)
return
}
@@ -378,6 +421,16 @@ func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGr
// name - the name of the virtual network.
// virtualNetwork - a virtual network.
func (client VirtualNetworksClient) Update(ctx context.Context, resourceGroupName string, labName string, name string, virtualNetwork VirtualNetworkFragment) (result VirtualNetwork, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, labName, name, virtualNetwork)
if err != nil {
err = autorest.NewErrorWithError(err, "dtl.VirtualNetworksClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
index 114f5909478e..cb84fb01fac8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/eventsubscriptions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -54,6 +55,16 @@ func NewEventSubscriptionsClientWithBaseURI(baseURI string, subscriptionID strin
// characters in length and should use alphanumeric letters only.
// eventSubscriptionInfo - event subscription properties containing the destination and filter information
func (client EventSubscriptionsClient) CreateOrUpdate(ctx context.Context, scope string, eventSubscriptionName string, eventSubscriptionInfo EventSubscription) (result EventSubscriptionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, scope, eventSubscriptionName, eventSubscriptionInfo)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -129,6 +140,16 @@ func (client EventSubscriptionsClient) CreateOrUpdateResponder(resp *http.Respon
// for an EventGrid topic.
// eventSubscriptionName - name of the event subscription
func (client EventSubscriptionsClient) Delete(ctx context.Context, scope string, eventSubscriptionName string) (result EventSubscriptionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, scope, eventSubscriptionName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Delete", nil, "Failure preparing request")
@@ -201,6 +222,16 @@ func (client EventSubscriptionsClient) DeleteResponder(resp *http.Response) (res
// for an EventGrid topic.
// eventSubscriptionName - name of the event subscription
func (client EventSubscriptionsClient) Get(ctx context.Context, scope string, eventSubscriptionName string) (result EventSubscription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, scope, eventSubscriptionName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Get", nil, "Failure preparing request")
@@ -274,6 +305,16 @@ func (client EventSubscriptionsClient) GetResponder(resp *http.Response) (result
// for an EventGrid topic.
// eventSubscriptionName - name of the event subscription
func (client EventSubscriptionsClient) GetFullURL(ctx context.Context, scope string, eventSubscriptionName string) (result EventSubscriptionFullURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.GetFullURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetFullURLPreparer(ctx, scope, eventSubscriptionName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "GetFullURL", nil, "Failure preparing request")
@@ -342,6 +383,16 @@ func (client EventSubscriptionsClient) GetFullURLResponder(resp *http.Response)
// resourceTypeName - name of the resource type
// resourceName - name of the resource
func (client EventSubscriptionsClient) ListByResource(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListByResource")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourcePreparer(ctx, resourceGroupName, providerNamespace, resourceTypeName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListByResource", nil, "Failure preparing request")
@@ -410,6 +461,16 @@ func (client EventSubscriptionsClient) ListByResourceResponder(resp *http.Respon
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription.
func (client EventSubscriptionsClient) ListGlobalByResourceGroup(ctx context.Context, resourceGroupName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListGlobalByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListGlobalByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroup", nil, "Failure preparing request")
@@ -477,6 +538,16 @@ func (client EventSubscriptionsClient) ListGlobalByResourceGroupResponder(resp *
// resourceGroupName - the name of the resource group within the user's subscription.
// topicTypeName - name of the topic type
func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, topicTypeName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListGlobalByResourceGroupForTopicType")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListGlobalByResourceGroupForTopicTypePreparer(ctx, resourceGroupName, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalByResourceGroupForTopicType", nil, "Failure preparing request")
@@ -541,6 +612,16 @@ func (client EventSubscriptionsClient) ListGlobalByResourceGroupForTopicTypeResp
// ListGlobalBySubscription list all aggregated global event subscriptions under a specific Azure subscription
func (client EventSubscriptionsClient) ListGlobalBySubscription(ctx context.Context) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListGlobalBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListGlobalBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscription", nil, "Failure preparing request")
@@ -606,6 +687,16 @@ func (client EventSubscriptionsClient) ListGlobalBySubscriptionResponder(resp *h
// Parameters:
// topicTypeName - name of the topic type
func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicType(ctx context.Context, topicTypeName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListGlobalBySubscriptionForTopicType")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListGlobalBySubscriptionForTopicTypePreparer(ctx, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListGlobalBySubscriptionForTopicType", nil, "Failure preparing request")
@@ -673,6 +764,16 @@ func (client EventSubscriptionsClient) ListGlobalBySubscriptionForTopicTypeRespo
// resourceGroupName - the name of the resource group within the user's subscription.
// location - name of the location
func (client EventSubscriptionsClient) ListRegionalByResourceGroup(ctx context.Context, resourceGroupName string, location string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListRegionalByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRegionalByResourceGroupPreparer(ctx, resourceGroupName, location)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroup", nil, "Failure preparing request")
@@ -742,6 +843,16 @@ func (client EventSubscriptionsClient) ListRegionalByResourceGroupResponder(resp
// location - name of the location
// topicTypeName - name of the topic type
func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicType(ctx context.Context, resourceGroupName string, location string, topicTypeName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListRegionalByResourceGroupForTopicType")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRegionalByResourceGroupForTopicTypePreparer(ctx, resourceGroupName, location, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalByResourceGroupForTopicType", nil, "Failure preparing request")
@@ -809,6 +920,16 @@ func (client EventSubscriptionsClient) ListRegionalByResourceGroupForTopicTypeRe
// Parameters:
// location - name of the location
func (client EventSubscriptionsClient) ListRegionalBySubscription(ctx context.Context, location string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListRegionalBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRegionalBySubscriptionPreparer(ctx, location)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscription", nil, "Failure preparing request")
@@ -876,6 +997,16 @@ func (client EventSubscriptionsClient) ListRegionalBySubscriptionResponder(resp
// location - name of the location
// topicTypeName - name of the topic type
func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicType(ctx context.Context, location string, topicTypeName string) (result EventSubscriptionsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.ListRegionalBySubscriptionForTopicType")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRegionalBySubscriptionForTopicTypePreparer(ctx, location, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "ListRegionalBySubscriptionForTopicType", nil, "Failure preparing request")
@@ -951,6 +1082,16 @@ func (client EventSubscriptionsClient) ListRegionalBySubscriptionForTopicTypeRes
// eventSubscriptionName - name of the event subscription to be created
// eventSubscriptionUpdateParameters - updated event subscription information
func (client EventSubscriptionsClient) Update(ctx context.Context, scope string, eventSubscriptionName string, eventSubscriptionUpdateParameters EventSubscriptionUpdateParameters) (result EventSubscriptionsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventSubscriptionsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, scope, eventSubscriptionName, eventSubscriptionUpdateParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.EventSubscriptionsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
index 4d4e60b85c0c..0e931f37207f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/models.go
@@ -24,6 +24,9 @@ import (
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid"
+
// EndpointType enumerates the values for endpoint type.
type EndpointType string
@@ -125,7 +128,8 @@ func PossibleTopicTypeProvisioningStateValues() []TopicTypeProvisioningState {
return []TopicTypeProvisioningState{TopicTypeProvisioningStateCanceled, TopicTypeProvisioningStateCreating, TopicTypeProvisioningStateDeleting, TopicTypeProvisioningStateFailed, TopicTypeProvisioningStateSucceeded, TopicTypeProvisioningStateUpdating}
}
-// EventHubEventSubscriptionDestination information about the event hub destination for an event subscription
+// EventHubEventSubscriptionDestination information about the event hub destination for an event
+// subscription
type EventHubEventSubscriptionDestination struct {
// EventHubEventSubscriptionDestinationProperties - Event Hub Properties of the event subscription destination
*EventHubEventSubscriptionDestinationProperties `json:"properties,omitempty"`
@@ -497,8 +501,8 @@ func (future *EventSubscriptionsCreateOrUpdateFuture) Result(client EventSubscri
return
}
-// EventSubscriptionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// EventSubscriptionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type EventSubscriptionsDeleteFuture struct {
azure.Future
}
@@ -527,8 +531,8 @@ type EventSubscriptionsListResult struct {
Value *[]EventSubscription `json:"value,omitempty"`
}
-// EventSubscriptionsUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// EventSubscriptionsUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type EventSubscriptionsUpdateFuture struct {
azure.Future
}
@@ -864,13 +868,14 @@ type TopicProperties struct {
Endpoint *string `json:"endpoint,omitempty"`
}
-// TopicRegenerateKeyRequest topic regenerate share access key key request
+// TopicRegenerateKeyRequest topic regenerate share access key request
type TopicRegenerateKeyRequest struct {
// KeyName - Key name to regenerate key1 or key2
KeyName *string `json:"keyName,omitempty"`
}
-// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// TopicsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type TopicsCreateOrUpdateFuture struct {
azure.Future
}
@@ -1193,8 +1198,8 @@ func (whesd *WebHookEventSubscriptionDestination) UnmarshalJSON(body []byte) err
return nil
}
-// WebHookEventSubscriptionDestinationProperties information about the webhook destination properties for an event
-// subscription.
+// WebHookEventSubscriptionDestinationProperties information about the webhook destination properties for
+// an event subscription.
type WebHookEventSubscriptionDestinationProperties struct {
// EndpointURL - The URL that represents the endpoint of the destination of an event subscription.
EndpointURL *string `json:"endpointUrl,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go
index 0be33e3d5588..39d476869d00 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List list the available operations supported by the Microsoft.EventGrid resource provider
func (client OperationsClient) List(ctx context.Context) (result OperationsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
index 994d994d6988..38073512d5ee 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topics.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewTopicsClientWithBaseURI(baseURI string, subscriptionID string) TopicsCli
// topicName - name of the topic
// topicInfo - topic information
func (client TopicsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, topicName string, topicInfo Topic) (result TopicsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, topicName, topicInfo)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client TopicsClient) CreateOrUpdateResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group within the user's subscription.
// topicName - name of the topic
func (client TopicsClient) Delete(ctx context.Context, resourceGroupName string, topicName string) (result TopicsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, topicName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client TopicsClient) DeleteResponder(resp *http.Response) (result autorest
// resourceGroupName - the name of the resource group within the user's subscription.
// topicName - name of the topic
func (client TopicsClient) Get(ctx context.Context, resourceGroupName string, topicName string) (result Topic, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, topicName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Get", nil, "Failure preparing request")
@@ -247,6 +278,16 @@ func (client TopicsClient) GetResponder(resp *http.Response) (result Topic, err
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription.
func (client TopicsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result TopicsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -310,6 +351,16 @@ func (client TopicsClient) ListByResourceGroupResponder(resp *http.Response) (re
// ListBySubscription list all the topics under an Azure subscription
func (client TopicsClient) ListBySubscription(ctx context.Context) (result TopicsListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListBySubscription", nil, "Failure preparing request")
@@ -377,6 +428,16 @@ func (client TopicsClient) ListBySubscriptionResponder(resp *http.Response) (res
// resourceTypeName - name of the topic type
// resourceName - name of the topic
func (client TopicsClient) ListEventTypes(ctx context.Context, resourceGroupName string, providerNamespace string, resourceTypeName string, resourceName string) (result EventTypesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.ListEventTypes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListEventTypesPreparer(ctx, resourceGroupName, providerNamespace, resourceTypeName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListEventTypes", nil, "Failure preparing request")
@@ -446,6 +507,16 @@ func (client TopicsClient) ListEventTypesResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group within the user's subscription.
// topicName - name of the topic
func (client TopicsClient) ListSharedAccessKeys(ctx context.Context, resourceGroupName string, topicName string) (result TopicSharedAccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.ListSharedAccessKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListSharedAccessKeysPreparer(ctx, resourceGroupName, topicName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "ListSharedAccessKeys", nil, "Failure preparing request")
@@ -514,6 +585,16 @@ func (client TopicsClient) ListSharedAccessKeysResponder(resp *http.Response) (r
// topicName - name of the topic
// regenerateKeyRequest - request body to regenerate key
func (client TopicsClient) RegenerateKey(ctx context.Context, resourceGroupName string, topicName string, regenerateKeyRequest TopicRegenerateKeyRequest) (result TopicSharedAccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.RegenerateKey")
+ 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: regenerateKeyRequest,
Constraints: []validation.Constraint{{Target: "regenerateKeyRequest.KeyName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -590,6 +671,16 @@ func (client TopicsClient) RegenerateKeyResponder(resp *http.Response) (result T
// topicName - name of the topic
// topicUpdateParameters - topic update information
func (client TopicsClient) Update(ctx context.Context, resourceGroupName string, topicName string, topicUpdateParameters TopicUpdateParameters) (result TopicsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, topicName, topicUpdateParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go
index 46adad4ad74b..a19cd7c0fefd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventgrid/mgmt/2018-01-01/eventgrid/topictypes.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewTopicTypesClientWithBaseURI(baseURI string, subscriptionID string) Topic
// Parameters:
// topicTypeName - name of the topic type
func (client TopicTypesClient) Get(ctx context.Context, topicTypeName string) (result TopicTypeInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicTypesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "Get", nil, "Failure preparing request")
@@ -105,6 +116,16 @@ func (client TopicTypesClient) GetResponder(resp *http.Response) (result TopicTy
// List list all registered topic types
func (client TopicTypesClient) List(ctx context.Context) (result TopicTypesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicTypesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "List", nil, "Failure preparing request")
@@ -165,6 +186,16 @@ func (client TopicTypesClient) ListResponder(resp *http.Response) (result TopicT
// Parameters:
// topicTypeName - name of the topic type
func (client TopicTypesClient) ListEventTypes(ctx context.Context, topicTypeName string) (result EventTypesListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopicTypesClient.ListEventTypes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListEventTypesPreparer(ctx, topicTypeName)
if err != nil {
err = autorest.NewErrorWithError(err, "eventgrid.TopicTypesClient", "ListEventTypes", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
index 95869944dd81..e3dbb0bf846f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/consumergroups.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewConsumerGroupsClientWithBaseURI(baseURI string, subscriptionID string) C
// consumerGroupName - the consumer group name
// parameters - parameters supplied to create or update a consumer group resource.
func (client ConsumerGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string, parameters ConsumerGroup) (result ConsumerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupsClient.CreateOrUpdate")
+ 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},
@@ -136,6 +147,16 @@ func (client ConsumerGroupsClient) CreateOrUpdateResponder(resp *http.Response)
// eventHubName - the Event Hub name
// consumerGroupName - the consumer group name
func (client ConsumerGroupsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupsClient.Delete")
+ 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},
@@ -221,6 +242,16 @@ func (client ConsumerGroupsClient) DeleteResponder(resp *http.Response) (result
// eventHubName - the Event Hub name
// consumerGroupName - the consumer group name
func (client ConsumerGroupsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, consumerGroupName string) (result ConsumerGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupsClient.Get")
+ 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},
@@ -311,6 +342,16 @@ func (client ConsumerGroupsClient) GetResponder(resp *http.Response) (result Con
// starting point to use for subsequent calls.
// top - may be used to limit the number of results to the most recent N usageDetails.
func (client ConsumerGroupsClient) ListByEventHub(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result ConsumerGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupsClient.ListByEventHub")
+ defer func() {
+ sc := -1
+ if result.cglr.Response.Response != nil {
+ sc = result.cglr.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},
@@ -404,8 +445,8 @@ func (client ConsumerGroupsClient) ListByEventHubResponder(resp *http.Response)
}
// listByEventHubNextResults retrieves the next set of results, if any.
-func (client ConsumerGroupsClient) listByEventHubNextResults(lastResults ConsumerGroupListResult) (result ConsumerGroupListResult, err error) {
- req, err := lastResults.consumerGroupListResultPreparer()
+func (client ConsumerGroupsClient) listByEventHubNextResults(ctx context.Context, lastResults ConsumerGroupListResult) (result ConsumerGroupListResult, err error) {
+ req, err := lastResults.consumerGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.ConsumerGroupsClient", "listByEventHubNextResults", nil, "Failure preparing next results request")
}
@@ -426,6 +467,16 @@ func (client ConsumerGroupsClient) listByEventHubNextResults(lastResults Consume
// ListByEventHubComplete enumerates all values, automatically crossing page boundaries as required.
func (client ConsumerGroupsClient) ListByEventHubComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, skip *int32, top *int32) (result ConsumerGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupsClient.ListByEventHub")
+ 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.ListByEventHub(ctx, resourceGroupName, namespaceName, eventHubName, skip, top)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go
index 9e3e1dfca2d4..57856c91ec6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/disasterrecoveryconfigs.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDisasterRecoveryConfigsClientWithBaseURI(baseURI string, subscriptionID
// namespaceName - the Namespace name
// alias - the Disaster Recovery configuration name
func (client DisasterRecoveryConfigsClient) BreakPairing(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.BreakPairing")
+ 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},
@@ -128,6 +139,16 @@ func (client DisasterRecoveryConfigsClient) BreakPairingResponder(resp *http.Res
// namespaceName - the Namespace name
// parameters - parameters to check availability of the given Alias name
func (client DisasterRecoveryConfigsClient) CheckNameAvailability(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckNameAvailabilityParameter) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.CheckNameAvailability")
+ 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},
@@ -211,6 +232,16 @@ func (client DisasterRecoveryConfigsClient) CheckNameAvailabilityResponder(resp
// alias - the Disaster Recovery configuration name
// parameters - parameters required to create an Alias(Disaster Recovery configuration)
func (client DisasterRecoveryConfigsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, alias string, parameters ArmDisasterRecovery) (result ArmDisasterRecovery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.CreateOrUpdate")
+ 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},
@@ -295,6 +326,16 @@ func (client DisasterRecoveryConfigsClient) CreateOrUpdateResponder(resp *http.R
// namespaceName - the Namespace name
// alias - the Disaster Recovery configuration name
func (client DisasterRecoveryConfigsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.Delete")
+ 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},
@@ -370,12 +411,22 @@ func (client DisasterRecoveryConfigsClient) DeleteResponder(resp *http.Response)
return
}
-// FailOver envokes GEO DR failover and reconfigure the alias to point to the secondary namespace
+// FailOver invokes GEO DR failover and reconfigure the alias to point to the secondary namespace
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
// alias - the Disaster Recovery configuration name
func (client DisasterRecoveryConfigsClient) FailOver(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.FailOver")
+ 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},
@@ -457,6 +508,16 @@ func (client DisasterRecoveryConfigsClient) FailOverResponder(resp *http.Respons
// namespaceName - the Namespace name
// alias - the Disaster Recovery configuration name
func (client DisasterRecoveryConfigsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result ArmDisasterRecovery, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.Get")
+ 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},
@@ -540,6 +601,16 @@ func (client DisasterRecoveryConfigsClient) GetResponder(resp *http.Response) (r
// alias - the Disaster Recovery configuration name
// authorizationRuleName - the authorization rule name.
func (client DisasterRecoveryConfigsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result AuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.GetAuthorizationRule")
+ 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},
@@ -624,6 +695,16 @@ func (client DisasterRecoveryConfigsClient) GetAuthorizationRuleResponder(resp *
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
func (client DisasterRecoveryConfigsClient) List(ctx context.Context, resourceGroupName string, namespaceName string) (result ArmDisasterRecoveryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.List")
+ defer func() {
+ sc := -1
+ if result.adrlr.Response.Response != nil {
+ sc = result.adrlr.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},
@@ -698,8 +779,8 @@ func (client DisasterRecoveryConfigsClient) ListResponder(resp *http.Response) (
}
// listNextResults retrieves the next set of results, if any.
-func (client DisasterRecoveryConfigsClient) listNextResults(lastResults ArmDisasterRecoveryListResult) (result ArmDisasterRecoveryListResult, err error) {
- req, err := lastResults.armDisasterRecoveryListResultPreparer()
+func (client DisasterRecoveryConfigsClient) listNextResults(ctx context.Context, lastResults ArmDisasterRecoveryListResult) (result ArmDisasterRecoveryListResult, err error) {
+ req, err := lastResults.armDisasterRecoveryListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.DisasterRecoveryConfigsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -720,6 +801,16 @@ func (client DisasterRecoveryConfigsClient) listNextResults(lastResults ArmDisas
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result ArmDisasterRecoveryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.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, resourceGroupName, namespaceName)
return
}
@@ -730,6 +821,16 @@ func (client DisasterRecoveryConfigsClient) ListComplete(ctx context.Context, re
// namespaceName - the Namespace name
// alias - the Disaster Recovery configuration name
func (client DisasterRecoveryConfigsClient) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result AuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.ListAuthorizationRules")
+ defer func() {
+ sc := -1
+ if result.arlr.Response.Response != nil {
+ sc = result.arlr.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},
@@ -808,8 +909,8 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesResponder(resp
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
-func (client DisasterRecoveryConfigsClient) listAuthorizationRulesNextResults(lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
- req, err := lastResults.authorizationRuleListResultPreparer()
+func (client DisasterRecoveryConfigsClient) listAuthorizationRulesNextResults(ctx context.Context, lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
+ req, err := lastResults.authorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.DisasterRecoveryConfigsClient", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
@@ -830,6 +931,16 @@ func (client DisasterRecoveryConfigsClient) listAuthorizationRulesNextResults(la
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, alias string) (result AuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.ListAuthorizationRules")
+ 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.ListAuthorizationRules(ctx, resourceGroupName, namespaceName, alias)
return
}
@@ -841,6 +952,16 @@ func (client DisasterRecoveryConfigsClient) ListAuthorizationRulesComplete(ctx c
// alias - the Disaster Recovery configuration name
// authorizationRuleName - the authorization rule name.
func (client DisasterRecoveryConfigsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, alias string, authorizationRuleName string) (result AccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DisasterRecoveryConfigsClient.ListKeys")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
index 4f553202a13e..bd9c049a66f8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/eventhubs.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewEventHubsClientWithBaseURI(baseURI string, subscriptionID string) EventH
// eventHubName - the Event Hub name
// parameters - parameters supplied to create an Event Hub resource.
func (client EventHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, parameters Model) (result Model, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.CreateOrUpdate")
+ 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},
@@ -149,6 +160,16 @@ func (client EventHubsClient) CreateOrUpdateResponder(resp *http.Response) (resu
// authorizationRuleName - the authorization rule name.
// parameters - the shared access AuthorizationRule.
func (client EventHubsClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.CreateOrUpdateAuthorizationRule")
+ 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},
@@ -238,6 +259,16 @@ func (client EventHubsClient) CreateOrUpdateAuthorizationRuleResponder(resp *htt
// namespaceName - the Namespace name
// eventHubName - the Event Hub name
func (client EventHubsClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.Delete")
+ 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},
@@ -319,6 +350,16 @@ func (client EventHubsClient) DeleteResponder(resp *http.Response) (result autor
// eventHubName - the Event Hub name
// authorizationRuleName - the authorization rule name.
func (client EventHubsClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.DeleteAuthorizationRule")
+ 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},
@@ -402,6 +443,16 @@ func (client EventHubsClient) DeleteAuthorizationRuleResponder(resp *http.Respon
// namespaceName - the Namespace name
// eventHubName - the Event Hub name
func (client EventHubsClient) Get(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result Model, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.Get")
+ 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},
@@ -484,6 +535,16 @@ func (client EventHubsClient) GetResponder(resp *http.Response) (result Model, e
// eventHubName - the Event Hub name
// authorizationRuleName - the authorization rule name.
func (client EventHubsClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result AuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.GetAuthorizationRule")
+ 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},
@@ -568,6 +629,16 @@ func (client EventHubsClient) GetAuthorizationRuleResponder(resp *http.Response)
// namespaceName - the Namespace name
// eventHubName - the Event Hub name
func (client EventHubsClient) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result AuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListAuthorizationRules")
+ defer func() {
+ sc := -1
+ if result.arlr.Response.Response != nil {
+ sc = result.arlr.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},
@@ -645,8 +716,8 @@ func (client EventHubsClient) ListAuthorizationRulesResponder(resp *http.Respons
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
-func (client EventHubsClient) listAuthorizationRulesNextResults(lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
- req, err := lastResults.authorizationRuleListResultPreparer()
+func (client EventHubsClient) listAuthorizationRulesNextResults(ctx context.Context, lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
+ req, err := lastResults.authorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
@@ -667,6 +738,16 @@ func (client EventHubsClient) listAuthorizationRulesNextResults(lastResults Auth
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client EventHubsClient) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string) (result AuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListAuthorizationRules")
+ 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.ListAuthorizationRules(ctx, resourceGroupName, namespaceName, eventHubName)
return
}
@@ -680,6 +761,16 @@ func (client EventHubsClient) ListAuthorizationRulesComplete(ctx context.Context
// starting point to use for subsequent calls.
// top - may be used to limit the number of results to the most recent N usageDetails.
func (client EventHubsClient) ListByNamespace(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListByNamespace")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.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},
@@ -770,8 +861,8 @@ func (client EventHubsClient) ListByNamespaceResponder(resp *http.Response) (res
}
// listByNamespaceNextResults retrieves the next set of results, if any.
-func (client EventHubsClient) listByNamespaceNextResults(lastResults ListResult) (result ListResult, err error) {
- req, err := lastResults.listResultPreparer()
+func (client EventHubsClient) listByNamespaceNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.EventHubsClient", "listByNamespaceNextResults", nil, "Failure preparing next results request")
}
@@ -792,6 +883,16 @@ func (client EventHubsClient) listByNamespaceNextResults(lastResults ListResult)
// ListByNamespaceComplete enumerates all values, automatically crossing page boundaries as required.
func (client EventHubsClient) ListByNamespaceComplete(ctx context.Context, resourceGroupName string, namespaceName string, skip *int32, top *int32) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListByNamespace")
+ 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.ListByNamespace(ctx, resourceGroupName, namespaceName, skip, top)
return
}
@@ -803,6 +904,16 @@ func (client EventHubsClient) ListByNamespaceComplete(ctx context.Context, resou
// eventHubName - the Event Hub name
// authorizationRuleName - the authorization rule name.
func (client EventHubsClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string) (result AccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.ListKeys")
+ 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},
@@ -889,6 +1000,16 @@ func (client EventHubsClient) ListKeysResponder(resp *http.Response) (result Acc
// authorizationRuleName - the authorization rule name.
// parameters - parameters supplied to regenerate the AuthorizationRule Keys (PrimaryKey/SecondaryKey).
func (client EventHubsClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, eventHubName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubsClient.RegenerateKeys")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
index 0cb524f67ec4..d27076d6f4b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/models.go
@@ -18,14 +18,19 @@ package eventhub
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub"
+
// AccessRights enumerates the values for access rights.
type AccessRights string
@@ -299,20 +304,31 @@ type ArmDisasterRecoveryListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ArmDisasterRecoveryListResultIterator provides access to a complete listing of ArmDisasterRecovery values.
+// ArmDisasterRecoveryListResultIterator provides access to a complete listing of ArmDisasterRecovery
+// values.
type ArmDisasterRecoveryListResultIterator struct {
i int
page ArmDisasterRecoveryListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ArmDisasterRecoveryListResultIterator) Next() error {
+func (iter *ArmDisasterRecoveryListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArmDisasterRecoveryListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -321,6 +337,13 @@ func (iter *ArmDisasterRecoveryListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ArmDisasterRecoveryListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ArmDisasterRecoveryListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -340,6 +363,11 @@ func (iter ArmDisasterRecoveryListResultIterator) Value() ArmDisasterRecovery {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ArmDisasterRecoveryListResultIterator type.
+func NewArmDisasterRecoveryListResultIterator(page ArmDisasterRecoveryListResultPage) ArmDisasterRecoveryListResultIterator {
+ return ArmDisasterRecoveryListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (adrlr ArmDisasterRecoveryListResult) IsEmpty() bool {
return adrlr.Value == nil || len(*adrlr.Value) == 0
@@ -347,11 +375,11 @@ func (adrlr ArmDisasterRecoveryListResult) IsEmpty() bool {
// armDisasterRecoveryListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (adrlr ArmDisasterRecoveryListResult) armDisasterRecoveryListResultPreparer() (*http.Request, error) {
+func (adrlr ArmDisasterRecoveryListResult) armDisasterRecoveryListResultPreparer(ctx context.Context) (*http.Request, error) {
if adrlr.NextLink == nil || len(to.String(adrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(adrlr.NextLink)))
@@ -359,14 +387,24 @@ func (adrlr ArmDisasterRecoveryListResult) armDisasterRecoveryListResultPreparer
// ArmDisasterRecoveryListResultPage contains a page of ArmDisasterRecovery values.
type ArmDisasterRecoveryListResultPage struct {
- fn func(ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error)
+ fn func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error)
adrlr ArmDisasterRecoveryListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ArmDisasterRecoveryListResultPage) Next() error {
- next, err := page.fn(page.adrlr)
+func (page *ArmDisasterRecoveryListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ArmDisasterRecoveryListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.adrlr)
if err != nil {
return err
}
@@ -374,6 +412,13 @@ func (page *ArmDisasterRecoveryListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ArmDisasterRecoveryListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ArmDisasterRecoveryListResultPage) NotDone() bool {
return !page.adrlr.IsEmpty()
@@ -392,12 +437,17 @@ func (page ArmDisasterRecoveryListResultPage) Values() []ArmDisasterRecovery {
return *page.adrlr.Value
}
+// Creates a new instance of the ArmDisasterRecoveryListResultPage type.
+func NewArmDisasterRecoveryListResultPage(getNextPage func(context.Context, ArmDisasterRecoveryListResult) (ArmDisasterRecoveryListResult, error)) ArmDisasterRecoveryListResultPage {
+ return ArmDisasterRecoveryListResultPage{fn: getNextPage}
+}
+
// ArmDisasterRecoveryProperties properties required to the Create Or Update Alias(Disaster Recovery
// configurations)
type ArmDisasterRecoveryProperties struct {
// ProvisioningState - Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: 'Accepted', 'Succeeded', 'Failed'
ProvisioningState ProvisioningStateDR `json:"provisioningState,omitempty"`
- // PartnerNamespace - ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairning
+ // PartnerNamespace - ARM Id of the Primary/Secondary eventhub namespace name, which is part of GEO DR pairing
PartnerNamespace *string `json:"partnerNamespace,omitempty"`
// AlternateName - Alternate name specified when alias and namespace names are same.
AlternateName *string `json:"alternateName,omitempty"`
@@ -504,14 +554,24 @@ type AuthorizationRuleListResultIterator struct {
page AuthorizationRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AuthorizationRuleListResultIterator) Next() error {
+func (iter *AuthorizationRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -520,6 +580,13 @@ func (iter *AuthorizationRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AuthorizationRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AuthorizationRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -539,6 +606,11 @@ func (iter AuthorizationRuleListResultIterator) Value() AuthorizationRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AuthorizationRuleListResultIterator type.
+func NewAuthorizationRuleListResultIterator(page AuthorizationRuleListResultPage) AuthorizationRuleListResultIterator {
+ return AuthorizationRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (arlr AuthorizationRuleListResult) IsEmpty() bool {
return arlr.Value == nil || len(*arlr.Value) == 0
@@ -546,11 +618,11 @@ func (arlr AuthorizationRuleListResult) IsEmpty() bool {
// authorizationRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (arlr AuthorizationRuleListResult) authorizationRuleListResultPreparer() (*http.Request, error) {
+func (arlr AuthorizationRuleListResult) authorizationRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if arlr.NextLink == nil || len(to.String(arlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(arlr.NextLink)))
@@ -558,14 +630,24 @@ func (arlr AuthorizationRuleListResult) authorizationRuleListResultPreparer() (*
// AuthorizationRuleListResultPage contains a page of AuthorizationRule values.
type AuthorizationRuleListResultPage struct {
- fn func(AuthorizationRuleListResult) (AuthorizationRuleListResult, error)
+ fn func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error)
arlr AuthorizationRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AuthorizationRuleListResultPage) Next() error {
- next, err := page.fn(page.arlr)
+func (page *AuthorizationRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.arlr)
if err != nil {
return err
}
@@ -573,6 +655,13 @@ func (page *AuthorizationRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AuthorizationRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AuthorizationRuleListResultPage) NotDone() bool {
return !page.arlr.IsEmpty()
@@ -591,6 +680,11 @@ func (page AuthorizationRuleListResultPage) Values() []AuthorizationRule {
return *page.arlr.Value
}
+// Creates a new instance of the AuthorizationRuleListResultPage type.
+func NewAuthorizationRuleListResultPage(getNextPage func(context.Context, AuthorizationRuleListResult) (AuthorizationRuleListResult, error)) AuthorizationRuleListResultPage {
+ return AuthorizationRuleListResultPage{fn: getNextPage}
+}
+
// AuthorizationRuleProperties properties supplied to create or update AuthorizationRule
type AuthorizationRuleProperties struct {
// Rights - The rights associated with the rule.
@@ -725,14 +819,24 @@ type ConsumerGroupListResultIterator struct {
page ConsumerGroupListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ConsumerGroupListResultIterator) Next() error {
+func (iter *ConsumerGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -741,6 +845,13 @@ func (iter *ConsumerGroupListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ConsumerGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ConsumerGroupListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -760,6 +871,11 @@ func (iter ConsumerGroupListResultIterator) Value() ConsumerGroup {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ConsumerGroupListResultIterator type.
+func NewConsumerGroupListResultIterator(page ConsumerGroupListResultPage) ConsumerGroupListResultIterator {
+ return ConsumerGroupListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cglr ConsumerGroupListResult) IsEmpty() bool {
return cglr.Value == nil || len(*cglr.Value) == 0
@@ -767,11 +883,11 @@ func (cglr ConsumerGroupListResult) IsEmpty() bool {
// consumerGroupListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cglr ConsumerGroupListResult) consumerGroupListResultPreparer() (*http.Request, error) {
+func (cglr ConsumerGroupListResult) consumerGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
if cglr.NextLink == nil || len(to.String(cglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cglr.NextLink)))
@@ -779,14 +895,24 @@ func (cglr ConsumerGroupListResult) consumerGroupListResultPreparer() (*http.Req
// ConsumerGroupListResultPage contains a page of ConsumerGroup values.
type ConsumerGroupListResultPage struct {
- fn func(ConsumerGroupListResult) (ConsumerGroupListResult, error)
+ fn func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error)
cglr ConsumerGroupListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ConsumerGroupListResultPage) Next() error {
- next, err := page.fn(page.cglr)
+func (page *ConsumerGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConsumerGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cglr)
if err != nil {
return err
}
@@ -794,6 +920,13 @@ func (page *ConsumerGroupListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ConsumerGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ConsumerGroupListResultPage) NotDone() bool {
return !page.cglr.IsEmpty()
@@ -812,13 +945,18 @@ func (page ConsumerGroupListResultPage) Values() []ConsumerGroup {
return *page.cglr.Value
}
+// Creates a new instance of the ConsumerGroupListResultPage type.
+func NewConsumerGroupListResultPage(getNextPage func(context.Context, ConsumerGroupListResult) (ConsumerGroupListResult, error)) ConsumerGroupListResultPage {
+ return ConsumerGroupListResultPage{fn: getNextPage}
+}
+
// ConsumerGroupProperties single item in List or Get Consumer group operation
type ConsumerGroupProperties struct {
// CreatedAt - Exact time the message was created.
CreatedAt *date.Time `json:"createdAt,omitempty"`
// UpdatedAt - The exact time the message was updated.
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
- // UserMetadata - Usermetadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
+ // UserMetadata - User Metadata is a placeholder to store user-defined string data with maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and their contact information also user-defined configuration settings can be stored.
UserMetadata *string `json:"userMetadata,omitempty"`
}
@@ -826,7 +964,7 @@ type ConsumerGroupProperties struct {
type Destination struct {
// Name - Name for capture destination
Name *string `json:"name,omitempty"`
- // DestinationProperties - Properties describing the storage account, blob container and acrchive anme format for capture destination
+ // DestinationProperties - Properties describing the storage account, blob container and archive name format for capture destination
*DestinationProperties `json:"properties,omitempty"`
}
@@ -875,8 +1013,8 @@ func (d *Destination) UnmarshalJSON(body []byte) error {
return nil
}
-// DestinationProperties properties describing the storage account, blob container and acrchive anme format for
-// capture destination
+// DestinationProperties properties describing the storage account, blob container and archive name format
+// for capture destination
type DestinationProperties struct {
// StorageAccountResourceID - Resource id of the storage account to be used to create the blobs
StorageAccountResourceID *string `json:"storageAccountResourceId,omitempty"`
@@ -1025,14 +1163,24 @@ type EHNamespaceListResultIterator struct {
page EHNamespaceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EHNamespaceListResultIterator) Next() error {
+func (iter *EHNamespaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EHNamespaceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1041,6 +1189,13 @@ func (iter *EHNamespaceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EHNamespaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EHNamespaceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1060,6 +1215,11 @@ func (iter EHNamespaceListResultIterator) Value() EHNamespace {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EHNamespaceListResultIterator type.
+func NewEHNamespaceListResultIterator(page EHNamespaceListResultPage) EHNamespaceListResultIterator {
+ return EHNamespaceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (enlr EHNamespaceListResult) IsEmpty() bool {
return enlr.Value == nil || len(*enlr.Value) == 0
@@ -1067,11 +1227,11 @@ func (enlr EHNamespaceListResult) IsEmpty() bool {
// eHNamespaceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (enlr EHNamespaceListResult) eHNamespaceListResultPreparer() (*http.Request, error) {
+func (enlr EHNamespaceListResult) eHNamespaceListResultPreparer(ctx context.Context) (*http.Request, error) {
if enlr.NextLink == nil || len(to.String(enlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(enlr.NextLink)))
@@ -1079,14 +1239,24 @@ func (enlr EHNamespaceListResult) eHNamespaceListResultPreparer() (*http.Request
// EHNamespaceListResultPage contains a page of EHNamespace values.
type EHNamespaceListResultPage struct {
- fn func(EHNamespaceListResult) (EHNamespaceListResult, error)
+ fn func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error)
enlr EHNamespaceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EHNamespaceListResultPage) Next() error {
- next, err := page.fn(page.enlr)
+func (page *EHNamespaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EHNamespaceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.enlr)
if err != nil {
return err
}
@@ -1094,6 +1264,13 @@ func (page *EHNamespaceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EHNamespaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EHNamespaceListResultPage) NotDone() bool {
return !page.enlr.IsEmpty()
@@ -1112,6 +1289,11 @@ func (page EHNamespaceListResultPage) Values() []EHNamespace {
return *page.enlr.Value
}
+// Creates a new instance of the EHNamespaceListResultPage type.
+func NewEHNamespaceListResultPage(getNextPage func(context.Context, EHNamespaceListResult) (EHNamespaceListResult, error)) EHNamespaceListResultPage {
+ return EHNamespaceListResultPage{fn: getNextPage}
+}
+
// EHNamespaceProperties namespace properties supplied for create namespace operation.
type EHNamespaceProperties struct {
// ProvisioningState - Provisioning state of the Namespace.
@@ -1126,12 +1308,14 @@ type EHNamespaceProperties struct {
MetricID *string `json:"metricId,omitempty"`
// IsAutoInflateEnabled - Value that indicates whether AutoInflate is enabled for eventhub namespace.
IsAutoInflateEnabled *bool `json:"isAutoInflateEnabled,omitempty"`
- // MaximumThroughputUnits - Upper limit of throughput units when AutoInflate is enabled, vaule should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)
+ // MaximumThroughputUnits - Upper limit of throughput units when AutoInflate is enabled, value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true)
MaximumThroughputUnits *int32 `json:"maximumThroughputUnits,omitempty"`
+ // KafkaEnabled - Value that indicates whether Kafka is enabled for eventhub namespace.
+ KafkaEnabled *bool `json:"kafkaEnabled,omitempty"`
}
-// ErrorResponse error reponse indicates EventHub service is not able to process the incoming request. The reason
-// is provided in the error message.
+// ErrorResponse error response indicates EventHub service is not able to process the incoming request. The
+// reason is provided in the error message.
type ErrorResponse struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
@@ -1154,14 +1338,24 @@ type ListResultIterator struct {
page ListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListResultIterator) Next() error {
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1170,6 +1364,13 @@ func (iter *ListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1189,6 +1390,11 @@ func (iter ListResultIterator) Value() Model {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lr ListResult) IsEmpty() bool {
return lr.Value == nil || len(*lr.Value) == 0
@@ -1196,11 +1402,11 @@ func (lr ListResult) IsEmpty() bool {
// listResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lr ListResult) listResultPreparer() (*http.Request, error) {
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lr.NextLink)))
@@ -1208,14 +1414,24 @@ func (lr ListResult) listResultPreparer() (*http.Request, error) {
// ListResultPage contains a page of Model values.
type ListResultPage struct {
- fn func(ListResult) (ListResult, error)
+ fn func(context.Context, ListResult) (ListResult, error)
lr ListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListResultPage) Next() error {
- next, err := page.fn(page.lr)
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
if err != nil {
return err
}
@@ -1223,6 +1439,13 @@ func (page *ListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListResultPage) NotDone() bool {
return !page.lr.IsEmpty()
@@ -1241,6 +1464,11 @@ func (page ListResultPage) Values() []Model {
return *page.lr.Value
}
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
// MessagingPlan messaging Plan for the namespace
type MessagingPlan struct {
autorest.Response `json:"-"`
@@ -1416,14 +1644,24 @@ type MessagingRegionsListResultIterator struct {
page MessagingRegionsListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *MessagingRegionsListResultIterator) Next() error {
+func (iter *MessagingRegionsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MessagingRegionsListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1432,6 +1670,13 @@ func (iter *MessagingRegionsListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *MessagingRegionsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter MessagingRegionsListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1451,6 +1696,11 @@ func (iter MessagingRegionsListResultIterator) Value() MessagingRegions {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the MessagingRegionsListResultIterator type.
+func NewMessagingRegionsListResultIterator(page MessagingRegionsListResultPage) MessagingRegionsListResultIterator {
+ return MessagingRegionsListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (mrlr MessagingRegionsListResult) IsEmpty() bool {
return mrlr.Value == nil || len(*mrlr.Value) == 0
@@ -1458,11 +1708,11 @@ func (mrlr MessagingRegionsListResult) IsEmpty() bool {
// messagingRegionsListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (mrlr MessagingRegionsListResult) messagingRegionsListResultPreparer() (*http.Request, error) {
+func (mrlr MessagingRegionsListResult) messagingRegionsListResultPreparer(ctx context.Context) (*http.Request, error) {
if mrlr.NextLink == nil || len(to.String(mrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(mrlr.NextLink)))
@@ -1470,14 +1720,24 @@ func (mrlr MessagingRegionsListResult) messagingRegionsListResultPreparer() (*ht
// MessagingRegionsListResultPage contains a page of MessagingRegions values.
type MessagingRegionsListResultPage struct {
- fn func(MessagingRegionsListResult) (MessagingRegionsListResult, error)
+ fn func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error)
mrlr MessagingRegionsListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *MessagingRegionsListResultPage) Next() error {
- next, err := page.fn(page.mrlr)
+func (page *MessagingRegionsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MessagingRegionsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.mrlr)
if err != nil {
return err
}
@@ -1485,6 +1745,13 @@ func (page *MessagingRegionsListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *MessagingRegionsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page MessagingRegionsListResultPage) NotDone() bool {
return !page.mrlr.IsEmpty()
@@ -1503,6 +1770,11 @@ func (page MessagingRegionsListResultPage) Values() []MessagingRegions {
return *page.mrlr.Value
}
+// Creates a new instance of the MessagingRegionsListResultPage type.
+func NewMessagingRegionsListResultPage(getNextPage func(context.Context, MessagingRegionsListResult) (MessagingRegionsListResult, error)) MessagingRegionsListResultPage {
+ return MessagingRegionsListResultPage{fn: getNextPage}
+}
+
// MessagingRegionsProperties ...
type MessagingRegionsProperties struct {
// Code - Region code
@@ -1593,8 +1865,8 @@ func (mVar *Model) UnmarshalJSON(body []byte) error {
return nil
}
-// NamespacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// NamespacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type NamespacesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1622,7 +1894,8 @@ func (future *NamespacesCreateOrUpdateFuture) Result(client NamespacesClient) (e
return
}
-// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type NamespacesDeleteFuture struct {
azure.Future
}
@@ -1662,8 +1935,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationListResult result of the request to list Event Hub operations. It contains a list of operations and a
-// URL link to get the next set of results.
+// OperationListResult result of the request to list Event Hub operations. It contains a list of operations
+// and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of Event Hub operations supported by the Microsoft.EventHub resource provider.
@@ -1678,14 +1951,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1694,6 +1977,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1713,6 +2003,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1720,11 +2015,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1732,14 +2027,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1747,6 +2052,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1765,6 +2077,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// Properties properties supplied to the Create Or Update Event Hub operation.
type Properties struct {
// PartitionIds - Current number of shards on the Event Hub.
@@ -1783,8 +2100,8 @@ type Properties struct {
CaptureDescription *CaptureDescription `json:"captureDescription,omitempty"`
}
-// RegenerateAccessKeyParameters parameters supplied to the Regenerate Authorization Rule operation, specifies
-// which key neeeds to be reset.
+// RegenerateAccessKeyParameters parameters supplied to the Regenerate Authorization Rule operation,
+// specifies which key needs to be reset.
type RegenerateAccessKeyParameters struct {
// KeyType - The access key to regenerate. Possible values include: 'PrimaryKey', 'SecondaryKey'
KeyType KeyType `json:"keyType,omitempty"`
@@ -1808,7 +2125,7 @@ type Sku struct {
Name SkuName `json:"name,omitempty"`
// Tier - The billing tier of this particular SKU. Possible values include: 'SkuTierBasic', 'SkuTierStandard'
Tier SkuTier `json:"tier,omitempty"`
- // Capacity - The Event Hubs throughput units, vaule should be 0 to 20 throughput units.
+ // Capacity - The Event Hubs throughput units, value should be 0 to 20 throughput units.
Capacity *int32 `json:"capacity,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
index fb7ed1ddff53..a67dfa1a4671 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/namespaces.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) Names
// Parameters:
// parameters - parameters to check availability of the given Namespace name
func (client NamespacesClient) CheckNameAvailability(ctx context.Context, parameters CheckNameAvailabilityParameter) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -119,6 +130,16 @@ func (client NamespacesClient) CheckNameAvailabilityResponder(resp *http.Respons
// namespaceName - the Namespace name
// parameters - parameters for creating a namespace resource.
func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters EHNamespace) (result NamespacesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CreateOrUpdate")
+ 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},
@@ -189,10 +210,6 @@ func (client NamespacesClient) CreateOrUpdateSender(req *http.Request) (future N
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -217,6 +234,16 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res
// authorizationRuleName - the authorization rule name.
// parameters - the shared access AuthorizationRule.
func (client NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CreateOrUpdateAuthorizationRule")
+ 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},
@@ -302,6 +329,16 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
func (client NamespacesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string) (result NamespacesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Delete")
+ 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},
@@ -357,10 +394,6 @@ func (client NamespacesClient) DeleteSender(req *http.Request) (future Namespace
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -383,6 +416,16 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto
// namespaceName - the Namespace name
// authorizationRuleName - the authorization rule name.
func (client NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.DeleteAuthorizationRule")
+ 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},
@@ -462,6 +505,16 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
func (client NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string) (result EHNamespace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Get")
+ 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},
@@ -540,6 +593,16 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result EHNames
// namespaceName - the Namespace name
// authorizationRuleName - the authorization rule name.
func (client NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.GetAuthorizationRule")
+ 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},
@@ -620,6 +683,16 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
func (client NamespacesClient) GetMessagingPlan(ctx context.Context, resourceGroupName string, namespaceName string) (result MessagingPlan, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.GetMessagingPlan")
+ 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},
@@ -694,6 +767,16 @@ func (client NamespacesClient) GetMessagingPlanResponder(resp *http.Response) (r
// List lists all the available Namespaces within a subscription, irrespective of the resource groups.
func (client NamespacesClient) List(ctx context.Context) (result EHNamespaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.List")
+ defer func() {
+ sc := -1
+ if result.enlr.Response.Response != nil {
+ sc = result.enlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -756,8 +839,8 @@ func (client NamespacesClient) ListResponder(resp *http.Response) (result EHName
}
// listNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listNextResults(lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) {
- req, err := lastResults.eHNamespaceListResultPreparer()
+func (client NamespacesClient) listNextResults(ctx context.Context, lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) {
+ req, err := lastResults.eHNamespaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -778,6 +861,16 @@ func (client NamespacesClient) listNextResults(lastResults EHNamespaceListResult
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListComplete(ctx context.Context) (result EHNamespaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.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
}
@@ -787,6 +880,16 @@ func (client NamespacesClient) ListComplete(ctx context.Context) (result EHNames
// resourceGroupName - name of the resource group within the azure subscription.
// namespaceName - the Namespace name
func (client NamespacesClient) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result AuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAuthorizationRules")
+ defer func() {
+ sc := -1
+ if result.arlr.Response.Response != nil {
+ sc = result.arlr.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},
@@ -861,8 +964,8 @@ func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Respon
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listAuthorizationRulesNextResults(lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
- req, err := lastResults.authorizationRuleListResultPreparer()
+func (client NamespacesClient) listAuthorizationRulesNextResults(ctx context.Context, lastResults AuthorizationRuleListResult) (result AuthorizationRuleListResult, err error) {
+ req, err := lastResults.authorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
@@ -883,6 +986,16 @@ func (client NamespacesClient) listAuthorizationRulesNextResults(lastResults Aut
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result AuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAuthorizationRules")
+ 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.ListAuthorizationRules(ctx, resourceGroupName, namespaceName)
return
}
@@ -891,6 +1004,16 @@ func (client NamespacesClient) ListAuthorizationRulesComplete(ctx context.Contex
// Parameters:
// resourceGroupName - name of the resource group within the azure subscription.
func (client NamespacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result EHNamespaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.enlr.Response.Response != nil {
+ sc = result.enlr.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},
@@ -961,8 +1084,8 @@ func (client NamespacesClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listByResourceGroupNextResults(lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) {
- req, err := lastResults.eHNamespaceListResultPreparer()
+func (client NamespacesClient) listByResourceGroupNextResults(ctx context.Context, lastResults EHNamespaceListResult) (result EHNamespaceListResult, err error) {
+ req, err := lastResults.eHNamespaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.NamespacesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -983,6 +1106,16 @@ func (client NamespacesClient) listByResourceGroupNextResults(lastResults EHName
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result EHNamespaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -993,6 +1126,16 @@ func (client NamespacesClient) ListByResourceGroupComplete(ctx context.Context,
// namespaceName - the Namespace name
// authorizationRuleName - the authorization rule name.
func (client NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result AccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListKeys")
+ 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},
@@ -1075,6 +1218,16 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Ac
// authorizationRuleName - the authorization rule name.
// parameters - parameters required to regenerate the connection string.
func (client NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.RegenerateKeys")
+ 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},
@@ -1159,6 +1312,16 @@ func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (res
// namespaceName - the Namespace name
// parameters - parameters for updating a namespace resource.
func (client NamespacesClient) Update(ctx context.Context, resourceGroupName string, namespaceName string, parameters EHNamespace) (result EHNamespace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go
index 783715385e9e..1df45dbd8d08 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Event Hub REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go
index 537abd1ec5ae..f2cbe8b73fda 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/eventhub/mgmt/2017-04-01/eventhub/regions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsC
// Parameters:
// sku - the sku type.
func (client RegionsClient) ListBySku(ctx context.Context, sku string) (result MessagingRegionsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListBySku")
+ defer func() {
+ sc := -1
+ if result.mrlr.Response.Response != nil {
+ sc = result.mrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: sku,
Constraints: []validation.Constraint{{Target: "sku", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -114,8 +125,8 @@ func (client RegionsClient) ListBySkuResponder(resp *http.Response) (result Mess
}
// listBySkuNextResults retrieves the next set of results, if any.
-func (client RegionsClient) listBySkuNextResults(lastResults MessagingRegionsListResult) (result MessagingRegionsListResult, err error) {
- req, err := lastResults.messagingRegionsListResultPreparer()
+func (client RegionsClient) listBySkuNextResults(ctx context.Context, lastResults MessagingRegionsListResult) (result MessagingRegionsListResult, err error) {
+ req, err := lastResults.messagingRegionsListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "eventhub.RegionsClient", "listBySkuNextResults", nil, "Failure preparing next results request")
}
@@ -136,6 +147,16 @@ func (client RegionsClient) listBySkuNextResults(lastResults MessagingRegionsLis
// ListBySkuComplete enumerates all values, automatically crossing page boundaries as required.
func (client RegionsClient) ListBySkuComplete(ctx context.Context, sku string) (result MessagingRegionsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListBySku")
+ 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.ListBySku(ctx, sku)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
index 61c0c5313ee9..fc6dfc571dcf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/applications.go
@@ -23,6 +23,7 @@ import (
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,7 +47,17 @@ func NewApplicationsClientWithBaseURI(baseURI string, tenantID string) Applicati
// applicationObjectID - the object ID of the application to which to add the owner.
// parameters - the URL of the owner object, such as
// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
-func (client ApplicationsClient) AddOwner(ctx context.Context, applicationObjectID string, parameters ApplicationAddOwnerParameters) (result autorest.Response, err error) {
+func (client ApplicationsClient) AddOwner(ctx context.Context, applicationObjectID string, parameters AddOwnerParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.AddOwner")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -75,7 +86,7 @@ func (client ApplicationsClient) AddOwner(ctx context.Context, applicationObject
}
// AddOwnerPreparer prepares the AddOwner request.
-func (client ApplicationsClient) AddOwnerPreparer(ctx context.Context, applicationObjectID string, parameters ApplicationAddOwnerParameters) (*http.Request, error) {
+func (client ApplicationsClient) AddOwnerPreparer(ctx context.Context, applicationObjectID string, parameters AddOwnerParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"applicationObjectId": autorest.Encode("path", applicationObjectID),
"tenantID": autorest.Encode("path", client.TenantID),
@@ -119,6 +130,16 @@ func (client ApplicationsClient) AddOwnerResponder(resp *http.Response) (result
// Parameters:
// parameters - the parameters for creating an application.
func (client ApplicationsClient) Create(ctx context.Context, parameters ApplicationCreateParameters) (result Application, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Create")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AvailableToOtherTenants", Name: validation.Null, Rule: true, Chain: nil},
@@ -193,6 +214,16 @@ func (client ApplicationsClient) CreateResponder(resp *http.Response) (result Ap
// Parameters:
// applicationObjectID - application object ID.
func (client ApplicationsClient) Delete(ctx context.Context, applicationObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, applicationObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Delete", nil, "Failure preparing request")
@@ -257,6 +288,16 @@ func (client ApplicationsClient) DeleteResponder(resp *http.Response) (result au
// Parameters:
// applicationObjectID - application object ID.
func (client ApplicationsClient) Get(ctx context.Context, applicationObjectID string) (result Application, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, applicationObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Get", nil, "Failure preparing request")
@@ -322,7 +363,17 @@ func (client ApplicationsClient) GetResponder(resp *http.Response) (result Appli
// Parameters:
// filter - the filters to apply to the operation.
func (client ApplicationsClient) List(ctx context.Context, filter string) (result ApplicationListResultPage, err error) {
- result.fn = func(lastResult ApplicationListResult) (ApplicationListResult, error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult ApplicationListResult) (ApplicationListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
return ApplicationListResult{}, nil
}
@@ -393,6 +444,16 @@ func (client ApplicationsClient) ListResponder(resp *http.Response) (result Appl
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationsClient) ListComplete(ctx context.Context, filter string) (result ApplicationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.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, filter)
return
}
@@ -401,6 +462,16 @@ func (client ApplicationsClient) ListComplete(ctx context.Context, filter string
// Parameters:
// applicationObjectID - application object ID.
func (client ApplicationsClient) ListKeyCredentials(ctx context.Context, applicationObjectID string) (result KeyCredentialListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListKeyCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListKeyCredentialsPreparer(ctx, applicationObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListKeyCredentials", nil, "Failure preparing request")
@@ -466,6 +537,16 @@ func (client ApplicationsClient) ListKeyCredentialsResponder(resp *http.Response
// Parameters:
// nextLink - next link for the list operation.
func (client ApplicationsClient) ListNext(ctx context.Context, nextLink string) (result ApplicationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListNext", nil, "Failure preparing request")
@@ -530,7 +611,18 @@ func (client ApplicationsClient) ListNextResponder(resp *http.Response) (result
// ListOwners the owners are a set of non-admin users who are allowed to modify this object.
// Parameters:
// applicationObjectID - the object ID of the application for which to get owners.
-func (client ApplicationsClient) ListOwners(ctx context.Context, applicationObjectID string) (result DirectoryObjectListResult, err error) {
+func (client ApplicationsClient) ListOwners(ctx context.Context, applicationObjectID string) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListOwners")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listOwnersNextResults
req, err := client.ListOwnersPreparer(ctx, applicationObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListOwners", nil, "Failure preparing request")
@@ -539,12 +631,12 @@ func (client ApplicationsClient) ListOwners(ctx context.Context, applicationObje
resp, err := client.ListOwnersSender(req)
if err != nil {
- result.Response = autorest.Response{Response: resp}
+ result.dolr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListOwners", resp, "Failure sending request")
return
}
- result, err = client.ListOwnersResponder(resp)
+ result.dolr, err = client.ListOwnersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListOwners", resp, "Failure responding to request")
}
@@ -592,10 +684,57 @@ func (client ApplicationsClient) ListOwnersResponder(resp *http.Response) (resul
return
}
+// listOwnersNextResults retrieves the next set of results, if any.
+func (client ApplicationsClient) listOwnersNextResults(ctx context.Context, lastResults DirectoryObjectListResult) (result DirectoryObjectListResult, err error) {
+ req, err := lastResults.directoryObjectListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "listOwnersNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOwnersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "listOwnersNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOwnersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "listOwnersNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOwnersComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ApplicationsClient) ListOwnersComplete(ctx context.Context, applicationObjectID string) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListOwners")
+ 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.ListOwners(ctx, applicationObjectID)
+ return
+}
+
// ListPasswordCredentials get the passwordCredentials associated with an application.
// Parameters:
// applicationObjectID - application object ID.
func (client ApplicationsClient) ListPasswordCredentials(ctx context.Context, applicationObjectID string) (result PasswordCredentialListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.ListPasswordCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPasswordCredentialsPreparer(ctx, applicationObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "ListPasswordCredentials", nil, "Failure preparing request")
@@ -662,6 +801,16 @@ func (client ApplicationsClient) ListPasswordCredentialsResponder(resp *http.Res
// applicationObjectID - application object ID.
// parameters - parameters to update an existing application.
func (client ApplicationsClient) Patch(ctx context.Context, applicationObjectID string, parameters ApplicationUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.Patch")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PatchPreparer(ctx, applicationObjectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "Patch", nil, "Failure preparing request")
@@ -724,11 +873,97 @@ func (client ApplicationsClient) PatchResponder(resp *http.Response) (result aut
return
}
+// RemoveOwner remove a member from owners.
+// Parameters:
+// applicationObjectID - the object ID of the application from which to remove the owner.
+// ownerObjectID - owner object id
+func (client ApplicationsClient) RemoveOwner(ctx context.Context, applicationObjectID string, ownerObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.RemoveOwner")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RemoveOwnerPreparer(ctx, applicationObjectID, ownerObjectID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "RemoveOwner", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RemoveOwnerSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "RemoveOwner", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RemoveOwnerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "RemoveOwner", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RemoveOwnerPreparer prepares the RemoveOwner request.
+func (client ApplicationsClient) RemoveOwnerPreparer(ctx context.Context, applicationObjectID string, ownerObjectID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationObjectId": autorest.Encode("path", applicationObjectID),
+ "ownerObjectId": autorest.Encode("path", ownerObjectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/applications/{applicationObjectId}/$links/owners/{ownerObjectId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RemoveOwnerSender sends the RemoveOwner request. The method will close the
+// http.Response Body if it receives an error.
+func (client ApplicationsClient) RemoveOwnerSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// RemoveOwnerResponder handles the response to the RemoveOwner request. The method always
+// closes the http.Response Body.
+func (client ApplicationsClient) RemoveOwnerResponder(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
+}
+
// UpdateKeyCredentials update the keyCredentials associated with an application.
// Parameters:
// applicationObjectID - application object ID.
// parameters - parameters to update the keyCredentials of an existing application.
func (client ApplicationsClient) UpdateKeyCredentials(ctx context.Context, applicationObjectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.UpdateKeyCredentials")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateKeyCredentialsPreparer(ctx, applicationObjectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "UpdateKeyCredentials", nil, "Failure preparing request")
@@ -796,6 +1031,16 @@ func (client ApplicationsClient) UpdateKeyCredentialsResponder(resp *http.Respon
// applicationObjectID - application object ID.
// parameters - parameters to update passwordCredentials of an existing application.
func (client ApplicationsClient) UpdatePasswordCredentials(ctx context.Context, applicationObjectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationsClient.UpdatePasswordCredentials")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePasswordCredentialsPreparer(ctx, applicationObjectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ApplicationsClient", "UpdatePasswordCredentials", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
new file mode 100644
index 000000000000..1107dff9599c
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/deletedapplications.go
@@ -0,0 +1,365 @@
+package graphrbac
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// DeletedApplicationsClient is the the Graph RBAC Management Client
+type DeletedApplicationsClient struct {
+ BaseClient
+}
+
+// NewDeletedApplicationsClient creates an instance of the DeletedApplicationsClient client.
+func NewDeletedApplicationsClient(tenantID string) DeletedApplicationsClient {
+ return NewDeletedApplicationsClientWithBaseURI(DefaultBaseURI, tenantID)
+}
+
+// NewDeletedApplicationsClientWithBaseURI creates an instance of the DeletedApplicationsClient client.
+func NewDeletedApplicationsClientWithBaseURI(baseURI string, tenantID string) DeletedApplicationsClient {
+ return DeletedApplicationsClient{NewWithBaseURI(baseURI, tenantID)}
+}
+
+// HardDelete hard-delete an application.
+// Parameters:
+// applicationObjectID - application object ID.
+func (client DeletedApplicationsClient) HardDelete(ctx context.Context, applicationObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedApplicationsClient.HardDelete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.HardDeletePreparer(ctx, applicationObjectID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "HardDelete", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.HardDeleteSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "HardDelete", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.HardDeleteResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "HardDelete", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// HardDeletePreparer prepares the HardDelete request.
+func (client DeletedApplicationsClient) HardDeletePreparer(ctx context.Context, applicationObjectID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "applicationObjectId": autorest.Encode("path", applicationObjectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/deletedApplications/{applicationObjectId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// HardDeleteSender sends the HardDelete request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeletedApplicationsClient) HardDeleteSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// HardDeleteResponder handles the response to the HardDelete request. The method always
+// closes the http.Response Body.
+func (client DeletedApplicationsClient) HardDeleteResponder(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
+}
+
+// List gets a list of deleted applications in the directory.
+// Parameters:
+// filter - the filter to apply to the operation.
+func (client DeletedApplicationsClient) List(ctx context.Context, filter string) (result ApplicationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedApplicationsClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult ApplicationListResult) (ApplicationListResult, error) {
+ if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
+ return ApplicationListResult{}, nil
+ }
+ return client.ListNext(ctx, *lastResult.OdataNextLink)
+ }
+ req, err := client.ListPreparer(ctx, filter)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.alr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.alr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client DeletedApplicationsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/deletedApplications", 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 DeletedApplicationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client DeletedApplicationsClient) ListResponder(resp *http.Response) (result ApplicationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client DeletedApplicationsClient) ListComplete(ctx context.Context, filter string) (result ApplicationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedApplicationsClient.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, filter)
+ return
+}
+
+// ListNext gets a list of deleted applications in the directory.
+// Parameters:
+// nextLink - next link for the list operation.
+func (client DeletedApplicationsClient) ListNext(ctx context.Context, nextLink string) (result ApplicationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedApplicationsClient.ListNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListNextPreparer(ctx, nextLink)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "ListNext", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListNextSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "ListNext", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListNextResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "ListNext", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListNextPreparer prepares the ListNext request.
+func (client DeletedApplicationsClient) ListNextPreparer(ctx context.Context, nextLink string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "nextLink": nextLink,
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/{nextLink}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListNextSender sends the ListNext request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeletedApplicationsClient) ListNextSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListNextResponder handles the response to the ListNext request. The method always
+// closes the http.Response Body.
+func (client DeletedApplicationsClient) ListNextResponder(resp *http.Response) (result ApplicationListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Restore restores the deleted application in the directory.
+// Parameters:
+// objectID - application object ID.
+func (client DeletedApplicationsClient) Restore(ctx context.Context, objectID string) (result Application, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedApplicationsClient.Restore")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RestorePreparer(ctx, objectID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "Restore", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RestoreSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "Restore", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RestoreResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.DeletedApplicationsClient", "Restore", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RestorePreparer prepares the Restore request.
+func (client DeletedApplicationsClient) RestorePreparer(ctx context.Context, objectID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "objectId": autorest.Encode("path", objectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsPost(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/deletedApplications/{objectId}/restore", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RestoreSender sends the Restore request. The method will close the
+// http.Response Body if it receives an error.
+func (client DeletedApplicationsClient) RestoreSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// RestoreResponder handles the response to the Restore request. The method always
+// closes the http.Response Body.
+func (client DeletedApplicationsClient) RestoreResponder(resp *http.Response) (result Application, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
index e6d990273f0d..e19a6fe06f39 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/domains.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewDomainsClientWithBaseURI(baseURI string, tenantID string) DomainsClient
// Parameters:
// domainName - name of the domain.
func (client DomainsClient) Get(ctx context.Context, domainName string) (result Domain, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DomainsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, domainName)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "Get", nil, "Failure preparing request")
@@ -108,6 +119,16 @@ func (client DomainsClient) GetResponder(resp *http.Response) (result Domain, er
// Parameters:
// filter - the filter to apply to the operation.
func (client DomainsClient) List(ctx context.Context, filter string) (result DomainListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DomainsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.DomainsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
index 9fbe85cbbd30..3f0e2097dda3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/groups.go
@@ -23,6 +23,7 @@ import (
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewGroupsClientWithBaseURI(baseURI string, tenantID string) GroupsClient {
// parameters - the URL of the member object, such as
// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
func (client GroupsClient) AddMember(ctx context.Context, groupObjectID string, parameters GroupAddMemberParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.AddMember")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -115,10 +126,104 @@ func (client GroupsClient) AddMemberResponder(resp *http.Response) (result autor
return
}
+// AddOwner add an owner to a group.
+// Parameters:
+// objectID - the object ID of the application to which to add the owner.
+// parameters - the URL of the owner object, such as
+// https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd.
+func (client GroupsClient) AddOwner(ctx context.Context, objectID string, parameters AddOwnerParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.AddOwner")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.URL", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("graphrbac.GroupsClient", "AddOwner", err.Error())
+ }
+
+ req, err := client.AddOwnerPreparer(ctx, objectID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "AddOwner", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.AddOwnerSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "AddOwner", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.AddOwnerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "AddOwner", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// AddOwnerPreparer prepares the AddOwner request.
+func (client GroupsClient) AddOwnerPreparer(ctx context.Context, objectID string, parameters AddOwnerParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "objectId": autorest.Encode("path", objectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ 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("/{tenantID}/groups/{objectId}/$links/owners", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// AddOwnerSender sends the AddOwner request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) AddOwnerSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// AddOwnerResponder handles the response to the AddOwner request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) AddOwnerResponder(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
+}
+
// Create create a group in the directory.
// Parameters:
// parameters - the parameters for the group to create.
func (client GroupsClient) Create(ctx context.Context, parameters GroupCreateParameters) (result ADGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Create")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.DisplayName", Name: validation.Null, Rule: true, Chain: nil},
@@ -194,6 +299,16 @@ func (client GroupsClient) CreateResponder(resp *http.Response) (result ADGroup,
// Parameters:
// objectID - the object ID of the group to delete.
func (client GroupsClient) Delete(ctx context.Context, objectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "Delete", nil, "Failure preparing request")
@@ -258,6 +373,16 @@ func (client GroupsClient) DeleteResponder(resp *http.Response) (result autorest
// Parameters:
// objectID - the object ID of the user for which to get group information.
func (client GroupsClient) Get(ctx context.Context, objectID string) (result ADGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "Get", nil, "Failure preparing request")
@@ -322,10 +447,20 @@ func (client GroupsClient) GetResponder(resp *http.Response) (result ADGroup, er
// GetGroupMembers gets the members of a group.
// Parameters:
// objectID - the object ID of the group whose members should be retrieved.
-func (client GroupsClient) GetGroupMembers(ctx context.Context, objectID string) (result GetObjectsResultPage, err error) {
- result.fn = func(lastResult GetObjectsResult) (GetObjectsResult, error) {
+func (client GroupsClient) GetGroupMembers(ctx context.Context, objectID string) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.GetGroupMembers")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult DirectoryObjectListResult) (DirectoryObjectListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
- return GetObjectsResult{}, nil
+ return DirectoryObjectListResult{}, nil
}
return client.GetGroupMembersNext(ctx, *lastResult.OdataNextLink)
}
@@ -337,12 +472,12 @@ func (client GroupsClient) GetGroupMembers(ctx context.Context, objectID string)
resp, err := client.GetGroupMembersSender(req)
if err != nil {
- result.gor.Response = autorest.Response{Response: resp}
+ result.dolr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetGroupMembers", resp, "Failure sending request")
return
}
- result.gor, err = client.GetGroupMembersResponder(resp)
+ result.dolr, err = client.GetGroupMembersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetGroupMembers", resp, "Failure responding to request")
}
@@ -379,7 +514,7 @@ func (client GroupsClient) GetGroupMembersSender(req *http.Request) (*http.Respo
// GetGroupMembersResponder handles the response to the GetGroupMembers request. The method always
// closes the http.Response Body.
-func (client GroupsClient) GetGroupMembersResponder(resp *http.Response) (result GetObjectsResult, err error) {
+func (client GroupsClient) GetGroupMembersResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -391,7 +526,17 @@ func (client GroupsClient) GetGroupMembersResponder(resp *http.Response) (result
}
// GetGroupMembersComplete enumerates all values, automatically crossing page boundaries as required.
-func (client GroupsClient) GetGroupMembersComplete(ctx context.Context, objectID string) (result GetObjectsResultIterator, err error) {
+func (client GroupsClient) GetGroupMembersComplete(ctx context.Context, objectID string) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.GetGroupMembers")
+ 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.GetGroupMembers(ctx, objectID)
return
}
@@ -399,7 +544,17 @@ func (client GroupsClient) GetGroupMembersComplete(ctx context.Context, objectID
// GetGroupMembersNext gets the members of a group.
// Parameters:
// nextLink - next link for the list operation.
-func (client GroupsClient) GetGroupMembersNext(ctx context.Context, nextLink string) (result GetObjectsResult, err error) {
+func (client GroupsClient) GetGroupMembersNext(ctx context.Context, nextLink string) (result DirectoryObjectListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.GetGroupMembersNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetGroupMembersNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "GetGroupMembersNext", nil, "Failure preparing request")
@@ -450,7 +605,7 @@ func (client GroupsClient) GetGroupMembersNextSender(req *http.Request) (*http.R
// GetGroupMembersNextResponder handles the response to the GetGroupMembersNext request. The method always
// closes the http.Response Body.
-func (client GroupsClient) GetGroupMembersNextResponder(resp *http.Response) (result GetObjectsResult, err error) {
+func (client GroupsClient) GetGroupMembersNextResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -466,6 +621,16 @@ func (client GroupsClient) GetGroupMembersNextResponder(resp *http.Response) (re
// objectID - the object ID of the group for which to get group membership.
// parameters - group filtering parameters.
func (client GroupsClient) GetMemberGroups(ctx context.Context, objectID string, parameters GroupGetMemberGroupsParameters) (result GroupGetMemberGroupsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.GetMemberGroups")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SecurityEnabledOnly", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -540,6 +705,16 @@ func (client GroupsClient) GetMemberGroupsResponder(resp *http.Response) (result
// Parameters:
// parameters - the check group membership parameters.
func (client GroupsClient) IsMemberOf(ctx context.Context, parameters CheckGroupMembershipParameters) (result CheckGroupMembershipResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.IsMemberOf")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.GroupID", Name: validation.Null, Rule: true, Chain: nil},
@@ -613,7 +788,17 @@ func (client GroupsClient) IsMemberOfResponder(resp *http.Response) (result Chec
// Parameters:
// filter - the filter to apply to the operation.
func (client GroupsClient) List(ctx context.Context, filter string) (result GroupListResultPage, err error) {
- result.fn = func(lastResult GroupListResult) (GroupListResult, error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.glr.Response.Response != nil {
+ sc = result.glr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult GroupListResult) (GroupListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
return GroupListResult{}, nil
}
@@ -684,6 +869,16 @@ func (client GroupsClient) ListResponder(resp *http.Response) (result GroupListR
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client GroupsClient) ListComplete(ctx context.Context, filter string) (result GroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.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, filter)
return
}
@@ -692,6 +887,16 @@ func (client GroupsClient) ListComplete(ctx context.Context, filter string) (res
// Parameters:
// nextLink - next link for the list operation.
func (client GroupsClient) ListNext(ctx context.Context, nextLink string) (result GroupListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.ListNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListNext", nil, "Failure preparing request")
@@ -753,11 +958,134 @@ func (client GroupsClient) ListNextResponder(resp *http.Response) (result GroupL
return
}
+// ListOwners the owners are a set of non-admin users who are allowed to modify this object.
+// Parameters:
+// objectID - the object ID of the group for which to get owners.
+func (client GroupsClient) ListOwners(ctx context.Context, objectID string) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.ListOwners")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listOwnersNextResults
+ req, err := client.ListOwnersPreparer(ctx, objectID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListOwners", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOwnersSender(req)
+ if err != nil {
+ result.dolr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListOwners", resp, "Failure sending request")
+ return
+ }
+
+ result.dolr, err = client.ListOwnersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "ListOwners", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOwnersPreparer prepares the ListOwners request.
+func (client GroupsClient) ListOwnersPreparer(ctx context.Context, objectID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "objectId": autorest.Encode("path", objectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/groups/{objectId}/owners", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOwnersSender sends the ListOwners request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) ListOwnersSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListOwnersResponder handles the response to the ListOwners request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) ListOwnersResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listOwnersNextResults retrieves the next set of results, if any.
+func (client GroupsClient) listOwnersNextResults(ctx context.Context, lastResults DirectoryObjectListResult) (result DirectoryObjectListResult, err error) {
+ req, err := lastResults.directoryObjectListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "listOwnersNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOwnersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "listOwnersNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOwnersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "listOwnersNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOwnersComplete enumerates all values, automatically crossing page boundaries as required.
+func (client GroupsClient) ListOwnersComplete(ctx context.Context, objectID string) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.ListOwners")
+ 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.ListOwners(ctx, objectID)
+ return
+}
+
// RemoveMember remove a member from a group.
// Parameters:
// groupObjectID - the object ID of the group from which to remove the member.
// memberObjectID - member object id
func (client GroupsClient) RemoveMember(ctx context.Context, groupObjectID string, memberObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.RemoveMember")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RemoveMemberPreparer(ctx, groupObjectID, memberObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveMember", nil, "Failure preparing request")
@@ -818,3 +1146,79 @@ func (client GroupsClient) RemoveMemberResponder(resp *http.Response) (result au
result.Response = resp
return
}
+
+// RemoveOwner remove a member from owners.
+// Parameters:
+// objectID - the object ID of the group from which to remove the owner.
+// ownerObjectID - owner object id
+func (client GroupsClient) RemoveOwner(ctx context.Context, objectID string, ownerObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupsClient.RemoveOwner")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.RemoveOwnerPreparer(ctx, objectID, ownerObjectID)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveOwner", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.RemoveOwnerSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveOwner", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.RemoveOwnerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.GroupsClient", "RemoveOwner", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// RemoveOwnerPreparer prepares the RemoveOwner request.
+func (client GroupsClient) RemoveOwnerPreparer(ctx context.Context, objectID string, ownerObjectID string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "objectId": autorest.Encode("path", objectID),
+ "ownerObjectId": autorest.Encode("path", ownerObjectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/groups/{objectId}/$links/owners/{ownerObjectId}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// RemoveOwnerSender sends the RemoveOwner request. The method will close the
+// http.Response Body if it receives an error.
+func (client GroupsClient) RemoveOwnerSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// RemoveOwnerResponder handles the response to the RemoveOwner request. The method always
+// closes the http.Response Body.
+func (client GroupsClient) RemoveOwnerResponder(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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
index aad11b313acb..66c76b8ef6dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/models.go
@@ -18,11 +18,18 @@ package graphrbac
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac"
+
// ObjectType enumerates the values for object type.
type ObjectType string
@@ -59,114 +66,28 @@ func PossibleUserTypeValues() []UserType {
return []UserType{Guest, Member}
}
-// AADObject the properties of an Active Directory object.
-type AADObject struct {
- autorest.Response `json:"-"`
+// AddOwnerParameters request parameters for adding a owner to an application.
+type AddOwnerParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
- // ObjectID - The ID of the object.
- ObjectID *string `json:"objectId,omitempty"`
- // ObjectType - The type of AAD object.
- ObjectType *string `json:"objectType,omitempty"`
- // DisplayName - The display name of the object.
- DisplayName *string `json:"displayName,omitempty"`
- // UserPrincipalName - The principal name of the object.
- UserPrincipalName *string `json:"userPrincipalName,omitempty"`
- // Mail - The primary email address of the object.
- Mail *string `json:"mail,omitempty"`
- // MailEnabled - Whether the AAD object is mail-enabled.
- MailEnabled *bool `json:"mailEnabled,omitempty"`
- // MailNickname - The mail alias for the user.
- MailNickname *string `json:"mailNickname,omitempty"`
- // SecurityEnabled - Whether the AAD object is security-enabled.
- SecurityEnabled *bool `json:"securityEnabled,omitempty"`
- // SignInName - The sign-in name of the object.
- SignInName *string `json:"signInName,omitempty"`
- // ServicePrincipalNames - A collection of service principal names associated with the object.
- ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
- // UserType - The user type of the object.
- UserType *string `json:"userType,omitempty"`
- // UsageLocation - A two letter country code (ISO standard 3166). Required for users that will be assigned licenses due to legal requirement to check for availability of services in countries. Examples include: "US", "JP", and "GB".
- UsageLocation *string `json:"usageLocation,omitempty"`
- // AppID - The application ID.
- AppID *string `json:"appId,omitempty"`
- // AppPermissions - The application permissions.
- AppPermissions *[]string `json:"appPermissions,omitempty"`
- // AvailableToOtherTenants - Whether the application is be available to other tenants.
- AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
- // IdentifierUris - A collection of URIs for the application.
- IdentifierUris *[]string `json:"identifierUris,omitempty"`
- // ReplyUrls - A collection of reply URLs for the application.
- ReplyUrls *[]string `json:"replyUrls,omitempty"`
- // Homepage - The home page of the application.
- Homepage *string `json:"homepage,omitempty"`
+ // URL - A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
+ URL *string `json:"url,omitempty"`
}
-// MarshalJSON is the custom marshaler for AADObject.
-func (ao AADObject) MarshalJSON() ([]byte, error) {
+// MarshalJSON is the custom marshaler for AddOwnerParameters.
+func (aop AddOwnerParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if ao.ObjectID != nil {
- objectMap["objectId"] = ao.ObjectID
- }
- if ao.ObjectType != nil {
- objectMap["objectType"] = ao.ObjectType
- }
- if ao.DisplayName != nil {
- objectMap["displayName"] = ao.DisplayName
- }
- if ao.UserPrincipalName != nil {
- objectMap["userPrincipalName"] = ao.UserPrincipalName
- }
- if ao.Mail != nil {
- objectMap["mail"] = ao.Mail
- }
- if ao.MailEnabled != nil {
- objectMap["mailEnabled"] = ao.MailEnabled
- }
- if ao.MailNickname != nil {
- objectMap["mailNickname"] = ao.MailNickname
- }
- if ao.SecurityEnabled != nil {
- objectMap["securityEnabled"] = ao.SecurityEnabled
- }
- if ao.SignInName != nil {
- objectMap["signInName"] = ao.SignInName
+ if aop.URL != nil {
+ objectMap["url"] = aop.URL
}
- if ao.ServicePrincipalNames != nil {
- objectMap["servicePrincipalNames"] = ao.ServicePrincipalNames
- }
- if ao.UserType != nil {
- objectMap["userType"] = ao.UserType
- }
- if ao.UsageLocation != nil {
- objectMap["usageLocation"] = ao.UsageLocation
- }
- if ao.AppID != nil {
- objectMap["appId"] = ao.AppID
- }
- if ao.AppPermissions != nil {
- objectMap["appPermissions"] = ao.AppPermissions
- }
- if ao.AvailableToOtherTenants != nil {
- objectMap["availableToOtherTenants"] = ao.AvailableToOtherTenants
- }
- if ao.IdentifierUris != nil {
- objectMap["identifierUris"] = ao.IdentifierUris
- }
- if ao.ReplyUrls != nil {
- objectMap["replyUrls"] = ao.ReplyUrls
- }
- if ao.Homepage != nil {
- objectMap["homepage"] = ao.Homepage
- }
- for k, v := range ao.AdditionalProperties {
+ for k, v := range aop.AdditionalProperties {
objectMap[k] = v
}
return json.Marshal(objectMap)
}
-// UnmarshalJSON is the custom unmarshaler for AADObject struct.
-func (ao *AADObject) UnmarshalJSON(body []byte) error {
+// UnmarshalJSON is the custom unmarshaler for AddOwnerParameters struct.
+func (aop *AddOwnerParameters) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
@@ -181,172 +102,19 @@ func (ao *AADObject) UnmarshalJSON(body []byte) error {
if err != nil {
return err
}
- if ao.AdditionalProperties == nil {
- ao.AdditionalProperties = make(map[string]interface{})
+ if aop.AdditionalProperties == nil {
+ aop.AdditionalProperties = make(map[string]interface{})
}
- ao.AdditionalProperties[k] = additionalProperties
+ aop.AdditionalProperties[k] = additionalProperties
}
- case "objectId":
- if v != nil {
- var objectID string
- err = json.Unmarshal(*v, &objectID)
- if err != nil {
- return err
- }
- ao.ObjectID = &objectID
- }
- case "objectType":
- if v != nil {
- var objectType string
- err = json.Unmarshal(*v, &objectType)
- if err != nil {
- return err
- }
- ao.ObjectType = &objectType
- }
- case "displayName":
- if v != nil {
- var displayName string
- err = json.Unmarshal(*v, &displayName)
- if err != nil {
- return err
- }
- ao.DisplayName = &displayName
- }
- case "userPrincipalName":
- if v != nil {
- var userPrincipalName string
- err = json.Unmarshal(*v, &userPrincipalName)
- if err != nil {
- return err
- }
- ao.UserPrincipalName = &userPrincipalName
- }
- case "mail":
- if v != nil {
- var mailVar string
- err = json.Unmarshal(*v, &mailVar)
- if err != nil {
- return err
- }
- ao.Mail = &mailVar
- }
- case "mailEnabled":
- if v != nil {
- var mailEnabled bool
- err = json.Unmarshal(*v, &mailEnabled)
- if err != nil {
- return err
- }
- ao.MailEnabled = &mailEnabled
- }
- case "mailNickname":
- if v != nil {
- var mailNickname string
- err = json.Unmarshal(*v, &mailNickname)
- if err != nil {
- return err
- }
- ao.MailNickname = &mailNickname
- }
- case "securityEnabled":
- if v != nil {
- var securityEnabled bool
- err = json.Unmarshal(*v, &securityEnabled)
- if err != nil {
- return err
- }
- ao.SecurityEnabled = &securityEnabled
- }
- case "signInName":
- if v != nil {
- var signInName string
- err = json.Unmarshal(*v, &signInName)
- if err != nil {
- return err
- }
- ao.SignInName = &signInName
- }
- case "servicePrincipalNames":
- if v != nil {
- var servicePrincipalNames []string
- err = json.Unmarshal(*v, &servicePrincipalNames)
- if err != nil {
- return err
- }
- ao.ServicePrincipalNames = &servicePrincipalNames
- }
- case "userType":
- if v != nil {
- var userType string
- err = json.Unmarshal(*v, &userType)
- if err != nil {
- return err
- }
- ao.UserType = &userType
- }
- case "usageLocation":
- if v != nil {
- var usageLocation string
- err = json.Unmarshal(*v, &usageLocation)
- if err != nil {
- return err
- }
- ao.UsageLocation = &usageLocation
- }
- case "appId":
- if v != nil {
- var appID string
- err = json.Unmarshal(*v, &appID)
- if err != nil {
- return err
- }
- ao.AppID = &appID
- }
- case "appPermissions":
- if v != nil {
- var appPermissions []string
- err = json.Unmarshal(*v, &appPermissions)
- if err != nil {
- return err
- }
- ao.AppPermissions = &appPermissions
- }
- case "availableToOtherTenants":
- if v != nil {
- var availableToOtherTenants bool
- err = json.Unmarshal(*v, &availableToOtherTenants)
- if err != nil {
- return err
- }
- ao.AvailableToOtherTenants = &availableToOtherTenants
- }
- case "identifierUris":
- if v != nil {
- var identifierUris []string
- err = json.Unmarshal(*v, &identifierUris)
- if err != nil {
- return err
- }
- ao.IdentifierUris = &identifierUris
- }
- case "replyUrls":
- if v != nil {
- var replyUrls []string
- err = json.Unmarshal(*v, &replyUrls)
- if err != nil {
- return err
- }
- ao.ReplyUrls = &replyUrls
- }
- case "homepage":
+ case "url":
if v != nil {
- var homepage string
- err = json.Unmarshal(*v, &homepage)
+ var URL string
+ err = json.Unmarshal(*v, &URL)
if err != nil {
return err
}
- ao.Homepage = &homepage
+ aop.URL = &URL
}
}
}
@@ -359,6 +127,10 @@ type ADGroup struct {
autorest.Response `json:"-"`
// DisplayName - The display name of the group.
DisplayName *string `json:"displayName,omitempty"`
+ // MailEnabled - Whether the group is mail-enabled. Must be false. This is because only pure security groups can be created using the Graph API.
+ MailEnabled *bool `json:"mailEnabled,omitempty"`
+ // MailNickname - The mail alias for the group.
+ MailNickname *string `json:"mailNickname,omitempty"`
// SecurityEnabled - Whether the group is security-enable.
SecurityEnabled *bool `json:"securityEnabled,omitempty"`
// Mail - The primary email address of the group.
@@ -380,6 +152,12 @@ func (ag ADGroup) MarshalJSON() ([]byte, error) {
if ag.DisplayName != nil {
objectMap["displayName"] = ag.DisplayName
}
+ if ag.MailEnabled != nil {
+ objectMap["mailEnabled"] = ag.MailEnabled
+ }
+ if ag.MailNickname != nil {
+ objectMap["mailNickname"] = ag.MailNickname
+ }
if ag.SecurityEnabled != nil {
objectMap["securityEnabled"] = ag.SecurityEnabled
}
@@ -449,6 +227,24 @@ func (ag *ADGroup) UnmarshalJSON(body []byte) error {
}
ag.DisplayName = &displayName
}
+ case "mailEnabled":
+ if v != nil {
+ var mailEnabled bool
+ err = json.Unmarshal(*v, &mailEnabled)
+ if err != nil {
+ return err
+ }
+ ag.MailEnabled = &mailEnabled
+ }
+ case "mailNickname":
+ if v != nil {
+ var mailNickname string
+ err = json.Unmarshal(*v, &mailNickname)
+ if err != nil {
+ return err
+ }
+ ag.MailNickname = &mailNickname
+ }
case "securityEnabled":
if v != nil {
var securityEnabled bool
@@ -517,6 +313,8 @@ type Application struct {
autorest.Response `json:"-"`
// AppID - The application ID.
AppID *string `json:"appId,omitempty"`
+ // AppRoles - The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
+ AppRoles *[]AppRole `json:"appRoles,omitempty"`
// AppPermissions - The application permissions.
AppPermissions *[]string `json:"appPermissions,omitempty"`
// AvailableToOtherTenants - Whether the application is be available to other tenants.
@@ -531,6 +329,12 @@ type Application struct {
Homepage *string `json:"homepage,omitempty"`
// Oauth2AllowImplicitFlow - Whether to allow implicit grant flow for OAuth2
Oauth2AllowImplicitFlow *bool `json:"oauth2AllowImplicitFlow,omitempty"`
+ // RequiredResourceAccess - Specifies resources that this application requires access to and the set of OAuth permission scopes and application roles that it needs under each of those resources. This pre-configuration of required resource access drives the consent experience.
+ RequiredResourceAccess *[]RequiredResourceAccess `json:"requiredResourceAccess,omitempty"`
+ // KeyCredentials - A collection of KeyCredential objects.
+ KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
+ // PasswordCredentials - A collection of PasswordCredential objects
+ PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
// ObjectID - The object ID.
@@ -548,6 +352,9 @@ func (a Application) MarshalJSON() ([]byte, error) {
if a.AppID != nil {
objectMap["appId"] = a.AppID
}
+ if a.AppRoles != nil {
+ objectMap["appRoles"] = a.AppRoles
+ }
if a.AppPermissions != nil {
objectMap["appPermissions"] = a.AppPermissions
}
@@ -569,6 +376,15 @@ func (a Application) MarshalJSON() ([]byte, error) {
if a.Oauth2AllowImplicitFlow != nil {
objectMap["oauth2AllowImplicitFlow"] = a.Oauth2AllowImplicitFlow
}
+ if a.RequiredResourceAccess != nil {
+ objectMap["requiredResourceAccess"] = a.RequiredResourceAccess
+ }
+ if a.KeyCredentials != nil {
+ objectMap["keyCredentials"] = a.KeyCredentials
+ }
+ if a.PasswordCredentials != nil {
+ objectMap["passwordCredentials"] = a.PasswordCredentials
+ }
if a.ObjectID != nil {
objectMap["objectId"] = a.ObjectID
}
@@ -632,6 +448,15 @@ func (a *Application) UnmarshalJSON(body []byte) error {
}
a.AppID = &appID
}
+ case "appRoles":
+ if v != nil {
+ var appRoles []AppRole
+ err = json.Unmarshal(*v, &appRoles)
+ if err != nil {
+ return err
+ }
+ a.AppRoles = &appRoles
+ }
case "appPermissions":
if v != nil {
var appPermissions []string
@@ -695,100 +520,71 @@ func (a *Application) UnmarshalJSON(body []byte) error {
}
a.Oauth2AllowImplicitFlow = &oauth2AllowImplicitFlow
}
- default:
+ case "requiredResourceAccess":
if v != nil {
- var additionalProperties interface{}
- err = json.Unmarshal(*v, &additionalProperties)
+ var requiredResourceAccess []RequiredResourceAccess
+ err = json.Unmarshal(*v, &requiredResourceAccess)
if err != nil {
return err
}
- if a.AdditionalProperties == nil {
- a.AdditionalProperties = make(map[string]interface{})
- }
- a.AdditionalProperties[k] = additionalProperties
+ a.RequiredResourceAccess = &requiredResourceAccess
}
- case "objectId":
+ case "keyCredentials":
if v != nil {
- var objectID string
- err = json.Unmarshal(*v, &objectID)
+ var keyCredentials []KeyCredential
+ err = json.Unmarshal(*v, &keyCredentials)
if err != nil {
return err
}
- a.ObjectID = &objectID
+ a.KeyCredentials = &keyCredentials
}
- case "deletionTimestamp":
+ case "passwordCredentials":
if v != nil {
- var deletionTimestamp date.Time
- err = json.Unmarshal(*v, &deletionTimestamp)
+ var passwordCredentials []PasswordCredential
+ err = json.Unmarshal(*v, &passwordCredentials)
if err != nil {
return err
}
- a.DeletionTimestamp = &deletionTimestamp
+ a.PasswordCredentials = &passwordCredentials
}
- case "objectType":
+ default:
if v != nil {
- var objectType ObjectType
- err = json.Unmarshal(*v, &objectType)
+ var additionalProperties interface{}
+ err = json.Unmarshal(*v, &additionalProperties)
if err != nil {
return err
}
- a.ObjectType = objectType
- }
- }
- }
-
- return nil
-}
-
-// ApplicationAddOwnerParameters request parameters for adding a owner to an application.
-type ApplicationAddOwnerParameters struct {
- // AdditionalProperties - Unmatched properties from the message are deserialized this collection
- AdditionalProperties map[string]interface{} `json:""`
- // URL - A owner object URL, such as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the owner (user, application, servicePrincipal, group) to be added.
- URL *string `json:"url,omitempty"`
-}
-
-// MarshalJSON is the custom marshaler for ApplicationAddOwnerParameters.
-func (aaop ApplicationAddOwnerParameters) MarshalJSON() ([]byte, error) {
- objectMap := make(map[string]interface{})
- if aaop.URL != nil {
- objectMap["url"] = aaop.URL
- }
- for k, v := range aaop.AdditionalProperties {
- objectMap[k] = v
- }
- return json.Marshal(objectMap)
-}
-
-// UnmarshalJSON is the custom unmarshaler for ApplicationAddOwnerParameters struct.
-func (aaop *ApplicationAddOwnerParameters) UnmarshalJSON(body []byte) error {
- var m map[string]*json.RawMessage
- err := json.Unmarshal(body, &m)
- if err != nil {
- return err
- }
- for k, v := range m {
- switch k {
- default:
+ if a.AdditionalProperties == nil {
+ a.AdditionalProperties = make(map[string]interface{})
+ }
+ a.AdditionalProperties[k] = additionalProperties
+ }
+ case "objectId":
if v != nil {
- var additionalProperties interface{}
- err = json.Unmarshal(*v, &additionalProperties)
+ var objectID string
+ err = json.Unmarshal(*v, &objectID)
if err != nil {
return err
}
- if aaop.AdditionalProperties == nil {
- aaop.AdditionalProperties = make(map[string]interface{})
+ a.ObjectID = &objectID
+ }
+ case "deletionTimestamp":
+ if v != nil {
+ var deletionTimestamp date.Time
+ err = json.Unmarshal(*v, &deletionTimestamp)
+ if err != nil {
+ return err
}
- aaop.AdditionalProperties[k] = additionalProperties
+ a.DeletionTimestamp = &deletionTimestamp
}
- case "url":
+ case "objectType":
if v != nil {
- var URL string
- err = json.Unmarshal(*v, &URL)
+ var objectType ObjectType
+ err = json.Unmarshal(*v, &objectType)
if err != nil {
return err
}
- aaop.URL = &URL
+ a.ObjectType = objectType
}
}
}
@@ -800,6 +596,8 @@ func (aaop *ApplicationAddOwnerParameters) UnmarshalJSON(body []byte) error {
type ApplicationCreateParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
+ // AppRoles - The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
+ AppRoles *[]AppRole `json:"appRoles,omitempty"`
// AvailableToOtherTenants - Whether the application is available to other tenants.
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
// DisplayName - The display name of the application.
@@ -823,6 +621,9 @@ type ApplicationCreateParameters struct {
// MarshalJSON is the custom marshaler for ApplicationCreateParameters.
func (acp ApplicationCreateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if acp.AppRoles != nil {
+ objectMap["appRoles"] = acp.AppRoles
+ }
if acp.AvailableToOtherTenants != nil {
objectMap["availableToOtherTenants"] = acp.AvailableToOtherTenants
}
@@ -877,6 +678,15 @@ func (acp *ApplicationCreateParameters) UnmarshalJSON(body []byte) error {
}
acp.AdditionalProperties[k] = additionalProperties
}
+ case "appRoles":
+ if v != nil {
+ var appRoles []AppRole
+ err = json.Unmarshal(*v, &appRoles)
+ if err != nil {
+ return err
+ }
+ acp.AppRoles = &appRoles
+ }
case "availableToOtherTenants":
if v != nil {
var availableToOtherTenants bool
@@ -979,14 +789,24 @@ type ApplicationListResultIterator struct {
page ApplicationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ApplicationListResultIterator) Next() error {
+func (iter *ApplicationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -995,6 +815,13 @@ func (iter *ApplicationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ApplicationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1014,6 +841,11 @@ func (iter ApplicationListResultIterator) Value() Application {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ApplicationListResultIterator type.
+func NewApplicationListResultIterator(page ApplicationListResultPage) ApplicationListResultIterator {
+ return ApplicationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr ApplicationListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -1021,14 +853,24 @@ func (alr ApplicationListResult) IsEmpty() bool {
// ApplicationListResultPage contains a page of Application values.
type ApplicationListResultPage struct {
- fn func(ApplicationListResult) (ApplicationListResult, error)
+ fn func(context.Context, ApplicationListResult) (ApplicationListResult, error)
alr ApplicationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ApplicationListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *ApplicationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -1036,6 +878,13 @@ func (page *ApplicationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ApplicationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -1054,10 +903,17 @@ func (page ApplicationListResultPage) Values() []Application {
return *page.alr.Value
}
+// Creates a new instance of the ApplicationListResultPage type.
+func NewApplicationListResultPage(getNextPage func(context.Context, ApplicationListResult) (ApplicationListResult, error)) ApplicationListResultPage {
+ return ApplicationListResultPage{fn: getNextPage}
+}
+
// ApplicationUpdateParameters request parameters for updating an existing application.
type ApplicationUpdateParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
+ // AppRoles - The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
+ AppRoles *[]AppRole `json:"appRoles,omitempty"`
// AvailableToOtherTenants - Whether the application is available to other tenants
AvailableToOtherTenants *bool `json:"availableToOtherTenants,omitempty"`
// DisplayName - The display name of the application.
@@ -1081,6 +937,9 @@ type ApplicationUpdateParameters struct {
// MarshalJSON is the custom marshaler for ApplicationUpdateParameters.
func (aup ApplicationUpdateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if aup.AppRoles != nil {
+ objectMap["appRoles"] = aup.AppRoles
+ }
if aup.AvailableToOtherTenants != nil {
objectMap["availableToOtherTenants"] = aup.AvailableToOtherTenants
}
@@ -1135,6 +994,15 @@ func (aup *ApplicationUpdateParameters) UnmarshalJSON(body []byte) error {
}
aup.AdditionalProperties[k] = additionalProperties
}
+ case "appRoles":
+ if v != nil {
+ var appRoles []AppRole
+ err = json.Unmarshal(*v, &appRoles)
+ if err != nil {
+ return err
+ }
+ aup.AppRoles = &appRoles
+ }
case "availableToOtherTenants":
if v != nil {
var availableToOtherTenants bool
@@ -1222,6 +1090,22 @@ func (aup *ApplicationUpdateParameters) UnmarshalJSON(body []byte) error {
return nil
}
+// AppRole ...
+type AppRole struct {
+ // ID - Unique role identifier inside the appRoles collection.
+ ID *string `json:"id,omitempty"`
+ // AllowedMemberTypes - Specifies whether this app role definition can be assigned to users and groups by setting to 'User', or to other applications (that are accessing this application in daemon service scenarios) by setting to 'Application', or to both.
+ AllowedMemberTypes *[]string `json:"allowedMemberTypes,omitempty"`
+ // Description - Permission help text that appears in the admin app assignment and consent experiences.
+ Description *string `json:"description,omitempty"`
+ // DisplayName - Display name for the permission that appears in the admin consent and app assignment experiences.
+ DisplayName *string `json:"displayName,omitempty"`
+ // IsEnabled - When creating or updating a role definition, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed.
+ IsEnabled *bool `json:"isEnabled,omitempty"`
+ // Value - Specifies the value of the roles claim that the application should expect in the authentication and access tokens.
+ Value *string `json:"value,omitempty"`
+}
+
// CheckGroupMembershipParameters request parameters for IsMemberOf API call.
type CheckGroupMembershipParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -1527,6 +1411,8 @@ type DirectoryObjectListResult struct {
autorest.Response `json:"-"`
// Value - A collection of DirectoryObject.
Value *[]BasicDirectoryObject `json:"value,omitempty"`
+ // OdataNextLink - The URL to get the next set of results.
+ OdataNextLink *string `json:"odata.nextLink,omitempty"`
}
// UnmarshalJSON is the custom unmarshaler for DirectoryObjectListResult struct.
@@ -1546,12 +1432,158 @@ func (dolr *DirectoryObjectListResult) UnmarshalJSON(body []byte) error {
}
dolr.Value = &value
}
+ case "odata.nextLink":
+ if v != nil {
+ var odataNextLink string
+ err = json.Unmarshal(*v, &odataNextLink)
+ if err != nil {
+ return err
+ }
+ dolr.OdataNextLink = &odataNextLink
+ }
}
}
return nil
}
+// DirectoryObjectListResultIterator provides access to a complete listing of DirectoryObject values.
+type DirectoryObjectListResultIterator struct {
+ i int
+ page DirectoryObjectListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *DirectoryObjectListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DirectoryObjectListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DirectoryObjectListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter DirectoryObjectListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter DirectoryObjectListResultIterator) Response() DirectoryObjectListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter DirectoryObjectListResultIterator) Value() BasicDirectoryObject {
+ if !iter.page.NotDone() {
+ return DirectoryObject{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the DirectoryObjectListResultIterator type.
+func NewDirectoryObjectListResultIterator(page DirectoryObjectListResultPage) DirectoryObjectListResultIterator {
+ return DirectoryObjectListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (dolr DirectoryObjectListResult) IsEmpty() bool {
+ return dolr.Value == nil || len(*dolr.Value) == 0
+}
+
+// directoryObjectListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (dolr DirectoryObjectListResult) directoryObjectListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if dolr.OdataNextLink == nil || len(to.String(dolr.OdataNextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(dolr.OdataNextLink)))
+}
+
+// DirectoryObjectListResultPage contains a page of BasicDirectoryObject values.
+type DirectoryObjectListResultPage struct {
+ fn func(context.Context, DirectoryObjectListResult) (DirectoryObjectListResult, error)
+ dolr DirectoryObjectListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *DirectoryObjectListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DirectoryObjectListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dolr)
+ if err != nil {
+ return err
+ }
+ page.dolr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DirectoryObjectListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page DirectoryObjectListResultPage) NotDone() bool {
+ return !page.dolr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page DirectoryObjectListResultPage) Response() DirectoryObjectListResult {
+ return page.dolr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page DirectoryObjectListResultPage) Values() []BasicDirectoryObject {
+ if page.dolr.IsEmpty() {
+ return nil
+ }
+ return *page.dolr.Value
+}
+
+// Creates a new instance of the DirectoryObjectListResultPage type.
+func NewDirectoryObjectListResultPage(getNextPage func(context.Context, DirectoryObjectListResult) (DirectoryObjectListResult, error)) DirectoryObjectListResultPage {
+ return DirectoryObjectListResultPage{fn: getNextPage}
+}
+
// Domain active Directory Domain information.
type Domain struct {
autorest.Response `json:"-"`
@@ -1748,96 +1780,6 @@ func (gop *GetObjectsParameters) UnmarshalJSON(body []byte) error {
return nil
}
-// GetObjectsResult the response to an Active Directory object inquiry API request.
-type GetObjectsResult struct {
- autorest.Response `json:"-"`
- // Value - A collection of Active Directory objects.
- Value *[]AADObject `json:"value,omitempty"`
- // OdataNextLink - The URL to get the next set of results.
- OdataNextLink *string `json:"odata.nextLink,omitempty"`
-}
-
-// GetObjectsResultIterator provides access to a complete listing of AADObject values.
-type GetObjectsResultIterator struct {
- i int
- page GetObjectsResultPage
-}
-
-// Next advances to the next value. If there was an error making
-// the request the iterator does not advance and the error is returned.
-func (iter *GetObjectsResultIterator) Next() error {
- iter.i++
- if iter.i < len(iter.page.Values()) {
- return nil
- }
- err := iter.page.Next()
- if err != nil {
- iter.i--
- return err
- }
- iter.i = 0
- return nil
-}
-
-// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter GetObjectsResultIterator) NotDone() bool {
- return iter.page.NotDone() && iter.i < len(iter.page.Values())
-}
-
-// Response returns the raw server response from the last page request.
-func (iter GetObjectsResultIterator) Response() GetObjectsResult {
- return iter.page.Response()
-}
-
-// Value returns the current value or a zero-initialized value if the
-// iterator has advanced beyond the end of the collection.
-func (iter GetObjectsResultIterator) Value() AADObject {
- if !iter.page.NotDone() {
- return AADObject{}
- }
- return iter.page.Values()[iter.i]
-}
-
-// IsEmpty returns true if the ListResult contains no values.
-func (gor GetObjectsResult) IsEmpty() bool {
- return gor.Value == nil || len(*gor.Value) == 0
-}
-
-// GetObjectsResultPage contains a page of AADObject values.
-type GetObjectsResultPage struct {
- fn func(GetObjectsResult) (GetObjectsResult, error)
- gor GetObjectsResult
-}
-
-// Next advances to the next page of values. If there was an error making
-// the request the page does not advance and the error is returned.
-func (page *GetObjectsResultPage) Next() error {
- next, err := page.fn(page.gor)
- if err != nil {
- return err
- }
- page.gor = next
- return nil
-}
-
-// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page GetObjectsResultPage) NotDone() bool {
- return !page.gor.IsEmpty()
-}
-
-// Response returns the raw server response from the last page request.
-func (page GetObjectsResultPage) Response() GetObjectsResult {
- return page.gor
-}
-
-// Values returns the slice of values for the current page or nil if there are no values.
-func (page GetObjectsResultPage) Values() []AADObject {
- if page.gor.IsEmpty() {
- return nil
- }
- return *page.gor.Value
-}
-
// GraphError active Directory error information.
type GraphError struct {
// OdataError - A Graph API error.
@@ -2109,14 +2051,24 @@ type GroupListResultIterator struct {
page GroupListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *GroupListResultIterator) Next() error {
+func (iter *GroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2125,6 +2077,13 @@ func (iter *GroupListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter GroupListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2144,6 +2103,11 @@ func (iter GroupListResultIterator) Value() ADGroup {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the GroupListResultIterator type.
+func NewGroupListResultIterator(page GroupListResultPage) GroupListResultIterator {
+ return GroupListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (glr GroupListResult) IsEmpty() bool {
return glr.Value == nil || len(*glr.Value) == 0
@@ -2151,14 +2115,24 @@ func (glr GroupListResult) IsEmpty() bool {
// GroupListResultPage contains a page of ADGroup values.
type GroupListResultPage struct {
- fn func(GroupListResult) (GroupListResult, error)
+ fn func(context.Context, GroupListResult) (GroupListResult, error)
glr GroupListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *GroupListResultPage) Next() error {
- next, err := page.fn(page.glr)
+func (page *GroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.glr)
if err != nil {
return err
}
@@ -2166,6 +2140,13 @@ func (page *GroupListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page GroupListResultPage) NotDone() bool {
return !page.glr.IsEmpty()
@@ -2184,6 +2165,11 @@ func (page GroupListResultPage) Values() []ADGroup {
return *page.glr.Value
}
+// Creates a new instance of the GroupListResultPage type.
+func NewGroupListResultPage(getNextPage func(context.Context, GroupListResult) (GroupListResult, error)) GroupListResultPage {
+ return GroupListResultPage{fn: getNextPage}
+}
+
// KeyCredential active Directory Key Credential information.
type KeyCredential struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2201,7 +2187,7 @@ type KeyCredential struct {
// Type - Type. Acceptable values are 'AsymmetricX509Cert' and 'Symmetric'.
Type *string `json:"type,omitempty"`
// CustomKeyIdentifier - Custom Key Identifier
- CustomKeyIdentifier *[]byte `json:"customKeyIdentifier,omitempty"`
+ CustomKeyIdentifier *string `json:"customKeyIdentifier,omitempty"`
}
// MarshalJSON is the custom marshaler for KeyCredential.
@@ -2311,7 +2297,7 @@ func (kc *KeyCredential) UnmarshalJSON(body []byte) error {
}
case "customKeyIdentifier":
if v != nil {
- var customKeyIdentifier []byte
+ var customKeyIdentifier string
err = json.Unmarshal(*v, &customKeyIdentifier)
if err != nil {
return err
@@ -2402,6 +2388,8 @@ type PasswordCredential struct {
KeyID *string `json:"keyId,omitempty"`
// Value - Key value.
Value *string `json:"value,omitempty"`
+ // CustomKeyIdentifier - Custom Key Identifier
+ CustomKeyIdentifier *[]byte `json:"customKeyIdentifier,omitempty"`
}
// MarshalJSON is the custom marshaler for PasswordCredential.
@@ -2419,6 +2407,9 @@ func (pc PasswordCredential) MarshalJSON() ([]byte, error) {
if pc.Value != nil {
objectMap["value"] = pc.Value
}
+ if pc.CustomKeyIdentifier != nil {
+ objectMap["customKeyIdentifier"] = pc.CustomKeyIdentifier
+ }
for k, v := range pc.AdditionalProperties {
objectMap[k] = v
}
@@ -2482,6 +2473,15 @@ func (pc *PasswordCredential) UnmarshalJSON(body []byte) error {
}
pc.Value = &value
}
+ case "customKeyIdentifier":
+ if v != nil {
+ var customKeyIdentifier []byte
+ err = json.Unmarshal(*v, &customKeyIdentifier)
+ if err != nil {
+ return err
+ }
+ pc.CustomKeyIdentifier = &customKeyIdentifier
+ }
}
}
@@ -2592,10 +2592,11 @@ type Permissions struct {
ExpiryTime *string `json:"expiryTime,omitempty"`
}
-// RequiredResourceAccess specifies the set of OAuth 2.0 permission scopes and app roles under the specified
-// resource that an application requires access to. The specified OAuth 2.0 permission scopes may be requested by
-// client applications (through the requiredResourceAccess collection) when calling a resource application. The
-// requiredResourceAccess property of the Application entity is a collection of ReqiredResourceAccess.
+// RequiredResourceAccess specifies the set of OAuth 2.0 permission scopes and app roles under the
+// specified resource that an application requires access to. The specified OAuth 2.0 permission scopes may
+// be requested by client applications (through the requiredResourceAccess collection) when calling a
+// resource application. The requiredResourceAccess property of the Application entity is a collection of
+// RequiredResourceAccess.
type RequiredResourceAccess struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
@@ -2743,6 +2744,8 @@ type ServicePrincipal struct {
DisplayName *string `json:"displayName,omitempty"`
// AppID - The application ID.
AppID *string `json:"appId,omitempty"`
+ // AppRoles - The collection of application roles that an application may declare. These roles can be assigned to users, groups or service principals.
+ AppRoles *[]AppRole `json:"appRoles,omitempty"`
// ServicePrincipalNames - A collection of service principal names.
ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
@@ -2765,6 +2768,9 @@ func (sp ServicePrincipal) MarshalJSON() ([]byte, error) {
if sp.AppID != nil {
objectMap["appId"] = sp.AppID
}
+ if sp.AppRoles != nil {
+ objectMap["appRoles"] = sp.AppRoles
+ }
if sp.ServicePrincipalNames != nil {
objectMap["servicePrincipalNames"] = sp.ServicePrincipalNames
}
@@ -2840,6 +2846,15 @@ func (sp *ServicePrincipal) UnmarshalJSON(body []byte) error {
}
sp.AppID = &appID
}
+ case "appRoles":
+ if v != nil {
+ var appRoles []AppRole
+ err = json.Unmarshal(*v, &appRoles)
+ if err != nil {
+ return err
+ }
+ sp.AppRoles = &appRoles
+ }
case "servicePrincipalNames":
if v != nil {
var servicePrincipalNames []string
@@ -2898,24 +2913,51 @@ func (sp *ServicePrincipal) UnmarshalJSON(body []byte) error {
type ServicePrincipalCreateParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
- // AppID - application Id
- AppID *string `json:"appId,omitempty"`
// AccountEnabled - Whether the account is enabled
AccountEnabled *bool `json:"accountEnabled,omitempty"`
+ // AppID - application Id
+ AppID *string `json:"appId,omitempty"`
+ // AppRoleAssignmentRequired - Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
+ AppRoleAssignmentRequired *bool `json:"appRoleAssignmentRequired,omitempty"`
+ // DisplayName - The display name for the service principal.
+ DisplayName *string `json:"displayName,omitempty"`
+ ErrorURL *string `json:"errorUrl,omitempty"`
+ // Homepage - The URL to the homepage of the associated application.
+ Homepage *string `json:"homepage,omitempty"`
// KeyCredentials - A collection of KeyCredential objects.
KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
// PasswordCredentials - A collection of PasswordCredential objects
PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
+ // PublisherName - The display name of the tenant in which the associated application is specified.
+ PublisherName *string `json:"publisherName,omitempty"`
+ // ReplyUrls - A collection of reply URLs for the service principal.
+ ReplyUrls *[]string `json:"replyUrls,omitempty"`
+ SamlMetadataURL *string `json:"samlMetadataUrl,omitempty"`
+ // ServicePrincipalNames - A collection of service principal names.
+ ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
}
// MarshalJSON is the custom marshaler for ServicePrincipalCreateParameters.
func (spcp ServicePrincipalCreateParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
+ if spcp.AccountEnabled != nil {
+ objectMap["accountEnabled"] = spcp.AccountEnabled
+ }
if spcp.AppID != nil {
objectMap["appId"] = spcp.AppID
}
- if spcp.AccountEnabled != nil {
- objectMap["accountEnabled"] = spcp.AccountEnabled
+ if spcp.AppRoleAssignmentRequired != nil {
+ objectMap["appRoleAssignmentRequired"] = spcp.AppRoleAssignmentRequired
+ }
+ if spcp.DisplayName != nil {
+ objectMap["displayName"] = spcp.DisplayName
+ }
+ if spcp.ErrorURL != nil {
+ objectMap["errorUrl"] = spcp.ErrorURL
+ }
+ if spcp.Homepage != nil {
+ objectMap["homepage"] = spcp.Homepage
}
if spcp.KeyCredentials != nil {
objectMap["keyCredentials"] = spcp.KeyCredentials
@@ -2923,6 +2965,21 @@ func (spcp ServicePrincipalCreateParameters) MarshalJSON() ([]byte, error) {
if spcp.PasswordCredentials != nil {
objectMap["passwordCredentials"] = spcp.PasswordCredentials
}
+ if spcp.PublisherName != nil {
+ objectMap["publisherName"] = spcp.PublisherName
+ }
+ if spcp.ReplyUrls != nil {
+ objectMap["replyUrls"] = spcp.ReplyUrls
+ }
+ if spcp.SamlMetadataURL != nil {
+ objectMap["samlMetadataUrl"] = spcp.SamlMetadataURL
+ }
+ if spcp.ServicePrincipalNames != nil {
+ objectMap["servicePrincipalNames"] = spcp.ServicePrincipalNames
+ }
+ if spcp.Tags != nil {
+ objectMap["tags"] = spcp.Tags
+ }
for k, v := range spcp.AdditionalProperties {
objectMap[k] = v
}
@@ -2950,6 +3007,15 @@ func (spcp *ServicePrincipalCreateParameters) UnmarshalJSON(body []byte) error {
}
spcp.AdditionalProperties[k] = additionalProperties
}
+ case "accountEnabled":
+ if v != nil {
+ var accountEnabled bool
+ err = json.Unmarshal(*v, &accountEnabled)
+ if err != nil {
+ return err
+ }
+ spcp.AccountEnabled = &accountEnabled
+ }
case "appId":
if v != nil {
var appID string
@@ -2959,14 +3025,41 @@ func (spcp *ServicePrincipalCreateParameters) UnmarshalJSON(body []byte) error {
}
spcp.AppID = &appID
}
- case "accountEnabled":
+ case "appRoleAssignmentRequired":
if v != nil {
- var accountEnabled bool
- err = json.Unmarshal(*v, &accountEnabled)
+ var appRoleAssignmentRequired bool
+ err = json.Unmarshal(*v, &appRoleAssignmentRequired)
if err != nil {
return err
}
- spcp.AccountEnabled = &accountEnabled
+ spcp.AppRoleAssignmentRequired = &appRoleAssignmentRequired
+ }
+ case "displayName":
+ if v != nil {
+ var displayName string
+ err = json.Unmarshal(*v, &displayName)
+ if err != nil {
+ return err
+ }
+ spcp.DisplayName = &displayName
+ }
+ case "errorUrl":
+ if v != nil {
+ var errorURL string
+ err = json.Unmarshal(*v, &errorURL)
+ if err != nil {
+ return err
+ }
+ spcp.ErrorURL = &errorURL
+ }
+ case "homepage":
+ if v != nil {
+ var homepage string
+ err = json.Unmarshal(*v, &homepage)
+ if err != nil {
+ return err
+ }
+ spcp.Homepage = &homepage
}
case "keyCredentials":
if v != nil {
@@ -2986,6 +3079,51 @@ func (spcp *ServicePrincipalCreateParameters) UnmarshalJSON(body []byte) error {
}
spcp.PasswordCredentials = &passwordCredentials
}
+ case "publisherName":
+ if v != nil {
+ var publisherName string
+ err = json.Unmarshal(*v, &publisherName)
+ if err != nil {
+ return err
+ }
+ spcp.PublisherName = &publisherName
+ }
+ case "replyUrls":
+ if v != nil {
+ var replyUrls []string
+ err = json.Unmarshal(*v, &replyUrls)
+ if err != nil {
+ return err
+ }
+ spcp.ReplyUrls = &replyUrls
+ }
+ case "samlMetadataUrl":
+ if v != nil {
+ var samlMetadataURL string
+ err = json.Unmarshal(*v, &samlMetadataURL)
+ if err != nil {
+ return err
+ }
+ spcp.SamlMetadataURL = &samlMetadataURL
+ }
+ case "servicePrincipalNames":
+ if v != nil {
+ var servicePrincipalNames []string
+ err = json.Unmarshal(*v, &servicePrincipalNames)
+ if err != nil {
+ return err
+ }
+ spcp.ServicePrincipalNames = &servicePrincipalNames
+ }
+ case "tags":
+ if v != nil {
+ var tags []string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spcp.Tags = &tags
+ }
}
}
@@ -3007,14 +3145,24 @@ type ServicePrincipalListResultIterator struct {
page ServicePrincipalListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ServicePrincipalListResultIterator) Next() error {
+func (iter *ServicePrincipalListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3023,6 +3171,13 @@ func (iter *ServicePrincipalListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ServicePrincipalListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ServicePrincipalListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3042,6 +3197,11 @@ func (iter ServicePrincipalListResultIterator) Value() ServicePrincipal {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ServicePrincipalListResultIterator type.
+func NewServicePrincipalListResultIterator(page ServicePrincipalListResultPage) ServicePrincipalListResultIterator {
+ return ServicePrincipalListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (splr ServicePrincipalListResult) IsEmpty() bool {
return splr.Value == nil || len(*splr.Value) == 0
@@ -3049,14 +3209,24 @@ func (splr ServicePrincipalListResult) IsEmpty() bool {
// ServicePrincipalListResultPage contains a page of ServicePrincipal values.
type ServicePrincipalListResultPage struct {
- fn func(ServicePrincipalListResult) (ServicePrincipalListResult, error)
+ fn func(context.Context, ServicePrincipalListResult) (ServicePrincipalListResult, error)
splr ServicePrincipalListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ServicePrincipalListResultPage) Next() error {
- next, err := page.fn(page.splr)
+func (page *ServicePrincipalListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.splr)
if err != nil {
return err
}
@@ -3064,6 +3234,13 @@ func (page *ServicePrincipalListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ServicePrincipalListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ServicePrincipalListResultPage) NotDone() bool {
return !page.splr.IsEmpty()
@@ -3082,8 +3259,234 @@ func (page ServicePrincipalListResultPage) Values() []ServicePrincipal {
return *page.splr.Value
}
-// SignInName contains information about a sign-in name of a local account user in an Azure Active Directory B2C
-// tenant.
+// Creates a new instance of the ServicePrincipalListResultPage type.
+func NewServicePrincipalListResultPage(getNextPage func(context.Context, ServicePrincipalListResult) (ServicePrincipalListResult, error)) ServicePrincipalListResultPage {
+ return ServicePrincipalListResultPage{fn: getNextPage}
+}
+
+// ServicePrincipalUpdateParameters request parameters for creating a new service principal.
+type ServicePrincipalUpdateParameters struct {
+ // AdditionalProperties - Unmatched properties from the message are deserialized this collection
+ AdditionalProperties map[string]interface{} `json:""`
+ // AccountEnabled - Whether the account is enabled
+ AccountEnabled *bool `json:"accountEnabled,omitempty"`
+ // AppID - application Id
+ AppID *string `json:"appId,omitempty"`
+ // AppRoleAssignmentRequired - Specifies whether an AppRoleAssignment to a user or group is required before Azure AD will issue a user or access token to the application.
+ AppRoleAssignmentRequired *bool `json:"appRoleAssignmentRequired,omitempty"`
+ // DisplayName - The display name for the service principal.
+ DisplayName *string `json:"displayName,omitempty"`
+ ErrorURL *string `json:"errorUrl,omitempty"`
+ // Homepage - The URL to the homepage of the associated application.
+ Homepage *string `json:"homepage,omitempty"`
+ // KeyCredentials - A collection of KeyCredential objects.
+ KeyCredentials *[]KeyCredential `json:"keyCredentials,omitempty"`
+ // PasswordCredentials - A collection of PasswordCredential objects
+ PasswordCredentials *[]PasswordCredential `json:"passwordCredentials,omitempty"`
+ // PublisherName - The display name of the tenant in which the associated application is specified.
+ PublisherName *string `json:"publisherName,omitempty"`
+ // ReplyUrls - A collection of reply URLs for the service principal.
+ ReplyUrls *[]string `json:"replyUrls,omitempty"`
+ SamlMetadataURL *string `json:"samlMetadataUrl,omitempty"`
+ // ServicePrincipalNames - A collection of service principal names.
+ ServicePrincipalNames *[]string `json:"servicePrincipalNames,omitempty"`
+ Tags *[]string `json:"tags,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for ServicePrincipalUpdateParameters.
+func (spup ServicePrincipalUpdateParameters) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if spup.AccountEnabled != nil {
+ objectMap["accountEnabled"] = spup.AccountEnabled
+ }
+ if spup.AppID != nil {
+ objectMap["appId"] = spup.AppID
+ }
+ if spup.AppRoleAssignmentRequired != nil {
+ objectMap["appRoleAssignmentRequired"] = spup.AppRoleAssignmentRequired
+ }
+ if spup.DisplayName != nil {
+ objectMap["displayName"] = spup.DisplayName
+ }
+ if spup.ErrorURL != nil {
+ objectMap["errorUrl"] = spup.ErrorURL
+ }
+ if spup.Homepage != nil {
+ objectMap["homepage"] = spup.Homepage
+ }
+ if spup.KeyCredentials != nil {
+ objectMap["keyCredentials"] = spup.KeyCredentials
+ }
+ if spup.PasswordCredentials != nil {
+ objectMap["passwordCredentials"] = spup.PasswordCredentials
+ }
+ if spup.PublisherName != nil {
+ objectMap["publisherName"] = spup.PublisherName
+ }
+ if spup.ReplyUrls != nil {
+ objectMap["replyUrls"] = spup.ReplyUrls
+ }
+ if spup.SamlMetadataURL != nil {
+ objectMap["samlMetadataUrl"] = spup.SamlMetadataURL
+ }
+ if spup.ServicePrincipalNames != nil {
+ objectMap["servicePrincipalNames"] = spup.ServicePrincipalNames
+ }
+ if spup.Tags != nil {
+ objectMap["tags"] = spup.Tags
+ }
+ for k, v := range spup.AdditionalProperties {
+ objectMap[k] = v
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ServicePrincipalUpdateParameters struct.
+func (spup *ServicePrincipalUpdateParameters) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ default:
+ if v != nil {
+ var additionalProperties interface{}
+ err = json.Unmarshal(*v, &additionalProperties)
+ if err != nil {
+ return err
+ }
+ if spup.AdditionalProperties == nil {
+ spup.AdditionalProperties = make(map[string]interface{})
+ }
+ spup.AdditionalProperties[k] = additionalProperties
+ }
+ case "accountEnabled":
+ if v != nil {
+ var accountEnabled bool
+ err = json.Unmarshal(*v, &accountEnabled)
+ if err != nil {
+ return err
+ }
+ spup.AccountEnabled = &accountEnabled
+ }
+ case "appId":
+ if v != nil {
+ var appID string
+ err = json.Unmarshal(*v, &appID)
+ if err != nil {
+ return err
+ }
+ spup.AppID = &appID
+ }
+ case "appRoleAssignmentRequired":
+ if v != nil {
+ var appRoleAssignmentRequired bool
+ err = json.Unmarshal(*v, &appRoleAssignmentRequired)
+ if err != nil {
+ return err
+ }
+ spup.AppRoleAssignmentRequired = &appRoleAssignmentRequired
+ }
+ case "displayName":
+ if v != nil {
+ var displayName string
+ err = json.Unmarshal(*v, &displayName)
+ if err != nil {
+ return err
+ }
+ spup.DisplayName = &displayName
+ }
+ case "errorUrl":
+ if v != nil {
+ var errorURL string
+ err = json.Unmarshal(*v, &errorURL)
+ if err != nil {
+ return err
+ }
+ spup.ErrorURL = &errorURL
+ }
+ case "homepage":
+ if v != nil {
+ var homepage string
+ err = json.Unmarshal(*v, &homepage)
+ if err != nil {
+ return err
+ }
+ spup.Homepage = &homepage
+ }
+ case "keyCredentials":
+ if v != nil {
+ var keyCredentials []KeyCredential
+ err = json.Unmarshal(*v, &keyCredentials)
+ if err != nil {
+ return err
+ }
+ spup.KeyCredentials = &keyCredentials
+ }
+ case "passwordCredentials":
+ if v != nil {
+ var passwordCredentials []PasswordCredential
+ err = json.Unmarshal(*v, &passwordCredentials)
+ if err != nil {
+ return err
+ }
+ spup.PasswordCredentials = &passwordCredentials
+ }
+ case "publisherName":
+ if v != nil {
+ var publisherName string
+ err = json.Unmarshal(*v, &publisherName)
+ if err != nil {
+ return err
+ }
+ spup.PublisherName = &publisherName
+ }
+ case "replyUrls":
+ if v != nil {
+ var replyUrls []string
+ err = json.Unmarshal(*v, &replyUrls)
+ if err != nil {
+ return err
+ }
+ spup.ReplyUrls = &replyUrls
+ }
+ case "samlMetadataUrl":
+ if v != nil {
+ var samlMetadataURL string
+ err = json.Unmarshal(*v, &samlMetadataURL)
+ if err != nil {
+ return err
+ }
+ spup.SamlMetadataURL = &samlMetadataURL
+ }
+ case "servicePrincipalNames":
+ if v != nil {
+ var servicePrincipalNames []string
+ err = json.Unmarshal(*v, &servicePrincipalNames)
+ if err != nil {
+ return err
+ }
+ spup.ServicePrincipalNames = &servicePrincipalNames
+ }
+ case "tags":
+ if v != nil {
+ var tags []string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ spup.Tags = &tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// SignInName contains information about a sign-in name of a local account user in an Azure Active
+// Directory B2C tenant.
type SignInName struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
@@ -3809,14 +4212,24 @@ type UserListResultIterator struct {
page UserListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UserListResultIterator) Next() error {
+func (iter *UserListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3825,6 +4238,13 @@ func (iter *UserListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UserListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UserListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3844,6 +4264,11 @@ func (iter UserListResultIterator) Value() User {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UserListResultIterator type.
+func NewUserListResultIterator(page UserListResultPage) UserListResultIterator {
+ return UserListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ulr UserListResult) IsEmpty() bool {
return ulr.Value == nil || len(*ulr.Value) == 0
@@ -3851,14 +4276,24 @@ func (ulr UserListResult) IsEmpty() bool {
// UserListResultPage contains a page of User values.
type UserListResultPage struct {
- fn func(UserListResult) (UserListResult, error)
+ fn func(context.Context, UserListResult) (UserListResult, error)
ulr UserListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UserListResultPage) Next() error {
- next, err := page.fn(page.ulr)
+func (page *UserListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ulr)
if err != nil {
return err
}
@@ -3866,6 +4301,13 @@ func (page *UserListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UserListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UserListResultPage) NotDone() bool {
return !page.ulr.IsEmpty()
@@ -3884,6 +4326,11 @@ func (page UserListResultPage) Values() []User {
return *page.ulr.Value
}
+// Creates a new instance of the UserListResultPage type.
+func NewUserListResultPage(getNextPage func(context.Context, UserListResult) (UserListResult, error)) UserListResultPage {
+ return UserListResultPage{fn: getNextPage}
+}
+
// UserUpdateParameters request parameters for updating an existing work or school account user.
type UserUpdateParameters struct {
// AccountEnabled - Whether the account is enabled.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2.go
index 97d465bf13b2..97e79c76ddcf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/oauth2.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewOAuth2ClientWithBaseURI(baseURI string, tenantID string) OAuth2Client {
// Parameters:
// filter - this is the Service Principal ObjectId associated with the app
func (client OAuth2Client) Get(ctx context.Context, filter string) (result Permissions, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OAuth2Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Get", nil, "Failure preparing request")
@@ -106,33 +117,43 @@ func (client OAuth2Client) GetResponder(resp *http.Response) (result Permissions
return
}
-// Post grants OAuth2 permissions for the relevant resource Ids of an app.
+// Grant grants OAuth2 permissions for the relevant resource Ids of an app.
// Parameters:
-// body - the relevant app Service Principal Object Id and the Service Principal Objecit Id you want to grant.
-func (client OAuth2Client) Post(ctx context.Context, body *Permissions) (result Permissions, err error) {
- req, err := client.PostPreparer(ctx, body)
+// body - the relevant app Service Principal Object Id and the Service Principal Object Id you want to grant.
+func (client OAuth2Client) Grant(ctx context.Context, body *Permissions) (result Permissions, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OAuth2Client.Grant")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GrantPreparer(ctx, body)
if err != nil {
- err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Post", nil, "Failure preparing request")
+ err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Grant", nil, "Failure preparing request")
return
}
- resp, err := client.PostSender(req)
+ resp, err := client.GrantSender(req)
if err != nil {
result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Post", resp, "Failure sending request")
+ err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Grant", resp, "Failure sending request")
return
}
- result, err = client.PostResponder(resp)
+ result, err = client.GrantResponder(resp)
if err != nil {
- err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Post", resp, "Failure responding to request")
+ err = autorest.NewErrorWithError(err, "graphrbac.OAuth2Client", "Grant", resp, "Failure responding to request")
}
return
}
-// PostPreparer prepares the Post request.
-func (client OAuth2Client) PostPreparer(ctx context.Context, body *Permissions) (*http.Request, error) {
+// GrantPreparer prepares the Grant request.
+func (client OAuth2Client) GrantPreparer(ctx context.Context, body *Permissions) (*http.Request, error) {
pathParameters := map[string]interface{}{
"tenantID": autorest.Encode("path", client.TenantID),
}
@@ -155,16 +176,16 @@ func (client OAuth2Client) PostPreparer(ctx context.Context, body *Permissions)
return preparer.Prepare((&http.Request{}).WithContext(ctx))
}
-// PostSender sends the Post request. The method will close the
+// GrantSender sends the Grant request. The method will close the
// http.Response Body if it receives an error.
-func (client OAuth2Client) PostSender(req *http.Request) (*http.Response, error) {
+func (client OAuth2Client) GrantSender(req *http.Request) (*http.Response, error) {
return autorest.SendWithSender(client, req,
autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
}
-// PostResponder handles the response to the Post request. The method always
+// GrantResponder handles the response to the Grant request. The method always
// closes the http.Response Body.
-func (client OAuth2Client) PostResponder(resp *http.Response) (result Permissions, err error) {
+func (client OAuth2Client) GrantResponder(resp *http.Response) (result Permissions, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
index 638a0f02a183..04d3cc6395b3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/objects.go
@@ -22,7 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
- "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,81 +41,24 @@ func NewObjectsClientWithBaseURI(baseURI string, tenantID string) ObjectsClient
return ObjectsClient{NewWithBaseURI(baseURI, tenantID)}
}
-// GetCurrentUser gets the details for the currently logged-in user.
-func (client ObjectsClient) GetCurrentUser(ctx context.Context) (result AADObject, err error) {
- req, err := client.GetCurrentUserPreparer(ctx)
- if err != nil {
- err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetCurrentUser", nil, "Failure preparing request")
- return
- }
-
- resp, err := client.GetCurrentUserSender(req)
- if err != nil {
- result.Response = autorest.Response{Response: resp}
- err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetCurrentUser", resp, "Failure sending request")
- return
- }
-
- result, err = client.GetCurrentUserResponder(resp)
- if err != nil {
- err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetCurrentUser", resp, "Failure responding to request")
- }
-
- return
-}
-
-// GetCurrentUserPreparer prepares the GetCurrentUser request.
-func (client ObjectsClient) GetCurrentUserPreparer(ctx context.Context) (*http.Request, error) {
- pathParameters := map[string]interface{}{
- "tenantID": autorest.Encode("path", client.TenantID),
- }
-
- const APIVersion = "1.6"
- queryParameters := map[string]interface{}{
- "api-version": APIVersion,
- }
-
- preparer := autorest.CreatePreparer(
- autorest.AsGet(),
- autorest.WithBaseURL(client.BaseURI),
- autorest.WithPathParameters("/{tenantID}/me", pathParameters),
- autorest.WithQueryParameters(queryParameters))
- return preparer.Prepare((&http.Request{}).WithContext(ctx))
-}
-
-// GetCurrentUserSender sends the GetCurrentUser request. The method will close the
-// http.Response Body if it receives an error.
-func (client ObjectsClient) GetCurrentUserSender(req *http.Request) (*http.Response, error) {
- return autorest.SendWithSender(client, req,
- autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
-}
-
-// GetCurrentUserResponder handles the response to the GetCurrentUser request. The method always
-// closes the http.Response Body.
-func (client ObjectsClient) GetCurrentUserResponder(resp *http.Response) (result AADObject, err error) {
- err = autorest.Respond(
- resp,
- client.ByInspecting(),
- azure.WithErrorUnlessStatusCode(http.StatusOK),
- autorest.ByUnmarshallingJSON(&result),
- autorest.ByClosing())
- result.Response = autorest.Response{Response: resp}
- return
-}
-
-// GetObjectsByObjectIds gets AD group membership for the specified AD object IDs.
+// GetObjectsByObjectIds gets the directory objects specified in a list of object IDs. You can also specify which
+// resource collections (users, groups, etc.) should be searched by specifying the optional types parameter.
// Parameters:
// parameters - objects filtering parameters.
-func (client ObjectsClient) GetObjectsByObjectIds(ctx context.Context, parameters GetObjectsParameters) (result GetObjectsResultPage, err error) {
- if err := validation.Validate([]validation.Validation{
- {TargetValue: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.IncludeDirectoryObjectReferences", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
- return result, validation.NewError("graphrbac.ObjectsClient", "GetObjectsByObjectIds", err.Error())
- }
-
- result.fn = func(lastResult GetObjectsResult) (GetObjectsResult, error) {
+func (client ObjectsClient) GetObjectsByObjectIds(ctx context.Context, parameters GetObjectsParameters) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectsClient.GetObjectsByObjectIds")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult DirectoryObjectListResult) (DirectoryObjectListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
- return GetObjectsResult{}, nil
+ return DirectoryObjectListResult{}, nil
}
return client.GetObjectsByObjectIdsNext(ctx, *lastResult.OdataNextLink)
}
@@ -127,12 +70,12 @@ func (client ObjectsClient) GetObjectsByObjectIds(ctx context.Context, parameter
resp, err := client.GetObjectsByObjectIdsSender(req)
if err != nil {
- result.gor.Response = autorest.Response{Response: resp}
+ result.dolr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetObjectsByObjectIds", resp, "Failure sending request")
return
}
- result.gor, err = client.GetObjectsByObjectIdsResponder(resp)
+ result.dolr, err = client.GetObjectsByObjectIdsResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetObjectsByObjectIds", resp, "Failure responding to request")
}
@@ -170,7 +113,7 @@ func (client ObjectsClient) GetObjectsByObjectIdsSender(req *http.Request) (*htt
// GetObjectsByObjectIdsResponder handles the response to the GetObjectsByObjectIds request. The method always
// closes the http.Response Body.
-func (client ObjectsClient) GetObjectsByObjectIdsResponder(resp *http.Response) (result GetObjectsResult, err error) {
+func (client ObjectsClient) GetObjectsByObjectIdsResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -182,7 +125,17 @@ func (client ObjectsClient) GetObjectsByObjectIdsResponder(resp *http.Response)
}
// GetObjectsByObjectIdsComplete enumerates all values, automatically crossing page boundaries as required.
-func (client ObjectsClient) GetObjectsByObjectIdsComplete(ctx context.Context, parameters GetObjectsParameters) (result GetObjectsResultIterator, err error) {
+func (client ObjectsClient) GetObjectsByObjectIdsComplete(ctx context.Context, parameters GetObjectsParameters) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectsClient.GetObjectsByObjectIds")
+ 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.GetObjectsByObjectIds(ctx, parameters)
return
}
@@ -190,7 +143,17 @@ func (client ObjectsClient) GetObjectsByObjectIdsComplete(ctx context.Context, p
// GetObjectsByObjectIdsNext gets AD group membership for the specified AD object IDs.
// Parameters:
// nextLink - next link for the list operation.
-func (client ObjectsClient) GetObjectsByObjectIdsNext(ctx context.Context, nextLink string) (result GetObjectsResult, err error) {
+func (client ObjectsClient) GetObjectsByObjectIdsNext(ctx context.Context, nextLink string) (result DirectoryObjectListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ObjectsClient.GetObjectsByObjectIdsNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetObjectsByObjectIdsNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ObjectsClient", "GetObjectsByObjectIdsNext", nil, "Failure preparing request")
@@ -241,7 +204,7 @@ func (client ObjectsClient) GetObjectsByObjectIdsNextSender(req *http.Request) (
// GetObjectsByObjectIdsNextResponder handles the response to the GetObjectsByObjectIdsNext request. The method always
// closes the http.Response Body.
-func (client ObjectsClient) GetObjectsByObjectIdsNextResponder(resp *http.Response) (result GetObjectsResult, err error) {
+func (client ObjectsClient) GetObjectsByObjectIdsNextResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
index 2b09eaf96dc7..bca9e9ed2eae 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/serviceprincipals.go
@@ -23,6 +23,7 @@ import (
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,10 +46,19 @@ func NewServicePrincipalsClientWithBaseURI(baseURI string, tenantID string) Serv
// Parameters:
// parameters - parameters to create a service principal.
func (client ServicePrincipalsClient) Create(ctx context.Context, parameters ServicePrincipalCreateParameters) (result ServicePrincipal, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.Create")
+ 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: parameters,
- Constraints: []validation.Constraint{{Target: "parameters.AppID", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.AccountEnabled", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ Constraints: []validation.Constraint{{Target: "parameters.AppID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
return result, validation.NewError("graphrbac.ServicePrincipalsClient", "Create", err.Error())
}
@@ -118,6 +128,16 @@ func (client ServicePrincipalsClient) CreateResponder(resp *http.Response) (resu
// Parameters:
// objectID - the object ID of the service principal to delete.
func (client ServicePrincipalsClient) Delete(ctx context.Context, objectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Delete", nil, "Failure preparing request")
@@ -182,6 +202,16 @@ func (client ServicePrincipalsClient) DeleteResponder(resp *http.Response) (resu
// Parameters:
// objectID - the object ID of the service principal to get.
func (client ServicePrincipalsClient) Get(ctx context.Context, objectID string) (result ServicePrincipal, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Get", nil, "Failure preparing request")
@@ -247,7 +277,17 @@ func (client ServicePrincipalsClient) GetResponder(resp *http.Response) (result
// Parameters:
// filter - the filter to apply to the operation.
func (client ServicePrincipalsClient) List(ctx context.Context, filter string) (result ServicePrincipalListResultPage, err error) {
- result.fn = func(lastResult ServicePrincipalListResult) (ServicePrincipalListResult, error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.List")
+ defer func() {
+ sc := -1
+ if result.splr.Response.Response != nil {
+ sc = result.splr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult ServicePrincipalListResult) (ServicePrincipalListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
return ServicePrincipalListResult{}, nil
}
@@ -318,6 +358,16 @@ func (client ServicePrincipalsClient) ListResponder(resp *http.Response) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServicePrincipalsClient) ListComplete(ctx context.Context, filter string) (result ServicePrincipalListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.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, filter)
return
}
@@ -326,6 +376,16 @@ func (client ServicePrincipalsClient) ListComplete(ctx context.Context, filter s
// Parameters:
// objectID - the object ID of the service principal for which to get keyCredentials.
func (client ServicePrincipalsClient) ListKeyCredentials(ctx context.Context, objectID string) (result KeyCredentialListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.ListKeyCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListKeyCredentialsPreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListKeyCredentials", nil, "Failure preparing request")
@@ -391,6 +451,16 @@ func (client ServicePrincipalsClient) ListKeyCredentialsResponder(resp *http.Res
// Parameters:
// nextLink - next link for the list operation.
func (client ServicePrincipalsClient) ListNext(ctx context.Context, nextLink string) (result ServicePrincipalListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.ListNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListNext", nil, "Failure preparing request")
@@ -455,7 +525,18 @@ func (client ServicePrincipalsClient) ListNextResponder(resp *http.Response) (re
// ListOwners the owners are a set of non-admin users who are allowed to modify this object.
// Parameters:
// objectID - the object ID of the service principal for which to get owners.
-func (client ServicePrincipalsClient) ListOwners(ctx context.Context, objectID string) (result DirectoryObjectListResult, err error) {
+func (client ServicePrincipalsClient) ListOwners(ctx context.Context, objectID string) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.ListOwners")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listOwnersNextResults
req, err := client.ListOwnersPreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListOwners", nil, "Failure preparing request")
@@ -464,12 +545,12 @@ func (client ServicePrincipalsClient) ListOwners(ctx context.Context, objectID s
resp, err := client.ListOwnersSender(req)
if err != nil {
- result.Response = autorest.Response{Response: resp}
+ result.dolr.Response = autorest.Response{Response: resp}
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListOwners", resp, "Failure sending request")
return
}
- result, err = client.ListOwnersResponder(resp)
+ result.dolr, err = client.ListOwnersResponder(resp)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListOwners", resp, "Failure responding to request")
}
@@ -517,10 +598,57 @@ func (client ServicePrincipalsClient) ListOwnersResponder(resp *http.Response) (
return
}
+// listOwnersNextResults retrieves the next set of results, if any.
+func (client ServicePrincipalsClient) listOwnersNextResults(ctx context.Context, lastResults DirectoryObjectListResult) (result DirectoryObjectListResult, err error) {
+ req, err := lastResults.directoryObjectListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "listOwnersNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListOwnersSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "listOwnersNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListOwnersResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "listOwnersNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListOwnersComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServicePrincipalsClient) ListOwnersComplete(ctx context.Context, objectID string) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.ListOwners")
+ 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.ListOwners(ctx, objectID)
+ return
+}
+
// ListPasswordCredentials gets the passwordCredentials associated with a service principal.
// Parameters:
// objectID - the object ID of the service principal.
func (client ServicePrincipalsClient) ListPasswordCredentials(ctx context.Context, objectID string) (result PasswordCredentialListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.ListPasswordCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPasswordCredentialsPreparer(ctx, objectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "ListPasswordCredentials", nil, "Failure preparing request")
@@ -582,11 +710,98 @@ func (client ServicePrincipalsClient) ListPasswordCredentialsResponder(resp *htt
return
}
+// Update updates a service principal in the directory.
+// Parameters:
+// objectID - the object ID of the service principal to delete.
+// parameters - parameters to update a service principal.
+func (client ServicePrincipalsClient) Update(ctx context.Context, objectID string, parameters ServicePrincipalUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdatePreparer(ctx, objectID, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client ServicePrincipalsClient) UpdatePreparer(ctx context.Context, objectID string, parameters ServicePrincipalUpdateParameters) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "objectId": autorest.Encode("path", objectID),
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/servicePrincipals/{objectId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServicePrincipalsClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client ServicePrincipalsClient) UpdateResponder(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
+}
+
// UpdateKeyCredentials update the keyCredentials associated with a service principal.
// Parameters:
// objectID - the object ID for which to get service principal information.
// parameters - parameters to update the keyCredentials of an existing service principal.
func (client ServicePrincipalsClient) UpdateKeyCredentials(ctx context.Context, objectID string, parameters KeyCredentialsUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.UpdateKeyCredentials")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateKeyCredentialsPreparer(ctx, objectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "UpdateKeyCredentials", nil, "Failure preparing request")
@@ -654,6 +869,16 @@ func (client ServicePrincipalsClient) UpdateKeyCredentialsResponder(resp *http.R
// objectID - the object ID of the service principal.
// parameters - parameters to update the passwordCredentials of an existing service principal.
func (client ServicePrincipalsClient) UpdatePasswordCredentials(ctx context.Context, objectID string, parameters PasswordCredentialsUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServicePrincipalsClient.UpdatePasswordCredentials")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePasswordCredentialsPreparer(ctx, objectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.ServicePrincipalsClient", "UpdatePasswordCredentials", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
new file mode 100644
index 000000000000..3b89fca32d70
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/signedinuser.go
@@ -0,0 +1,283 @@
+package graphrbac
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// SignedInUserClient is the the Graph RBAC Management Client
+type SignedInUserClient struct {
+ BaseClient
+}
+
+// NewSignedInUserClient creates an instance of the SignedInUserClient client.
+func NewSignedInUserClient(tenantID string) SignedInUserClient {
+ return NewSignedInUserClientWithBaseURI(DefaultBaseURI, tenantID)
+}
+
+// NewSignedInUserClientWithBaseURI creates an instance of the SignedInUserClient client.
+func NewSignedInUserClientWithBaseURI(baseURI string, tenantID string) SignedInUserClient {
+ return SignedInUserClient{NewWithBaseURI(baseURI, tenantID)}
+}
+
+// Get gets the details for the currently logged-in user.
+func (client SignedInUserClient) Get(ctx context.Context) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignedInUserClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client SignedInUserClient) GetPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/me", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client SignedInUserClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client SignedInUserClient) GetResponder(resp *http.Response) (result User, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOwnedObjects get the list of directory objects that are owned by the user.
+func (client SignedInUserClient) ListOwnedObjects(ctx context.Context) (result DirectoryObjectListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignedInUserClient.ListOwnedObjects")
+ defer func() {
+ sc := -1
+ if result.dolr.Response.Response != nil {
+ sc = result.dolr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult DirectoryObjectListResult) (DirectoryObjectListResult, error) {
+ if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
+ return DirectoryObjectListResult{}, nil
+ }
+ return client.ListOwnedObjectsNext(ctx, *lastResult.OdataNextLink)
+ }
+ req, err := client.ListOwnedObjectsPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjects", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOwnedObjectsSender(req)
+ if err != nil {
+ result.dolr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjects", resp, "Failure sending request")
+ return
+ }
+
+ result.dolr, err = client.ListOwnedObjectsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjects", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOwnedObjectsPreparer prepares the ListOwnedObjects request.
+func (client SignedInUserClient) ListOwnedObjectsPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/me/ownedObjects", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOwnedObjectsSender sends the ListOwnedObjects request. The method will close the
+// http.Response Body if it receives an error.
+func (client SignedInUserClient) ListOwnedObjectsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListOwnedObjectsResponder handles the response to the ListOwnedObjects request. The method always
+// closes the http.Response Body.
+func (client SignedInUserClient) ListOwnedObjectsResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListOwnedObjectsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client SignedInUserClient) ListOwnedObjectsComplete(ctx context.Context) (result DirectoryObjectListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignedInUserClient.ListOwnedObjects")
+ 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.ListOwnedObjects(ctx)
+ return
+}
+
+// ListOwnedObjectsNext get the list of directory objects that are owned by the user.
+// Parameters:
+// nextLink - next link for the list operation.
+func (client SignedInUserClient) ListOwnedObjectsNext(ctx context.Context, nextLink string) (result DirectoryObjectListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignedInUserClient.ListOwnedObjectsNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.ListOwnedObjectsNextPreparer(ctx, nextLink)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjectsNext", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListOwnedObjectsNextSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjectsNext", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.ListOwnedObjectsNextResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "graphrbac.SignedInUserClient", "ListOwnedObjectsNext", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListOwnedObjectsNextPreparer prepares the ListOwnedObjectsNext request.
+func (client SignedInUserClient) ListOwnedObjectsNextPreparer(ctx context.Context, nextLink string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "nextLink": nextLink,
+ "tenantID": autorest.Encode("path", client.TenantID),
+ }
+
+ const APIVersion = "1.6"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/{tenantID}/{nextLink}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListOwnedObjectsNextSender sends the ListOwnedObjectsNext request. The method will close the
+// http.Response Body if it receives an error.
+func (client SignedInUserClient) ListOwnedObjectsNextSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// ListOwnedObjectsNextResponder handles the response to the ListOwnedObjectsNext request. The method always
+// closes the http.Response Body.
+func (client SignedInUserClient) ListOwnedObjectsNextResponder(resp *http.Response) (result DirectoryObjectListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
index 9d0cd833ad29..a2ef210a27aa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/graphrbac/1.6/graphrbac/users.go
@@ -23,6 +23,7 @@ import (
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewUsersClientWithBaseURI(baseURI string, tenantID string) UsersClient {
// Parameters:
// parameters - parameters to create a user.
func (client UsersClient) Create(ctx context.Context, parameters UserCreateParameters) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Create")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AccountEnabled", Name: validation.Null, Rule: true, Chain: nil},
@@ -122,6 +133,16 @@ func (client UsersClient) CreateResponder(resp *http.Response) (result User, err
// Parameters:
// upnOrObjectID - the object ID or principal name of the user to delete.
func (client UsersClient) Delete(ctx context.Context, upnOrObjectID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, upnOrObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client UsersClient) DeleteResponder(resp *http.Response) (result autorest.
// Parameters:
// upnOrObjectID - the object ID or principal name of the user for which to get information.
func (client UsersClient) Get(ctx context.Context, upnOrObjectID string) (result User, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, upnOrObjectID)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Get", nil, "Failure preparing request")
@@ -252,6 +283,16 @@ func (client UsersClient) GetResponder(resp *http.Response) (result User, err er
// objectID - the object ID of the user for which to get group membership.
// parameters - user filtering parameters.
func (client UsersClient) GetMemberGroups(ctx context.Context, objectID string, parameters UserGetMemberGroupsParameters) (result UserGetMemberGroupsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.GetMemberGroups")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SecurityEnabledOnly", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -325,7 +366,17 @@ func (client UsersClient) GetMemberGroupsResponder(resp *http.Response) (result
// Parameters:
// filter - the filter to apply to the operation.
func (client UsersClient) List(ctx context.Context, filter string) (result UserListResultPage, err error) {
- result.fn = func(lastResult UserListResult) (UserListResult, error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.List")
+ defer func() {
+ sc := -1
+ if result.ulr.Response.Response != nil {
+ sc = result.ulr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = func(ctx context.Context, lastResult UserListResult) (UserListResult, error) {
if lastResult.OdataNextLink == nil || len(to.String(lastResult.OdataNextLink)) < 1 {
return UserListResult{}, nil
}
@@ -396,6 +447,16 @@ func (client UsersClient) ListResponder(resp *http.Response) (result UserListRes
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsersClient) ListComplete(ctx context.Context, filter string) (result UserListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.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, filter)
return
}
@@ -404,6 +465,16 @@ func (client UsersClient) ListComplete(ctx context.Context, filter string) (resu
// Parameters:
// nextLink - next link for the list operation.
func (client UsersClient) ListNext(ctx context.Context, nextLink string) (result UserListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.ListNext")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListNextPreparer(ctx, nextLink)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "ListNext", nil, "Failure preparing request")
@@ -470,6 +541,16 @@ func (client UsersClient) ListNextResponder(resp *http.Response) (result UserLis
// upnOrObjectID - the object ID or principal name of the user to update.
// parameters - parameters to update an existing user.
func (client UsersClient) Update(ctx context.Context, upnOrObjectID string, parameters UserUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, upnOrObjectID, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "graphrbac.UsersClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/certificates.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/certificates.go
index 9b05fe39655b..2e9f3ed7ea27 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/certificates.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/certificates.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) Cer
// ifMatch - eTag of the Certificate. Do not specify for creating a brand new certificate. Required to update
// an existing certificate.
func (client CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, certificateDescription CertificateBodyDescription, ifMatch string) (result CertificateDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.CreateOrUpdate")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil {
@@ -131,6 +142,16 @@ func (client CertificatesClient) CreateOrUpdateResponder(resp *http.Response) (r
// certificateName - the name of the certificate
// ifMatch - eTag of the Certificate.
func (client CertificatesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil {
@@ -208,6 +229,16 @@ func (client CertificatesClient) DeleteResponder(resp *http.Response) (result au
// certificateName - the name of the certificate
// ifMatch - eTag of the Certificate.
func (client CertificatesClient) GenerateVerificationCode(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, ifMatch string) (result CertificateWithNonceDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.GenerateVerificationCode")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil {
@@ -284,6 +315,16 @@ func (client CertificatesClient) GenerateVerificationCodeResponder(resp *http.Re
// resourceName - the name of the IoT hub.
// certificateName - the name of the certificate
func (client CertificatesClient) Get(ctx context.Context, resourceGroupName string, resourceName string, certificateName string) (result CertificateDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.Get")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil {
@@ -358,6 +399,16 @@ func (client CertificatesClient) GetResponder(resp *http.Response) (result Certi
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client CertificatesClient) ListByIotHub(ctx context.Context, resourceGroupName string, resourceName string) (result CertificateListDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.ListByIotHub")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByIotHubPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.CertificatesClient", "ListByIotHub", nil, "Failure preparing request")
@@ -429,6 +480,16 @@ func (client CertificatesClient) ListByIotHubResponder(resp *http.Response) (res
// certificateVerificationBody - the name of the certificate
// ifMatch - eTag of the Certificate.
func (client CertificatesClient) Verify(ctx context.Context, resourceGroupName string, resourceName string, certificateName string, certificateVerificationBody CertificateVerificationDescription, ifMatch string) (result CertificateDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.Verify")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[A-Za-z0-9-._]{1,64}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
index 3c5a515b96b9..0a46ca3c724f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/iothubresource.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewIotHubResourceClientWithBaseURI(baseURI string, subscriptionID string) I
// operationInputs - set the name parameter in the OperationInputs structure to the name of the IoT hub to
// check.
func (client IotHubResourceClient) CheckNameAvailability(ctx context.Context, operationInputs OperationInputs) (result IotHubNameAvailabilityInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.CheckNameAvailability")
+ 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: operationInputs,
Constraints: []validation.Constraint{{Target: "operationInputs.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -120,6 +131,16 @@ func (client IotHubResourceClient) CheckNameAvailabilityResponder(resp *http.Res
// eventHubEndpointName - the name of the Event Hub-compatible endpoint in the IoT hub.
// name - the name of the consumer group to add.
func (client IotHubResourceClient) CreateEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.CreateEventHubConsumerGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateEventHubConsumerGroupPreparer(ctx, resourceGroupName, resourceName, eventHubEndpointName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "CreateEventHubConsumerGroup", nil, "Failure preparing request")
@@ -194,6 +215,16 @@ func (client IotHubResourceClient) CreateEventHubConsumerGroupResponder(resp *ht
// ifMatch - eTag of the IoT Hub. Do not specify for creating a brand new IoT Hub. Required to update an
// existing IoT Hub.
func (client IotHubResourceClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, iotHubDescription IotHubDescription, ifMatch string) (result IotHubResourceCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: iotHubDescription,
Constraints: []validation.Constraint{{Target: "iotHubDescription.Properties", Name: validation.Null, Rule: false,
@@ -275,10 +306,6 @@ func (client IotHubResourceClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -301,6 +328,16 @@ func (client IotHubResourceClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubResourceDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "Delete", nil, "Failure preparing request")
@@ -346,10 +383,6 @@ func (client IotHubResourceClient) DeleteSender(req *http.Request) (future IotHu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent, http.StatusNotFound))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -374,6 +407,16 @@ func (client IotHubResourceClient) DeleteResponder(resp *http.Response) (result
// eventHubEndpointName - the name of the Event Hub-compatible endpoint in the IoT hub.
// name - the name of the consumer group to delete.
func (client IotHubResourceClient) DeleteEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.DeleteEventHubConsumerGroup")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteEventHubConsumerGroupPreparer(ctx, resourceGroupName, resourceName, eventHubEndpointName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "DeleteEventHubConsumerGroup", nil, "Failure preparing request")
@@ -445,6 +488,16 @@ func (client IotHubResourceClient) DeleteEventHubConsumerGroupResponder(resp *ht
// resourceName - the name of the IoT hub.
// exportDevicesParameters - the parameters that specify the export devices operation.
func (client IotHubResourceClient) ExportDevices(ctx context.Context, resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest) (result JobResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ExportDevices")
+ 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: exportDevicesParameters,
Constraints: []validation.Constraint{{Target: "exportDevicesParameters.ExportBlobContainerURI", Name: validation.Null, Rule: true, Chain: nil},
@@ -521,6 +574,16 @@ func (client IotHubResourceClient) ExportDevicesResponder(resp *http.Response) (
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubDescription, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "Get", nil, "Failure preparing request")
@@ -585,6 +648,16 @@ func (client IotHubResourceClient) GetResponder(resp *http.Response) (result Iot
// GetEndpointHealth get the health for routing endpoints.
func (client IotHubResourceClient) GetEndpointHealth(ctx context.Context, resourceGroupName string, iotHubName string) (result EndpointHealthDataListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetEndpointHealth")
+ defer func() {
+ sc := -1
+ if result.ehdlr.Response.Response != nil {
+ sc = result.ehdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.getEndpointHealthNextResults
req, err := client.GetEndpointHealthPreparer(ctx, resourceGroupName, iotHubName)
if err != nil {
@@ -649,8 +722,8 @@ func (client IotHubResourceClient) GetEndpointHealthResponder(resp *http.Respons
}
// getEndpointHealthNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) getEndpointHealthNextResults(lastResults EndpointHealthDataListResult) (result EndpointHealthDataListResult, err error) {
- req, err := lastResults.endpointHealthDataListResultPreparer()
+func (client IotHubResourceClient) getEndpointHealthNextResults(ctx context.Context, lastResults EndpointHealthDataListResult) (result EndpointHealthDataListResult, err error) {
+ req, err := lastResults.endpointHealthDataListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getEndpointHealthNextResults", nil, "Failure preparing next results request")
}
@@ -671,6 +744,16 @@ func (client IotHubResourceClient) getEndpointHealthNextResults(lastResults Endp
// GetEndpointHealthComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) GetEndpointHealthComplete(ctx context.Context, resourceGroupName string, iotHubName string) (result EndpointHealthDataListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetEndpointHealth")
+ 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.GetEndpointHealth(ctx, resourceGroupName, iotHubName)
return
}
@@ -682,6 +765,16 @@ func (client IotHubResourceClient) GetEndpointHealthComplete(ctx context.Context
// eventHubEndpointName - the name of the Event Hub-compatible endpoint in the IoT hub.
// name - the name of the consumer group to retrieve.
func (client IotHubResourceClient) GetEventHubConsumerGroup(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetEventHubConsumerGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetEventHubConsumerGroupPreparer(ctx, resourceGroupName, resourceName, eventHubEndpointName, name)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetEventHubConsumerGroup", nil, "Failure preparing request")
@@ -753,6 +846,16 @@ func (client IotHubResourceClient) GetEventHubConsumerGroupResponder(resp *http.
// resourceName - the name of the IoT hub.
// jobID - the job identifier.
func (client IotHubResourceClient) GetJob(ctx context.Context, resourceGroupName string, resourceName string, jobID string) (result JobResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetJob")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetJobPreparer(ctx, resourceGroupName, resourceName, jobID)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetJob", nil, "Failure preparing request")
@@ -823,6 +926,16 @@ func (client IotHubResourceClient) GetJobResponder(resp *http.Response) (result
// resourceName - the name of the IoT hub.
// keyName - the name of the shared access policy.
func (client IotHubResourceClient) GetKeysForKeyName(ctx context.Context, resourceGroupName string, resourceName string, keyName string) (result SharedAccessSignatureAuthorizationRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetKeysForKeyName")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetKeysForKeyNamePreparer(ctx, resourceGroupName, resourceName, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetKeysForKeyName", nil, "Failure preparing request")
@@ -891,6 +1004,16 @@ func (client IotHubResourceClient) GetKeysForKeyNameResponder(resp *http.Respons
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) GetQuotaMetrics(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubQuotaMetricInfoListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetQuotaMetrics")
+ defer func() {
+ sc := -1
+ if result.ihqmilr.Response.Response != nil {
+ sc = result.ihqmilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.getQuotaMetricsNextResults
req, err := client.GetQuotaMetricsPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
@@ -955,8 +1078,8 @@ func (client IotHubResourceClient) GetQuotaMetricsResponder(resp *http.Response)
}
// getQuotaMetricsNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) getQuotaMetricsNextResults(lastResults IotHubQuotaMetricInfoListResult) (result IotHubQuotaMetricInfoListResult, err error) {
- req, err := lastResults.iotHubQuotaMetricInfoListResultPreparer()
+func (client IotHubResourceClient) getQuotaMetricsNextResults(ctx context.Context, lastResults IotHubQuotaMetricInfoListResult) (result IotHubQuotaMetricInfoListResult, err error) {
+ req, err := lastResults.iotHubQuotaMetricInfoListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getQuotaMetricsNextResults", nil, "Failure preparing next results request")
}
@@ -977,6 +1100,16 @@ func (client IotHubResourceClient) getQuotaMetricsNextResults(lastResults IotHub
// GetQuotaMetricsComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) GetQuotaMetricsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubQuotaMetricInfoListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetQuotaMetrics")
+ 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.GetQuotaMetrics(ctx, resourceGroupName, resourceName)
return
}
@@ -986,6 +1119,16 @@ func (client IotHubResourceClient) GetQuotaMetricsComplete(ctx context.Context,
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) GetStats(ctx context.Context, resourceGroupName string, resourceName string) (result RegistryStatistics, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetStats")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetStatsPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "GetStats", nil, "Failure preparing request")
@@ -1053,6 +1196,16 @@ func (client IotHubResourceClient) GetStatsResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) GetValidSkus(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubSkuDescriptionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetValidSkus")
+ defer func() {
+ sc := -1
+ if result.ihsdlr.Response.Response != nil {
+ sc = result.ihsdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.getValidSkusNextResults
req, err := client.GetValidSkusPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
@@ -1117,8 +1270,8 @@ func (client IotHubResourceClient) GetValidSkusResponder(resp *http.Response) (r
}
// getValidSkusNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) getValidSkusNextResults(lastResults IotHubSkuDescriptionListResult) (result IotHubSkuDescriptionListResult, err error) {
- req, err := lastResults.iotHubSkuDescriptionListResultPreparer()
+func (client IotHubResourceClient) getValidSkusNextResults(ctx context.Context, lastResults IotHubSkuDescriptionListResult) (result IotHubSkuDescriptionListResult, err error) {
+ req, err := lastResults.iotHubSkuDescriptionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "getValidSkusNextResults", nil, "Failure preparing next results request")
}
@@ -1139,6 +1292,16 @@ func (client IotHubResourceClient) getValidSkusNextResults(lastResults IotHubSku
// GetValidSkusComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) GetValidSkusComplete(ctx context.Context, resourceGroupName string, resourceName string) (result IotHubSkuDescriptionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.GetValidSkus")
+ 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.GetValidSkus(ctx, resourceGroupName, resourceName)
return
}
@@ -1151,6 +1314,16 @@ func (client IotHubResourceClient) GetValidSkusComplete(ctx context.Context, res
// resourceName - the name of the IoT hub.
// importDevicesParameters - the parameters that specify the import devices operation.
func (client IotHubResourceClient) ImportDevices(ctx context.Context, resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest) (result JobResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ImportDevices")
+ 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: importDevicesParameters,
Constraints: []validation.Constraint{{Target: "importDevicesParameters.InputBlobContainerURI", Name: validation.Null, Rule: true, Chain: nil},
@@ -1226,6 +1399,16 @@ func (client IotHubResourceClient) ImportDevicesResponder(resp *http.Response) (
// Parameters:
// resourceGroupName - the name of the resource group that contains the IoT hub.
func (client IotHubResourceClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result IotHubDescriptionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ihdlr.Response.Response != nil {
+ sc = result.ihdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -1289,8 +1472,8 @@ func (client IotHubResourceClient) ListByResourceGroupResponder(resp *http.Respo
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) listByResourceGroupNextResults(lastResults IotHubDescriptionListResult) (result IotHubDescriptionListResult, err error) {
- req, err := lastResults.iotHubDescriptionListResultPreparer()
+func (client IotHubResourceClient) listByResourceGroupNextResults(ctx context.Context, lastResults IotHubDescriptionListResult) (result IotHubDescriptionListResult, err error) {
+ req, err := lastResults.iotHubDescriptionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -1311,12 +1494,32 @@ func (client IotHubResourceClient) listByResourceGroupNextResults(lastResults Io
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result IotHubDescriptionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListBySubscription get all the IoT hubs in a subscription.
func (client IotHubResourceClient) ListBySubscription(ctx context.Context) (result IotHubDescriptionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.ihdlr.Response.Response != nil {
+ sc = result.ihdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -1379,8 +1582,8 @@ func (client IotHubResourceClient) ListBySubscriptionResponder(resp *http.Respon
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) listBySubscriptionNextResults(lastResults IotHubDescriptionListResult) (result IotHubDescriptionListResult, err error) {
- req, err := lastResults.iotHubDescriptionListResultPreparer()
+func (client IotHubResourceClient) listBySubscriptionNextResults(ctx context.Context, lastResults IotHubDescriptionListResult) (result IotHubDescriptionListResult, err error) {
+ req, err := lastResults.iotHubDescriptionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -1401,6 +1604,16 @@ func (client IotHubResourceClient) listBySubscriptionNextResults(lastResults Iot
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) ListBySubscriptionComplete(ctx context.Context) (result IotHubDescriptionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -1412,6 +1625,16 @@ func (client IotHubResourceClient) ListBySubscriptionComplete(ctx context.Contex
// resourceName - the name of the IoT hub.
// eventHubEndpointName - the name of the Event Hub-compatible endpoint.
func (client IotHubResourceClient) ListEventHubConsumerGroups(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result EventHubConsumerGroupsListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListEventHubConsumerGroups")
+ defer func() {
+ sc := -1
+ if result.ehcglr.Response.Response != nil {
+ sc = result.ehcglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listEventHubConsumerGroupsNextResults
req, err := client.ListEventHubConsumerGroupsPreparer(ctx, resourceGroupName, resourceName, eventHubEndpointName)
if err != nil {
@@ -1477,8 +1700,8 @@ func (client IotHubResourceClient) ListEventHubConsumerGroupsResponder(resp *htt
}
// listEventHubConsumerGroupsNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) listEventHubConsumerGroupsNextResults(lastResults EventHubConsumerGroupsListResult) (result EventHubConsumerGroupsListResult, err error) {
- req, err := lastResults.eventHubConsumerGroupsListResultPreparer()
+func (client IotHubResourceClient) listEventHubConsumerGroupsNextResults(ctx context.Context, lastResults EventHubConsumerGroupsListResult) (result EventHubConsumerGroupsListResult, err error) {
+ req, err := lastResults.eventHubConsumerGroupsListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "listEventHubConsumerGroupsNextResults", nil, "Failure preparing next results request")
}
@@ -1499,6 +1722,16 @@ func (client IotHubResourceClient) listEventHubConsumerGroupsNextResults(lastRes
// ListEventHubConsumerGroupsComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) ListEventHubConsumerGroupsComplete(ctx context.Context, resourceGroupName string, resourceName string, eventHubEndpointName string) (result EventHubConsumerGroupsListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListEventHubConsumerGroups")
+ 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.ListEventHubConsumerGroups(ctx, resourceGroupName, resourceName, eventHubEndpointName)
return
}
@@ -1509,6 +1742,16 @@ func (client IotHubResourceClient) ListEventHubConsumerGroupsComplete(ctx contex
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) ListJobs(ctx context.Context, resourceGroupName string, resourceName string) (result JobResponseListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListJobs")
+ defer func() {
+ sc := -1
+ if result.jrlr.Response.Response != nil {
+ sc = result.jrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listJobsNextResults
req, err := client.ListJobsPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
@@ -1573,8 +1816,8 @@ func (client IotHubResourceClient) ListJobsResponder(resp *http.Response) (resul
}
// listJobsNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) listJobsNextResults(lastResults JobResponseListResult) (result JobResponseListResult, err error) {
- req, err := lastResults.jobResponseListResultPreparer()
+func (client IotHubResourceClient) listJobsNextResults(ctx context.Context, lastResults JobResponseListResult) (result JobResponseListResult, err error) {
+ req, err := lastResults.jobResponseListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "listJobsNextResults", nil, "Failure preparing next results request")
}
@@ -1595,6 +1838,16 @@ func (client IotHubResourceClient) listJobsNextResults(lastResults JobResponseLi
// ListJobsComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) ListJobsComplete(ctx context.Context, resourceGroupName string, resourceName string) (result JobResponseListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListJobs")
+ 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.ListJobs(ctx, resourceGroupName, resourceName)
return
}
@@ -1605,6 +1858,16 @@ func (client IotHubResourceClient) ListJobsComplete(ctx context.Context, resourc
// resourceGroupName - the name of the resource group that contains the IoT hub.
// resourceName - the name of the IoT hub.
func (client IotHubResourceClient) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result SharedAccessSignatureAuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListKeys")
+ defer func() {
+ sc := -1
+ if result.sasarlr.Response.Response != nil {
+ sc = result.sasarlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listKeysNextResults
req, err := client.ListKeysPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
@@ -1669,8 +1932,8 @@ func (client IotHubResourceClient) ListKeysResponder(resp *http.Response) (resul
}
// listKeysNextResults retrieves the next set of results, if any.
-func (client IotHubResourceClient) listKeysNextResults(lastResults SharedAccessSignatureAuthorizationRuleListResult) (result SharedAccessSignatureAuthorizationRuleListResult, err error) {
- req, err := lastResults.sharedAccessSignatureAuthorizationRuleListResultPreparer()
+func (client IotHubResourceClient) listKeysNextResults(ctx context.Context, lastResults SharedAccessSignatureAuthorizationRuleListResult) (result SharedAccessSignatureAuthorizationRuleListResult, err error) {
+ req, err := lastResults.sharedAccessSignatureAuthorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "listKeysNextResults", nil, "Failure preparing next results request")
}
@@ -1691,6 +1954,16 @@ func (client IotHubResourceClient) listKeysNextResults(lastResults SharedAccessS
// ListKeysComplete enumerates all values, automatically crossing page boundaries as required.
func (client IotHubResourceClient) ListKeysComplete(ctx context.Context, resourceGroupName string, resourceName string) (result SharedAccessSignatureAuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.ListKeys")
+ 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.ListKeys(ctx, resourceGroupName, resourceName)
return
}
@@ -1701,6 +1974,16 @@ func (client IotHubResourceClient) ListKeysComplete(ctx context.Context, resourc
// iotHubName - iotHub to be tested
// resourceGroupName - resource group which Iot Hub belongs to
func (client IotHubResourceClient) TestAllRoutes(ctx context.Context, input TestAllRoutesInput, iotHubName string, resourceGroupName string) (result TestAllRoutesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.TestAllRoutes")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.TestAllRoutesPreparer(ctx, input, iotHubName, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "TestAllRoutes", nil, "Failure preparing request")
@@ -1771,6 +2054,16 @@ func (client IotHubResourceClient) TestAllRoutesResponder(resp *http.Response) (
// iotHubName - iotHub to be tested
// resourceGroupName - resource group which Iot Hub belongs to
func (client IotHubResourceClient) TestRoute(ctx context.Context, input TestRouteInput, iotHubName string, resourceGroupName string) (result TestRouteResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.TestRoute")
+ 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: input,
Constraints: []validation.Constraint{{Target: "input.Route", Name: validation.Null, Rule: true,
@@ -1855,6 +2148,16 @@ func (client IotHubResourceClient) TestRouteResponder(resp *http.Response) (resu
// resourceName - name of iot hub to update.
// iotHubTags - updated tag information to set into the iot hub instance.
func (client IotHubResourceClient) Update(ctx context.Context, resourceGroupName string, resourceName string, iotHubTags TagsResource) (result IotHubResourceUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubResourceClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, iotHubTags)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.IotHubResourceClient", "Update", nil, "Failure preparing request")
@@ -1902,10 +2205,6 @@ func (client IotHubResourceClient) UpdateSender(req *http.Request) (future IotHu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
index 637f52e5b64b..59cd3fedce44 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/models.go
@@ -18,14 +18,19 @@ package devices
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices"
+
// AccessRights enumerates the values for access rights.
type AccessRights string
@@ -361,8 +366,8 @@ type CertificateProperties struct {
Certificate *string `json:"certificate,omitempty"`
}
-// CertificatePropertiesWithNonce the description of an X509 CA Certificate including the challenge nonce issued
-// for the Proof-Of-Possession flow.
+// CertificatePropertiesWithNonce the description of an X509 CA Certificate including the challenge nonce
+// issued for the Proof-Of-Possession flow.
type CertificatePropertiesWithNonce struct {
// Subject - The certificate's subject name.
Subject *string `json:"subject,omitempty"`
@@ -434,14 +439,24 @@ type EndpointHealthDataListResultIterator struct {
page EndpointHealthDataListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EndpointHealthDataListResultIterator) Next() error {
+func (iter *EndpointHealthDataListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointHealthDataListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -450,6 +465,13 @@ func (iter *EndpointHealthDataListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EndpointHealthDataListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EndpointHealthDataListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -469,6 +491,11 @@ func (iter EndpointHealthDataListResultIterator) Value() EndpointHealthData {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EndpointHealthDataListResultIterator type.
+func NewEndpointHealthDataListResultIterator(page EndpointHealthDataListResultPage) EndpointHealthDataListResultIterator {
+ return EndpointHealthDataListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ehdlr EndpointHealthDataListResult) IsEmpty() bool {
return ehdlr.Value == nil || len(*ehdlr.Value) == 0
@@ -476,11 +503,11 @@ func (ehdlr EndpointHealthDataListResult) IsEmpty() bool {
// endpointHealthDataListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ehdlr EndpointHealthDataListResult) endpointHealthDataListResultPreparer() (*http.Request, error) {
+func (ehdlr EndpointHealthDataListResult) endpointHealthDataListResultPreparer(ctx context.Context) (*http.Request, error) {
if ehdlr.NextLink == nil || len(to.String(ehdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ehdlr.NextLink)))
@@ -488,14 +515,24 @@ func (ehdlr EndpointHealthDataListResult) endpointHealthDataListResultPreparer()
// EndpointHealthDataListResultPage contains a page of EndpointHealthData values.
type EndpointHealthDataListResultPage struct {
- fn func(EndpointHealthDataListResult) (EndpointHealthDataListResult, error)
+ fn func(context.Context, EndpointHealthDataListResult) (EndpointHealthDataListResult, error)
ehdlr EndpointHealthDataListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EndpointHealthDataListResultPage) Next() error {
- next, err := page.fn(page.ehdlr)
+func (page *EndpointHealthDataListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointHealthDataListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ehdlr)
if err != nil {
return err
}
@@ -503,6 +540,13 @@ func (page *EndpointHealthDataListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EndpointHealthDataListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EndpointHealthDataListResultPage) NotDone() bool {
return !page.ehdlr.IsEmpty()
@@ -521,6 +565,11 @@ func (page EndpointHealthDataListResultPage) Values() []EndpointHealthData {
return *page.ehdlr.Value
}
+// Creates a new instance of the EndpointHealthDataListResultPage type.
+func NewEndpointHealthDataListResultPage(getNextPage func(context.Context, EndpointHealthDataListResult) (EndpointHealthDataListResult, error)) EndpointHealthDataListResultPage {
+ return EndpointHealthDataListResultPage{fn: getNextPage}
+}
+
// ErrorDetails error details.
type ErrorDetails struct {
// Code - The error code.
@@ -569,8 +618,8 @@ func (ehcgi EventHubConsumerGroupInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// EventHubConsumerGroupsListResult the JSON-serialized array of Event Hub-compatible consumer group names with a
-// next link.
+// EventHubConsumerGroupsListResult the JSON-serialized array of Event Hub-compatible consumer group names
+// with a next link.
type EventHubConsumerGroupsListResult struct {
autorest.Response `json:"-"`
// Value - List of consumer groups objects
@@ -579,21 +628,31 @@ type EventHubConsumerGroupsListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// EventHubConsumerGroupsListResultIterator provides access to a complete listing of EventHubConsumerGroupInfo
-// values.
+// EventHubConsumerGroupsListResultIterator provides access to a complete listing of
+// EventHubConsumerGroupInfo values.
type EventHubConsumerGroupsListResultIterator struct {
i int
page EventHubConsumerGroupsListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EventHubConsumerGroupsListResultIterator) Next() error {
+func (iter *EventHubConsumerGroupsListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubConsumerGroupsListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -602,6 +661,13 @@ func (iter *EventHubConsumerGroupsListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EventHubConsumerGroupsListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EventHubConsumerGroupsListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -621,6 +687,11 @@ func (iter EventHubConsumerGroupsListResultIterator) Value() EventHubConsumerGro
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EventHubConsumerGroupsListResultIterator type.
+func NewEventHubConsumerGroupsListResultIterator(page EventHubConsumerGroupsListResultPage) EventHubConsumerGroupsListResultIterator {
+ return EventHubConsumerGroupsListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ehcglr EventHubConsumerGroupsListResult) IsEmpty() bool {
return ehcglr.Value == nil || len(*ehcglr.Value) == 0
@@ -628,11 +699,11 @@ func (ehcglr EventHubConsumerGroupsListResult) IsEmpty() bool {
// eventHubConsumerGroupsListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ehcglr EventHubConsumerGroupsListResult) eventHubConsumerGroupsListResultPreparer() (*http.Request, error) {
+func (ehcglr EventHubConsumerGroupsListResult) eventHubConsumerGroupsListResultPreparer(ctx context.Context) (*http.Request, error) {
if ehcglr.NextLink == nil || len(to.String(ehcglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ehcglr.NextLink)))
@@ -640,14 +711,24 @@ func (ehcglr EventHubConsumerGroupsListResult) eventHubConsumerGroupsListResultP
// EventHubConsumerGroupsListResultPage contains a page of EventHubConsumerGroupInfo values.
type EventHubConsumerGroupsListResultPage struct {
- fn func(EventHubConsumerGroupsListResult) (EventHubConsumerGroupsListResult, error)
+ fn func(context.Context, EventHubConsumerGroupsListResult) (EventHubConsumerGroupsListResult, error)
ehcglr EventHubConsumerGroupsListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EventHubConsumerGroupsListResultPage) Next() error {
- next, err := page.fn(page.ehcglr)
+func (page *EventHubConsumerGroupsListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventHubConsumerGroupsListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ehcglr)
if err != nil {
return err
}
@@ -655,6 +736,13 @@ func (page *EventHubConsumerGroupsListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EventHubConsumerGroupsListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EventHubConsumerGroupsListResultPage) NotDone() bool {
return !page.ehcglr.IsEmpty()
@@ -673,6 +761,11 @@ func (page EventHubConsumerGroupsListResultPage) Values() []EventHubConsumerGrou
return *page.ehcglr.Value
}
+// Creates a new instance of the EventHubConsumerGroupsListResultPage type.
+func NewEventHubConsumerGroupsListResultPage(getNextPage func(context.Context, EventHubConsumerGroupsListResult) (EventHubConsumerGroupsListResult, error)) EventHubConsumerGroupsListResultPage {
+ return EventHubConsumerGroupsListResultPage{fn: getNextPage}
+}
+
// EventHubProperties the properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.
type EventHubProperties struct {
// RetentionTimeInDays - The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages
@@ -695,8 +788,8 @@ type ExportDevicesRequest struct {
ExcludeKeys *bool `json:"excludeKeys,omitempty"`
}
-// FallbackRouteProperties the properties of the fallback route. IoT Hub uses these properties when it routes
-// messages to the fallback endpoint.
+// FallbackRouteProperties the properties of the fallback route. IoT Hub uses these properties when it
+// routes messages to the fallback endpoint.
type FallbackRouteProperties struct {
// Name - The name of the route. The name can only include alphanumeric characters, periods, underscores, hyphens, has a maximum length of 64 characters, and must be unique.
Name *string `json:"name,omitempty"`
@@ -806,14 +899,24 @@ type IotHubDescriptionListResultIterator struct {
page IotHubDescriptionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IotHubDescriptionListResultIterator) Next() error {
+func (iter *IotHubDescriptionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubDescriptionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -822,6 +925,13 @@ func (iter *IotHubDescriptionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IotHubDescriptionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IotHubDescriptionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -841,6 +951,11 @@ func (iter IotHubDescriptionListResultIterator) Value() IotHubDescription {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IotHubDescriptionListResultIterator type.
+func NewIotHubDescriptionListResultIterator(page IotHubDescriptionListResultPage) IotHubDescriptionListResultIterator {
+ return IotHubDescriptionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ihdlr IotHubDescriptionListResult) IsEmpty() bool {
return ihdlr.Value == nil || len(*ihdlr.Value) == 0
@@ -848,11 +963,11 @@ func (ihdlr IotHubDescriptionListResult) IsEmpty() bool {
// iotHubDescriptionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ihdlr IotHubDescriptionListResult) iotHubDescriptionListResultPreparer() (*http.Request, error) {
+func (ihdlr IotHubDescriptionListResult) iotHubDescriptionListResultPreparer(ctx context.Context) (*http.Request, error) {
if ihdlr.NextLink == nil || len(to.String(ihdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ihdlr.NextLink)))
@@ -860,14 +975,24 @@ func (ihdlr IotHubDescriptionListResult) iotHubDescriptionListResultPreparer() (
// IotHubDescriptionListResultPage contains a page of IotHubDescription values.
type IotHubDescriptionListResultPage struct {
- fn func(IotHubDescriptionListResult) (IotHubDescriptionListResult, error)
+ fn func(context.Context, IotHubDescriptionListResult) (IotHubDescriptionListResult, error)
ihdlr IotHubDescriptionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IotHubDescriptionListResultPage) Next() error {
- next, err := page.fn(page.ihdlr)
+func (page *IotHubDescriptionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubDescriptionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ihdlr)
if err != nil {
return err
}
@@ -875,6 +1000,13 @@ func (page *IotHubDescriptionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IotHubDescriptionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IotHubDescriptionListResultPage) NotDone() bool {
return !page.ihdlr.IsEmpty()
@@ -893,6 +1025,11 @@ func (page IotHubDescriptionListResultPage) Values() []IotHubDescription {
return *page.ihdlr.Value
}
+// Creates a new instance of the IotHubDescriptionListResultPage type.
+func NewIotHubDescriptionListResultPage(getNextPage func(context.Context, IotHubDescriptionListResult) (IotHubDescriptionListResult, error)) IotHubDescriptionListResultPage {
+ return IotHubDescriptionListResultPage{fn: getNextPage}
+}
+
// IotHubNameAvailabilityInfo the properties indicating whether a given IoT hub name is available.
type IotHubNameAvailabilityInfo struct {
autorest.Response `json:"-"`
@@ -912,7 +1049,7 @@ type IotHubProperties struct {
IPFilterRules *[]IPFilterRule `json:"ipFilterRules,omitempty"`
// ProvisioningState - The provisioning state.
ProvisioningState *string `json:"provisioningState,omitempty"`
- // State - Thehub state state.
+ // State - The hub state.
State *string `json:"state,omitempty"`
// HostName - The name of the host.
HostName *string `json:"hostName,omitempty"`
@@ -991,7 +1128,8 @@ type IotHubQuotaMetricInfo struct {
MaxValue *int64 `json:"maxValue,omitempty"`
}
-// IotHubQuotaMetricInfoListResult the JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.
+// IotHubQuotaMetricInfoListResult the JSON-serialized array of IotHubQuotaMetricInfo objects with a next
+// link.
type IotHubQuotaMetricInfoListResult struct {
autorest.Response `json:"-"`
// Value - The array of quota metrics objects.
@@ -1000,20 +1138,31 @@ type IotHubQuotaMetricInfoListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IotHubQuotaMetricInfoListResultIterator provides access to a complete listing of IotHubQuotaMetricInfo values.
+// IotHubQuotaMetricInfoListResultIterator provides access to a complete listing of IotHubQuotaMetricInfo
+// values.
type IotHubQuotaMetricInfoListResultIterator struct {
i int
page IotHubQuotaMetricInfoListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IotHubQuotaMetricInfoListResultIterator) Next() error {
+func (iter *IotHubQuotaMetricInfoListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubQuotaMetricInfoListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1022,6 +1171,13 @@ func (iter *IotHubQuotaMetricInfoListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IotHubQuotaMetricInfoListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IotHubQuotaMetricInfoListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1041,6 +1197,11 @@ func (iter IotHubQuotaMetricInfoListResultIterator) Value() IotHubQuotaMetricInf
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IotHubQuotaMetricInfoListResultIterator type.
+func NewIotHubQuotaMetricInfoListResultIterator(page IotHubQuotaMetricInfoListResultPage) IotHubQuotaMetricInfoListResultIterator {
+ return IotHubQuotaMetricInfoListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ihqmilr IotHubQuotaMetricInfoListResult) IsEmpty() bool {
return ihqmilr.Value == nil || len(*ihqmilr.Value) == 0
@@ -1048,11 +1209,11 @@ func (ihqmilr IotHubQuotaMetricInfoListResult) IsEmpty() bool {
// iotHubQuotaMetricInfoListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ihqmilr IotHubQuotaMetricInfoListResult) iotHubQuotaMetricInfoListResultPreparer() (*http.Request, error) {
+func (ihqmilr IotHubQuotaMetricInfoListResult) iotHubQuotaMetricInfoListResultPreparer(ctx context.Context) (*http.Request, error) {
if ihqmilr.NextLink == nil || len(to.String(ihqmilr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ihqmilr.NextLink)))
@@ -1060,14 +1221,24 @@ func (ihqmilr IotHubQuotaMetricInfoListResult) iotHubQuotaMetricInfoListResultPr
// IotHubQuotaMetricInfoListResultPage contains a page of IotHubQuotaMetricInfo values.
type IotHubQuotaMetricInfoListResultPage struct {
- fn func(IotHubQuotaMetricInfoListResult) (IotHubQuotaMetricInfoListResult, error)
+ fn func(context.Context, IotHubQuotaMetricInfoListResult) (IotHubQuotaMetricInfoListResult, error)
ihqmilr IotHubQuotaMetricInfoListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IotHubQuotaMetricInfoListResultPage) Next() error {
- next, err := page.fn(page.ihqmilr)
+func (page *IotHubQuotaMetricInfoListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubQuotaMetricInfoListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ihqmilr)
if err != nil {
return err
}
@@ -1075,6 +1246,13 @@ func (page *IotHubQuotaMetricInfoListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IotHubQuotaMetricInfoListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IotHubQuotaMetricInfoListResultPage) NotDone() bool {
return !page.ihqmilr.IsEmpty()
@@ -1093,8 +1271,13 @@ func (page IotHubQuotaMetricInfoListResultPage) Values() []IotHubQuotaMetricInfo
return *page.ihqmilr.Value
}
-// IotHubResourceCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// Creates a new instance of the IotHubQuotaMetricInfoListResultPage type.
+func NewIotHubQuotaMetricInfoListResultPage(getNextPage func(context.Context, IotHubQuotaMetricInfoListResult) (IotHubQuotaMetricInfoListResult, error)) IotHubQuotaMetricInfoListResultPage {
+ return IotHubQuotaMetricInfoListResultPage{fn: getNextPage}
+}
+
+// IotHubResourceCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type IotHubResourceCreateOrUpdateFuture struct {
azure.Future
}
@@ -1122,7 +1305,8 @@ func (future *IotHubResourceCreateOrUpdateFuture) Result(client IotHubResourceCl
return
}
-// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// IotHubResourceDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type IotHubResourceDeleteFuture struct {
azure.Future
}
@@ -1150,7 +1334,8 @@ func (future *IotHubResourceDeleteFuture) Result(client IotHubResourceClient) (s
return
}
-// IotHubResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// IotHubResourceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type IotHubResourceUpdateFuture struct {
azure.Future
}
@@ -1188,7 +1373,8 @@ type IotHubSkuDescription struct {
Capacity *IotHubCapacity `json:"capacity,omitempty"`
}
-// IotHubSkuDescriptionListResult the JSON-serialized array of IotHubSkuDescription objects with a next link.
+// IotHubSkuDescriptionListResult the JSON-serialized array of IotHubSkuDescription objects with a next
+// link.
type IotHubSkuDescriptionListResult struct {
autorest.Response `json:"-"`
// Value - The array of IotHubSkuDescription.
@@ -1197,20 +1383,31 @@ type IotHubSkuDescriptionListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IotHubSkuDescriptionListResultIterator provides access to a complete listing of IotHubSkuDescription values.
+// IotHubSkuDescriptionListResultIterator provides access to a complete listing of IotHubSkuDescription
+// values.
type IotHubSkuDescriptionListResultIterator struct {
i int
page IotHubSkuDescriptionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IotHubSkuDescriptionListResultIterator) Next() error {
+func (iter *IotHubSkuDescriptionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubSkuDescriptionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1219,6 +1416,13 @@ func (iter *IotHubSkuDescriptionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IotHubSkuDescriptionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IotHubSkuDescriptionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1238,6 +1442,11 @@ func (iter IotHubSkuDescriptionListResultIterator) Value() IotHubSkuDescription
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IotHubSkuDescriptionListResultIterator type.
+func NewIotHubSkuDescriptionListResultIterator(page IotHubSkuDescriptionListResultPage) IotHubSkuDescriptionListResultIterator {
+ return IotHubSkuDescriptionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ihsdlr IotHubSkuDescriptionListResult) IsEmpty() bool {
return ihsdlr.Value == nil || len(*ihsdlr.Value) == 0
@@ -1245,11 +1454,11 @@ func (ihsdlr IotHubSkuDescriptionListResult) IsEmpty() bool {
// iotHubSkuDescriptionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ihsdlr IotHubSkuDescriptionListResult) iotHubSkuDescriptionListResultPreparer() (*http.Request, error) {
+func (ihsdlr IotHubSkuDescriptionListResult) iotHubSkuDescriptionListResultPreparer(ctx context.Context) (*http.Request, error) {
if ihsdlr.NextLink == nil || len(to.String(ihsdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ihsdlr.NextLink)))
@@ -1257,14 +1466,24 @@ func (ihsdlr IotHubSkuDescriptionListResult) iotHubSkuDescriptionListResultPrepa
// IotHubSkuDescriptionListResultPage contains a page of IotHubSkuDescription values.
type IotHubSkuDescriptionListResultPage struct {
- fn func(IotHubSkuDescriptionListResult) (IotHubSkuDescriptionListResult, error)
+ fn func(context.Context, IotHubSkuDescriptionListResult) (IotHubSkuDescriptionListResult, error)
ihsdlr IotHubSkuDescriptionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IotHubSkuDescriptionListResultPage) Next() error {
- next, err := page.fn(page.ihsdlr)
+func (page *IotHubSkuDescriptionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IotHubSkuDescriptionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ihsdlr)
if err != nil {
return err
}
@@ -1272,6 +1491,13 @@ func (page *IotHubSkuDescriptionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IotHubSkuDescriptionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IotHubSkuDescriptionListResultPage) NotDone() bool {
return !page.ihsdlr.IsEmpty()
@@ -1290,6 +1516,11 @@ func (page IotHubSkuDescriptionListResultPage) Values() []IotHubSkuDescription {
return *page.ihsdlr.Value
}
+// Creates a new instance of the IotHubSkuDescriptionListResultPage type.
+func NewIotHubSkuDescriptionListResultPage(getNextPage func(context.Context, IotHubSkuDescriptionListResult) (IotHubSkuDescriptionListResult, error)) IotHubSkuDescriptionListResultPage {
+ return IotHubSkuDescriptionListResultPage{fn: getNextPage}
+}
+
// IotHubSkuInfo information about the SKU of the IoT hub.
type IotHubSkuInfo struct {
// Name - The name of the SKU. Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3'
@@ -1346,14 +1577,24 @@ type JobResponseListResultIterator struct {
page JobResponseListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *JobResponseListResultIterator) Next() error {
+func (iter *JobResponseListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobResponseListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1362,6 +1603,13 @@ func (iter *JobResponseListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *JobResponseListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JobResponseListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1381,6 +1629,11 @@ func (iter JobResponseListResultIterator) Value() JobResponse {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the JobResponseListResultIterator type.
+func NewJobResponseListResultIterator(page JobResponseListResultPage) JobResponseListResultIterator {
+ return JobResponseListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (jrlr JobResponseListResult) IsEmpty() bool {
return jrlr.Value == nil || len(*jrlr.Value) == 0
@@ -1388,11 +1641,11 @@ func (jrlr JobResponseListResult) IsEmpty() bool {
// jobResponseListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (jrlr JobResponseListResult) jobResponseListResultPreparer() (*http.Request, error) {
+func (jrlr JobResponseListResult) jobResponseListResultPreparer(ctx context.Context) (*http.Request, error) {
if jrlr.NextLink == nil || len(to.String(jrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jrlr.NextLink)))
@@ -1400,14 +1653,24 @@ func (jrlr JobResponseListResult) jobResponseListResultPreparer() (*http.Request
// JobResponseListResultPage contains a page of JobResponse values.
type JobResponseListResultPage struct {
- fn func(JobResponseListResult) (JobResponseListResult, error)
+ fn func(context.Context, JobResponseListResult) (JobResponseListResult, error)
jrlr JobResponseListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *JobResponseListResultPage) Next() error {
- next, err := page.fn(page.jrlr)
+func (page *JobResponseListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JobResponseListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.jrlr)
if err != nil {
return err
}
@@ -1415,6 +1678,13 @@ func (page *JobResponseListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *JobResponseListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JobResponseListResultPage) NotDone() bool {
return !page.jrlr.IsEmpty()
@@ -1433,6 +1703,11 @@ func (page JobResponseListResultPage) Values() []JobResponse {
return *page.jrlr.Value
}
+// Creates a new instance of the JobResponseListResultPage type.
+func NewJobResponseListResultPage(getNextPage func(context.Context, JobResponseListResult) (JobResponseListResult, error)) JobResponseListResultPage {
+ return JobResponseListResultPage{fn: getNextPage}
+}
+
// MatchedRoute routes that matched
type MatchedRoute struct {
// Properties - Properties of routes that matched
@@ -1481,8 +1756,8 @@ type OperationInputs struct {
Name *string `json:"name,omitempty"`
}
-// OperationListResult result of the request to list IoT Hub operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationListResult result of the request to list IoT Hub operations. It contains a list of operations
+// and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of IoT Hub operations supported by the Microsoft.Devices resource provider.
@@ -1497,14 +1772,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1513,6 +1798,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1532,6 +1824,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1539,11 +1836,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1551,14 +1848,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1566,6 +1873,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1584,9 +1898,15 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
-// OperationsMonitoringProperties the operations monitoring properties for the IoT hub. The possible keys to the
-// dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations,
-// Routes, D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations, DirectMethods.
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
+// OperationsMonitoringProperties the operations monitoring properties for the IoT hub. The possible keys
+// to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations,
+// FileUploadOperations, Routes, D2CTwinOperations, C2DTwinOperations, TwinQueries, JobsOperations,
+// DirectMethods.
type OperationsMonitoringProperties struct {
Events map[string]*OperationMonitoringLevel `json:"events"`
}
@@ -1686,9 +2006,9 @@ type RouteProperties struct {
IsEnabled *bool `json:"isEnabled,omitempty"`
}
-// RoutingEndpoints the properties related to the custom endpoints to which your IoT hub routes messages based on
-// the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only
-// 1 custom endpoint is allowed across all endpoint types for free hubs.
+// RoutingEndpoints the properties related to the custom endpoints to which your IoT hub routes messages
+// based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for
+// paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
type RoutingEndpoints struct {
// ServiceBusQueues - The list of Service Bus queue endpoints that IoT hub routes the messages to, based on the routing rules.
ServiceBusQueues *[]RoutingServiceBusQueueEndpointProperties `json:"serviceBusQueues,omitempty"`
@@ -1789,7 +2109,7 @@ type RoutingStorageContainerProperties struct {
BatchFrequencyInSeconds *int32 `json:"batchFrequencyInSeconds,omitempty"`
// MaxChunkSizeInBytes - Maximum number of bytes for each blob written to storage. Value should be between 10485760(10MB) and 524288000(500MB). Default value is 314572800(300MB).
MaxChunkSizeInBytes *int32 `json:"maxChunkSizeInBytes,omitempty"`
- // Encoding - Encoding that is used to serialize messages to blobs. Supported values are 'avro' and 'avrodeflate'. Default value is 'avro'.
+ // Encoding - Encoding that is used to serialize messages to blobs. Supported values are 'avro' and 'avroDeflate'. Default value is 'avro'.
Encoding *string `json:"encoding,omitempty"`
}
@@ -1843,14 +2163,24 @@ type SharedAccessSignatureAuthorizationRuleListResultIterator struct {
page SharedAccessSignatureAuthorizationRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) Next() error {
+func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessSignatureAuthorizationRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1859,6 +2189,13 @@ func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) Next() err
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SharedAccessSignatureAuthorizationRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SharedAccessSignatureAuthorizationRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1878,6 +2215,11 @@ func (iter SharedAccessSignatureAuthorizationRuleListResultIterator) Value() Sha
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SharedAccessSignatureAuthorizationRuleListResultIterator type.
+func NewSharedAccessSignatureAuthorizationRuleListResultIterator(page SharedAccessSignatureAuthorizationRuleListResultPage) SharedAccessSignatureAuthorizationRuleListResultIterator {
+ return SharedAccessSignatureAuthorizationRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) IsEmpty() bool {
return sasarlr.Value == nil || len(*sasarlr.Value) == 0
@@ -1885,27 +2227,37 @@ func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) IsEmpty() bool {
// sharedAccessSignatureAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) sharedAccessSignatureAuthorizationRuleListResultPreparer() (*http.Request, error) {
+func (sasarlr SharedAccessSignatureAuthorizationRuleListResult) sharedAccessSignatureAuthorizationRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if sasarlr.NextLink == nil || len(to.String(sasarlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sasarlr.NextLink)))
}
-// SharedAccessSignatureAuthorizationRuleListResultPage contains a page of SharedAccessSignatureAuthorizationRule
-// values.
+// SharedAccessSignatureAuthorizationRuleListResultPage contains a page of
+// SharedAccessSignatureAuthorizationRule values.
type SharedAccessSignatureAuthorizationRuleListResultPage struct {
- fn func(SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)
+ fn func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)
sasarlr SharedAccessSignatureAuthorizationRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SharedAccessSignatureAuthorizationRuleListResultPage) Next() error {
- next, err := page.fn(page.sasarlr)
+func (page *SharedAccessSignatureAuthorizationRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessSignatureAuthorizationRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sasarlr)
if err != nil {
return err
}
@@ -1913,6 +2265,13 @@ func (page *SharedAccessSignatureAuthorizationRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SharedAccessSignatureAuthorizationRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SharedAccessSignatureAuthorizationRuleListResultPage) NotDone() bool {
return !page.sasarlr.IsEmpty()
@@ -1931,9 +2290,14 @@ func (page SharedAccessSignatureAuthorizationRuleListResultPage) Values() []Shar
return *page.sasarlr.Value
}
+// Creates a new instance of the SharedAccessSignatureAuthorizationRuleListResultPage type.
+func NewSharedAccessSignatureAuthorizationRuleListResultPage(getNextPage func(context.Context, SharedAccessSignatureAuthorizationRuleListResult) (SharedAccessSignatureAuthorizationRuleListResult, error)) SharedAccessSignatureAuthorizationRuleListResultPage {
+ return SharedAccessSignatureAuthorizationRuleListResultPage{fn: getNextPage}
+}
+
// StorageEndpointProperties the properties of the Azure Storage endpoint for file upload.
type StorageEndpointProperties struct {
- // SasTTLAsIso8601 - The period of time for which the the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
+ // SasTTLAsIso8601 - The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.
SasTTLAsIso8601 *string `json:"sasTtlAsIso8601,omitempty"`
// ConnectionString - The connection string for the Azure Storage account to which files are uploaded.
ConnectionString *string `json:"connectionString,omitempty"`
@@ -1941,8 +2305,8 @@ type StorageEndpointProperties struct {
ContainerName *string `json:"containerName,omitempty"`
}
-// TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on an IoT
-// Hub instance.
+// TagsResource a container holding only the Tags for a resource, allowing the user to update the tags on
+// an IoT Hub instance.
type TagsResource struct {
// Tags - Resource tags
Tags map[string]*string `json:"tags"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/operations.go
index 01395bf228a5..6c4d7a65e7d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available IoT Hub REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devices.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go
index a80dd0c0413b..a95e69a5a2dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/iothub/mgmt/2018-04-01/devices/resourceprovidercommon.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewResourceProviderCommonClientWithBaseURI(baseURI string, subscriptionID s
// GetSubscriptionQuota get the number of free and paid iot hubs in the subscription
func (client ResourceProviderCommonClient) GetSubscriptionQuota(ctx context.Context) (result UserSubscriptionQuotaListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceProviderCommonClient.GetSubscriptionQuota")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetSubscriptionQuotaPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "devices.ResourceProviderCommonClient", "GetSubscriptionQuota", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go
index 731e99857f56..42943238bae2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/client.go
@@ -25,6 +25,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -58,6 +59,16 @@ func NewWithoutDefaults() BaseClient {
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// keyName - the name of the key.
func (client BaseClient) BackupKey(ctx context.Context, vaultBaseURL string, keyName string) (result BackupKeyResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.BackupKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.BackupKeyPreparer(ctx, vaultBaseURL, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "BackupKey", nil, "Failure preparing request")
@@ -128,6 +139,16 @@ func (client BaseClient) BackupKeyResponder(resp *http.Response) (result BackupK
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// secretName - the name of the secret.
func (client BaseClient) BackupSecret(ctx context.Context, vaultBaseURL string, secretName string) (result BackupSecretResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.BackupSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.BackupSecretPreparer(ctx, vaultBaseURL, secretName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "BackupSecret", nil, "Failure preparing request")
@@ -199,6 +220,16 @@ func (client BaseClient) BackupSecretResponder(resp *http.Response) (result Back
// certificateName - the name of the certificate.
// parameters - the parameters to create a certificate.
func (client BaseClient) CreateCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters CertificateCreateParameters) (result CertificateOperation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateCertificate")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z-]+$`, Chain: nil}}},
@@ -285,6 +316,16 @@ func (client BaseClient) CreateCertificateResponder(resp *http.Response) (result
// keyName - the name for the new key. The system will generate the version name for the new key.
// parameters - the parameters to create a key.
func (client BaseClient) CreateKey(ctx context.Context, vaultBaseURL string, keyName string, parameters KeyCreateParameters) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CreateKey")
+ 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: keyName,
Constraints: []validation.Constraint{{Target: "keyName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z-]+$`, Chain: nil}}}}); err != nil {
@@ -368,6 +409,16 @@ func (client BaseClient) CreateKeyResponder(resp *http.Response) (result KeyBund
// keyVersion - the version of the key.
// parameters - the parameters for the decryption operation.
func (client BaseClient) Decrypt(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Decrypt")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -448,6 +499,16 @@ func (client BaseClient) DecryptResponder(resp *http.Response) (result KeyOperat
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate.
func (client BaseClient) DeleteCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result DeletedCertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteCertificate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteCertificatePreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteCertificate", nil, "Failure preparing request")
@@ -517,6 +578,16 @@ func (client BaseClient) DeleteCertificateResponder(resp *http.Response) (result
// Parameters:
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
func (client BaseClient) DeleteCertificateContacts(ctx context.Context, vaultBaseURL string) (result Contacts, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteCertificateContacts")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteCertificateContactsPreparer(ctx, vaultBaseURL)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteCertificateContacts", nil, "Failure preparing request")
@@ -583,6 +654,16 @@ func (client BaseClient) DeleteCertificateContactsResponder(resp *http.Response)
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// issuerName - the name of the issuer.
func (client BaseClient) DeleteCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string) (result IssuerBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteCertificateIssuer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteCertificateIssuerPreparer(ctx, vaultBaseURL, issuerName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteCertificateIssuer", nil, "Failure preparing request")
@@ -653,6 +734,16 @@ func (client BaseClient) DeleteCertificateIssuerResponder(resp *http.Response) (
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate.
func (client BaseClient) DeleteCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string) (result CertificateOperation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteCertificateOperation")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteCertificateOperationPreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteCertificateOperation", nil, "Failure preparing request")
@@ -724,6 +815,16 @@ func (client BaseClient) DeleteCertificateOperationResponder(resp *http.Response
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// keyName - the name of the key to delete.
func (client BaseClient) DeleteKey(ctx context.Context, vaultBaseURL string, keyName string) (result DeletedKeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteKeyPreparer(ctx, vaultBaseURL, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteKey", nil, "Failure preparing request")
@@ -795,6 +896,16 @@ func (client BaseClient) DeleteKeyResponder(resp *http.Response) (result Deleted
// storageAccountName - the name of the storage account.
// sasDefinitionName - the name of the SAS definition.
func (client BaseClient) DeleteSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result SasDefinitionBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteSasDefinition")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -874,6 +985,16 @@ func (client BaseClient) DeleteSasDefinitionResponder(resp *http.Response) (resu
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// secretName - the name of the secret.
func (client BaseClient) DeleteSecret(ctx context.Context, vaultBaseURL string, secretName string) (result DeletedSecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteSecretPreparer(ctx, vaultBaseURL, secretName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "DeleteSecret", nil, "Failure preparing request")
@@ -943,6 +1064,16 @@ func (client BaseClient) DeleteSecretResponder(resp *http.Response) (result Dele
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// storageAccountName - the name of the storage account.
func (client BaseClient) DeleteStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string) (result StorageBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.DeleteStorageAccount")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil {
@@ -1018,7 +1149,7 @@ func (client BaseClient) DeleteStorageAccountResponder(resp *http.Response) (res
// dependent on the target key and the encryption algorithm to be used. The ENCRYPT operation is only strictly
// necessary for symmetric keys stored in Azure Key Vault since protection with an asymmetric key can be performed
// using public portion of the key. This operation is supported for asymmetric keys as a convenience for callers that
-// have a key-reference but do not have access to the public key material. This operation requires the keys/encypt
+// have a key-reference but do not have access to the public key material. This operation requires the keys/encrypt
// permission.
// Parameters:
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
@@ -1026,6 +1157,16 @@ func (client BaseClient) DeleteStorageAccountResponder(resp *http.Response) (res
// keyVersion - the version of the key.
// parameters - the parameters for the encryption operation.
func (client BaseClient) Encrypt(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Encrypt")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -1106,6 +1247,16 @@ func (client BaseClient) EncryptResponder(resp *http.Response) (result KeyOperat
// certificateName - the name of the certificate in the given vault.
// certificateVersion - the version of the certificate.
func (client BaseClient) GetCertificate(ctx context.Context, vaultBaseURL string, certificateName string, certificateVersion string) (result CertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCertificatePreparer(ctx, vaultBaseURL, certificateName, certificateVersion)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetCertificate", nil, "Failure preparing request")
@@ -1176,6 +1327,16 @@ func (client BaseClient) GetCertificateResponder(resp *http.Response) (result Ce
// Parameters:
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
func (client BaseClient) GetCertificateContacts(ctx context.Context, vaultBaseURL string) (result Contacts, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateContacts")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCertificateContactsPreparer(ctx, vaultBaseURL)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetCertificateContacts", nil, "Failure preparing request")
@@ -1242,6 +1403,16 @@ func (client BaseClient) GetCertificateContactsResponder(resp *http.Response) (r
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// issuerName - the name of the issuer.
func (client BaseClient) GetCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string) (result IssuerBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateIssuer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCertificateIssuerPreparer(ctx, vaultBaseURL, issuerName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetCertificateIssuer", nil, "Failure preparing request")
@@ -1313,6 +1484,16 @@ func (client BaseClient) GetCertificateIssuerResponder(resp *http.Response) (res
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetCertificateIssuers(ctx context.Context, vaultBaseURL string, maxresults *int32) (result CertificateIssuerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateIssuers")
+ defer func() {
+ sc := -1
+ if result.cilr.Response.Response != nil {
+ sc = result.cilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -1387,8 +1568,8 @@ func (client BaseClient) GetCertificateIssuersResponder(resp *http.Response) (re
}
// getCertificateIssuersNextResults retrieves the next set of results, if any.
-func (client BaseClient) getCertificateIssuersNextResults(lastResults CertificateIssuerListResult) (result CertificateIssuerListResult, err error) {
- req, err := lastResults.certificateIssuerListResultPreparer()
+func (client BaseClient) getCertificateIssuersNextResults(ctx context.Context, lastResults CertificateIssuerListResult) (result CertificateIssuerListResult, err error) {
+ req, err := lastResults.certificateIssuerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getCertificateIssuersNextResults", nil, "Failure preparing next results request")
}
@@ -1409,6 +1590,16 @@ func (client BaseClient) getCertificateIssuersNextResults(lastResults Certificat
// GetCertificateIssuersComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetCertificateIssuersComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result CertificateIssuerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateIssuers")
+ 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.GetCertificateIssuers(ctx, vaultBaseURL, maxresults)
return
}
@@ -1419,6 +1610,16 @@ func (client BaseClient) GetCertificateIssuersComplete(ctx context.Context, vaul
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate.
func (client BaseClient) GetCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string) (result CertificateOperation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateOperation")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCertificateOperationPreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetCertificateOperation", nil, "Failure preparing request")
@@ -1489,6 +1690,16 @@ func (client BaseClient) GetCertificateOperationResponder(resp *http.Response) (
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate in a given key vault.
func (client BaseClient) GetCertificatePolicy(ctx context.Context, vaultBaseURL string, certificateName string) (result CertificatePolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificatePolicy")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCertificatePolicyPreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetCertificatePolicy", nil, "Failure preparing request")
@@ -1560,6 +1771,16 @@ func (client BaseClient) GetCertificatePolicyResponder(resp *http.Response) (res
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32) (result CertificateListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificates")
+ defer func() {
+ sc := -1
+ if result.clr.Response.Response != nil {
+ sc = result.clr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -1634,8 +1855,8 @@ func (client BaseClient) GetCertificatesResponder(resp *http.Response) (result C
}
// getCertificatesNextResults retrieves the next set of results, if any.
-func (client BaseClient) getCertificatesNextResults(lastResults CertificateListResult) (result CertificateListResult, err error) {
- req, err := lastResults.certificateListResultPreparer()
+func (client BaseClient) getCertificatesNextResults(ctx context.Context, lastResults CertificateListResult) (result CertificateListResult, err error) {
+ req, err := lastResults.certificateListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getCertificatesNextResults", nil, "Failure preparing next results request")
}
@@ -1656,6 +1877,16 @@ func (client BaseClient) getCertificatesNextResults(lastResults CertificateListR
// GetCertificatesComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result CertificateListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificates")
+ 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.GetCertificates(ctx, vaultBaseURL, maxresults)
return
}
@@ -1668,6 +1899,16 @@ func (client BaseClient) GetCertificatesComplete(ctx context.Context, vaultBaseU
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetCertificateVersions(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result CertificateListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateVersions")
+ defer func() {
+ sc := -1
+ if result.clr.Response.Response != nil {
+ sc = result.clr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -1746,8 +1987,8 @@ func (client BaseClient) GetCertificateVersionsResponder(resp *http.Response) (r
}
// getCertificateVersionsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getCertificateVersionsNextResults(lastResults CertificateListResult) (result CertificateListResult, err error) {
- req, err := lastResults.certificateListResultPreparer()
+func (client BaseClient) getCertificateVersionsNextResults(ctx context.Context, lastResults CertificateListResult) (result CertificateListResult, err error) {
+ req, err := lastResults.certificateListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getCertificateVersionsNextResults", nil, "Failure preparing next results request")
}
@@ -1768,6 +2009,16 @@ func (client BaseClient) getCertificateVersionsNextResults(lastResults Certifica
// GetCertificateVersionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetCertificateVersionsComplete(ctx context.Context, vaultBaseURL string, certificateName string, maxresults *int32) (result CertificateListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetCertificateVersions")
+ 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.GetCertificateVersions(ctx, vaultBaseURL, certificateName, maxresults)
return
}
@@ -1779,6 +2030,16 @@ func (client BaseClient) GetCertificateVersionsComplete(ctx context.Context, vau
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate
func (client BaseClient) GetDeletedCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result DeletedCertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedCertificate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetDeletedCertificatePreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetDeletedCertificate", nil, "Failure preparing request")
@@ -1852,6 +2113,16 @@ func (client BaseClient) GetDeletedCertificateResponder(resp *http.Response) (re
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetDeletedCertificates(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedCertificateListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedCertificates")
+ defer func() {
+ sc := -1
+ if result.dclr.Response.Response != nil {
+ sc = result.dclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -1926,8 +2197,8 @@ func (client BaseClient) GetDeletedCertificatesResponder(resp *http.Response) (r
}
// getDeletedCertificatesNextResults retrieves the next set of results, if any.
-func (client BaseClient) getDeletedCertificatesNextResults(lastResults DeletedCertificateListResult) (result DeletedCertificateListResult, err error) {
- req, err := lastResults.deletedCertificateListResultPreparer()
+func (client BaseClient) getDeletedCertificatesNextResults(ctx context.Context, lastResults DeletedCertificateListResult) (result DeletedCertificateListResult, err error) {
+ req, err := lastResults.deletedCertificateListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getDeletedCertificatesNextResults", nil, "Failure preparing next results request")
}
@@ -1948,6 +2219,16 @@ func (client BaseClient) getDeletedCertificatesNextResults(lastResults DeletedCe
// GetDeletedCertificatesComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetDeletedCertificatesComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedCertificateListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedCertificates")
+ 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.GetDeletedCertificates(ctx, vaultBaseURL, maxresults)
return
}
@@ -1959,6 +2240,16 @@ func (client BaseClient) GetDeletedCertificatesComplete(ctx context.Context, vau
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// keyName - the name of the key.
func (client BaseClient) GetDeletedKey(ctx context.Context, vaultBaseURL string, keyName string) (result DeletedKeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetDeletedKeyPreparer(ctx, vaultBaseURL, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetDeletedKey", nil, "Failure preparing request")
@@ -2032,6 +2323,16 @@ func (client BaseClient) GetDeletedKeyResponder(resp *http.Response) (result Del
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetDeletedKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedKeyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedKeys")
+ defer func() {
+ sc := -1
+ if result.dklr.Response.Response != nil {
+ sc = result.dklr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -2106,8 +2407,8 @@ func (client BaseClient) GetDeletedKeysResponder(resp *http.Response) (result De
}
// getDeletedKeysNextResults retrieves the next set of results, if any.
-func (client BaseClient) getDeletedKeysNextResults(lastResults DeletedKeyListResult) (result DeletedKeyListResult, err error) {
- req, err := lastResults.deletedKeyListResultPreparer()
+func (client BaseClient) getDeletedKeysNextResults(ctx context.Context, lastResults DeletedKeyListResult) (result DeletedKeyListResult, err error) {
+ req, err := lastResults.deletedKeyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getDeletedKeysNextResults", nil, "Failure preparing next results request")
}
@@ -2128,6 +2429,16 @@ func (client BaseClient) getDeletedKeysNextResults(lastResults DeletedKeyListRes
// GetDeletedKeysComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetDeletedKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedKeyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedKeys")
+ 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.GetDeletedKeys(ctx, vaultBaseURL, maxresults)
return
}
@@ -2138,6 +2449,16 @@ func (client BaseClient) GetDeletedKeysComplete(ctx context.Context, vaultBaseUR
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// secretName - the name of the secret.
func (client BaseClient) GetDeletedSecret(ctx context.Context, vaultBaseURL string, secretName string) (result DeletedSecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetDeletedSecretPreparer(ctx, vaultBaseURL, secretName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetDeletedSecret", nil, "Failure preparing request")
@@ -2209,6 +2530,16 @@ func (client BaseClient) GetDeletedSecretResponder(resp *http.Response) (result
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetDeletedSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedSecretListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedSecrets")
+ defer func() {
+ sc := -1
+ if result.dslr.Response.Response != nil {
+ sc = result.dslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -2283,8 +2614,8 @@ func (client BaseClient) GetDeletedSecretsResponder(resp *http.Response) (result
}
// getDeletedSecretsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getDeletedSecretsNextResults(lastResults DeletedSecretListResult) (result DeletedSecretListResult, err error) {
- req, err := lastResults.deletedSecretListResultPreparer()
+func (client BaseClient) getDeletedSecretsNextResults(ctx context.Context, lastResults DeletedSecretListResult) (result DeletedSecretListResult, err error) {
+ req, err := lastResults.deletedSecretListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getDeletedSecretsNextResults", nil, "Failure preparing next results request")
}
@@ -2305,6 +2636,16 @@ func (client BaseClient) getDeletedSecretsNextResults(lastResults DeletedSecretL
// GetDeletedSecretsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetDeletedSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result DeletedSecretListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetDeletedSecrets")
+ 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.GetDeletedSecrets(ctx, vaultBaseURL, maxresults)
return
}
@@ -2316,6 +2657,16 @@ func (client BaseClient) GetDeletedSecretsComplete(ctx context.Context, vaultBas
// keyName - the name of the key to get.
// keyVersion - adding the version parameter retrieves a specific version of a key.
func (client BaseClient) GetKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetKeyPreparer(ctx, vaultBaseURL, keyName, keyVersion)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetKey", nil, "Failure preparing request")
@@ -2390,6 +2741,16 @@ func (client BaseClient) GetKeyResponder(resp *http.Response) (result KeyBundle,
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetKeys(ctx context.Context, vaultBaseURL string, maxresults *int32) (result KeyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetKeys")
+ defer func() {
+ sc := -1
+ if result.klr.Response.Response != nil {
+ sc = result.klr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -2464,8 +2825,8 @@ func (client BaseClient) GetKeysResponder(resp *http.Response) (result KeyListRe
}
// getKeysNextResults retrieves the next set of results, if any.
-func (client BaseClient) getKeysNextResults(lastResults KeyListResult) (result KeyListResult, err error) {
- req, err := lastResults.keyListResultPreparer()
+func (client BaseClient) getKeysNextResults(ctx context.Context, lastResults KeyListResult) (result KeyListResult, err error) {
+ req, err := lastResults.keyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getKeysNextResults", nil, "Failure preparing next results request")
}
@@ -2486,6 +2847,16 @@ func (client BaseClient) getKeysNextResults(lastResults KeyListResult) (result K
// GetKeysComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetKeysComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result KeyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetKeys")
+ 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.GetKeys(ctx, vaultBaseURL, maxresults)
return
}
@@ -2498,6 +2869,16 @@ func (client BaseClient) GetKeysComplete(ctx context.Context, vaultBaseURL strin
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetKeyVersions(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result KeyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetKeyVersions")
+ defer func() {
+ sc := -1
+ if result.klr.Response.Response != nil {
+ sc = result.klr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -2576,8 +2957,8 @@ func (client BaseClient) GetKeyVersionsResponder(resp *http.Response) (result Ke
}
// getKeyVersionsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getKeyVersionsNextResults(lastResults KeyListResult) (result KeyListResult, err error) {
- req, err := lastResults.keyListResultPreparer()
+func (client BaseClient) getKeyVersionsNextResults(ctx context.Context, lastResults KeyListResult) (result KeyListResult, err error) {
+ req, err := lastResults.keyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getKeyVersionsNextResults", nil, "Failure preparing next results request")
}
@@ -2598,6 +2979,16 @@ func (client BaseClient) getKeyVersionsNextResults(lastResults KeyListResult) (r
// GetKeyVersionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetKeyVersionsComplete(ctx context.Context, vaultBaseURL string, keyName string, maxresults *int32) (result KeyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetKeyVersions")
+ 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.GetKeyVersions(ctx, vaultBaseURL, keyName, maxresults)
return
}
@@ -2609,6 +3000,16 @@ func (client BaseClient) GetKeyVersionsComplete(ctx context.Context, vaultBaseUR
// storageAccountName - the name of the storage account.
// sasDefinitionName - the name of the SAS definition.
func (client BaseClient) GetSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string) (result SasDefinitionBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSasDefinition")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -2690,6 +3091,16 @@ func (client BaseClient) GetSasDefinitionResponder(resp *http.Response) (result
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetSasDefinitions(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result SasDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSasDefinitions")
+ defer func() {
+ sc := -1
+ if result.sdlr.Response.Response != nil {
+ sc = result.sdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -2770,8 +3181,8 @@ func (client BaseClient) GetSasDefinitionsResponder(resp *http.Response) (result
}
// getSasDefinitionsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getSasDefinitionsNextResults(lastResults SasDefinitionListResult) (result SasDefinitionListResult, err error) {
- req, err := lastResults.sasDefinitionListResultPreparer()
+func (client BaseClient) getSasDefinitionsNextResults(ctx context.Context, lastResults SasDefinitionListResult) (result SasDefinitionListResult, err error) {
+ req, err := lastResults.sasDefinitionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getSasDefinitionsNextResults", nil, "Failure preparing next results request")
}
@@ -2792,6 +3203,16 @@ func (client BaseClient) getSasDefinitionsNextResults(lastResults SasDefinitionL
// GetSasDefinitionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetSasDefinitionsComplete(ctx context.Context, vaultBaseURL string, storageAccountName string, maxresults *int32) (result SasDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSasDefinitions")
+ 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.GetSasDefinitions(ctx, vaultBaseURL, storageAccountName, maxresults)
return
}
@@ -2803,6 +3224,16 @@ func (client BaseClient) GetSasDefinitionsComplete(ctx context.Context, vaultBas
// secretName - the name of the secret.
// secretVersion - the version of the secret.
func (client BaseClient) GetSecret(ctx context.Context, vaultBaseURL string, secretName string, secretVersion string) (result SecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetSecretPreparer(ctx, vaultBaseURL, secretName, secretVersion)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "GetSecret", nil, "Failure preparing request")
@@ -2876,6 +3307,16 @@ func (client BaseClient) GetSecretResponder(resp *http.Response) (result SecretB
// maxresults - maximum number of results to return in a page. If not specified, the service will return up to
// 25 results.
func (client BaseClient) GetSecrets(ctx context.Context, vaultBaseURL string, maxresults *int32) (result SecretListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSecrets")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -2950,8 +3391,8 @@ func (client BaseClient) GetSecretsResponder(resp *http.Response) (result Secret
}
// getSecretsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getSecretsNextResults(lastResults SecretListResult) (result SecretListResult, err error) {
- req, err := lastResults.secretListResultPreparer()
+func (client BaseClient) getSecretsNextResults(ctx context.Context, lastResults SecretListResult) (result SecretListResult, err error) {
+ req, err := lastResults.secretListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getSecretsNextResults", nil, "Failure preparing next results request")
}
@@ -2972,6 +3413,16 @@ func (client BaseClient) getSecretsNextResults(lastResults SecretListResult) (re
// GetSecretsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetSecretsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result SecretListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSecrets")
+ 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.GetSecrets(ctx, vaultBaseURL, maxresults)
return
}
@@ -2984,6 +3435,16 @@ func (client BaseClient) GetSecretsComplete(ctx context.Context, vaultBaseURL st
// maxresults - maximum number of results to return in a page. If not specified, the service will return up to
// 25 results.
func (client BaseClient) GetSecretVersions(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result SecretListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSecretVersions")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -3062,8 +3523,8 @@ func (client BaseClient) GetSecretVersionsResponder(resp *http.Response) (result
}
// getSecretVersionsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getSecretVersionsNextResults(lastResults SecretListResult) (result SecretListResult, err error) {
- req, err := lastResults.secretListResultPreparer()
+func (client BaseClient) getSecretVersionsNextResults(ctx context.Context, lastResults SecretListResult) (result SecretListResult, err error) {
+ req, err := lastResults.secretListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getSecretVersionsNextResults", nil, "Failure preparing next results request")
}
@@ -3084,6 +3545,16 @@ func (client BaseClient) getSecretVersionsNextResults(lastResults SecretListResu
// GetSecretVersionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetSecretVersionsComplete(ctx context.Context, vaultBaseURL string, secretName string, maxresults *int32) (result SecretListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetSecretVersions")
+ 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.GetSecretVersions(ctx, vaultBaseURL, secretName, maxresults)
return
}
@@ -3094,6 +3565,16 @@ func (client BaseClient) GetSecretVersionsComplete(ctx context.Context, vaultBas
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// storageAccountName - the name of the storage account.
func (client BaseClient) GetStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string) (result StorageBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetStorageAccount")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil {
@@ -3171,6 +3652,16 @@ func (client BaseClient) GetStorageAccountResponder(resp *http.Response) (result
// maxresults - maximum number of results to return in a page. If not specified the service will return up to
// 25 results.
func (client BaseClient) GetStorageAccounts(ctx context.Context, vaultBaseURL string, maxresults *int32) (result StorageListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetStorageAccounts")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: maxresults,
Constraints: []validation.Constraint{{Target: "maxresults", Name: validation.Null, Rule: false,
@@ -3245,8 +3736,8 @@ func (client BaseClient) GetStorageAccountsResponder(resp *http.Response) (resul
}
// getStorageAccountsNextResults retrieves the next set of results, if any.
-func (client BaseClient) getStorageAccountsNextResults(lastResults StorageListResult) (result StorageListResult, err error) {
- req, err := lastResults.storageListResultPreparer()
+func (client BaseClient) getStorageAccountsNextResults(ctx context.Context, lastResults StorageListResult) (result StorageListResult, err error) {
+ req, err := lastResults.storageListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.BaseClient", "getStorageAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -3267,6 +3758,16 @@ func (client BaseClient) getStorageAccountsNextResults(lastResults StorageListRe
// GetStorageAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) GetStorageAccountsComplete(ctx context.Context, vaultBaseURL string, maxresults *int32) (result StorageListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.GetStorageAccounts")
+ 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.GetStorageAccounts(ctx, vaultBaseURL, maxresults)
return
}
@@ -3279,6 +3780,16 @@ func (client BaseClient) GetStorageAccountsComplete(ctx context.Context, vaultBa
// certificateName - the name of the certificate.
// parameters - the parameters to import the certificate.
func (client BaseClient) ImportCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters CertificateImportParameters) (result CertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ImportCertificate")
+ 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: certificateName,
Constraints: []validation.Constraint{{Target: "certificateName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z-]+$`, Chain: nil}}},
@@ -3367,6 +3878,16 @@ func (client BaseClient) ImportCertificateResponder(resp *http.Response) (result
// keyName - name for the imported key.
// parameters - the parameters to import a key.
func (client BaseClient) ImportKey(ctx context.Context, vaultBaseURL string, keyName string, parameters KeyImportParameters) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ImportKey")
+ 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: keyName,
Constraints: []validation.Constraint{{Target: "keyName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z-]+$`, Chain: nil}}},
@@ -3448,6 +3969,16 @@ func (client BaseClient) ImportKeyResponder(resp *http.Response) (result KeyBund
// certificateName - the name of the certificate.
// parameters - the parameters to merge certificate.
func (client BaseClient) MergeCertificate(ctx context.Context, vaultBaseURL string, certificateName string, parameters CertificateMergeParameters) (result CertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.MergeCertificate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.X509Certificates", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -3527,6 +4058,16 @@ func (client BaseClient) MergeCertificateResponder(resp *http.Response) (result
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the certificate
func (client BaseClient) PurgeDeletedCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PurgeDeletedCertificate")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PurgeDeletedCertificatePreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "PurgeDeletedCertificate", nil, "Failure preparing request")
@@ -3597,6 +4138,16 @@ func (client BaseClient) PurgeDeletedCertificateResponder(resp *http.Response) (
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// keyName - the name of the key
func (client BaseClient) PurgeDeletedKey(ctx context.Context, vaultBaseURL string, keyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PurgeDeletedKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PurgeDeletedKeyPreparer(ctx, vaultBaseURL, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "PurgeDeletedKey", nil, "Failure preparing request")
@@ -3667,6 +4218,16 @@ func (client BaseClient) PurgeDeletedKeyResponder(resp *http.Response) (result a
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// secretName - the name of the secret.
func (client BaseClient) PurgeDeletedSecret(ctx context.Context, vaultBaseURL string, secretName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.PurgeDeletedSecret")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PurgeDeletedSecretPreparer(ctx, vaultBaseURL, secretName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "PurgeDeletedSecret", nil, "Failure preparing request")
@@ -3737,6 +4298,16 @@ func (client BaseClient) PurgeDeletedSecretResponder(resp *http.Response) (resul
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// certificateName - the name of the deleted certificate
func (client BaseClient) RecoverDeletedCertificate(ctx context.Context, vaultBaseURL string, certificateName string) (result CertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverDeletedCertificate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RecoverDeletedCertificatePreparer(ctx, vaultBaseURL, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "RecoverDeletedCertificate", nil, "Failure preparing request")
@@ -3809,6 +4380,16 @@ func (client BaseClient) RecoverDeletedCertificateResponder(resp *http.Response)
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// keyName - the name of the deleted key.
func (client BaseClient) RecoverDeletedKey(ctx context.Context, vaultBaseURL string, keyName string) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverDeletedKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RecoverDeletedKeyPreparer(ctx, vaultBaseURL, keyName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "RecoverDeletedKey", nil, "Failure preparing request")
@@ -3879,6 +4460,16 @@ func (client BaseClient) RecoverDeletedKeyResponder(resp *http.Response) (result
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// secretName - the name of the deleted secret.
func (client BaseClient) RecoverDeletedSecret(ctx context.Context, vaultBaseURL string, secretName string) (result SecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RecoverDeletedSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RecoverDeletedSecretPreparer(ctx, vaultBaseURL, secretName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "RecoverDeletedSecret", nil, "Failure preparing request")
@@ -3950,6 +4541,16 @@ func (client BaseClient) RecoverDeletedSecretResponder(resp *http.Response) (res
// storageAccountName - the name of the storage account.
// parameters - the parameters to regenerate storage account key.
func (client BaseClient) RegenerateStorageAccountKey(ctx context.Context, vaultBaseURL string, storageAccountName string, parameters StorageAccountRegenerteKeyParameters) (result StorageBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RegenerateStorageAccountKey")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -4037,6 +4638,16 @@ func (client BaseClient) RegenerateStorageAccountKeyResponder(resp *http.Respons
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// parameters - the parameters to restore the key.
func (client BaseClient) RestoreKey(ctx context.Context, vaultBaseURL string, parameters KeyRestoreParameters) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestoreKey")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.KeyBundleBackup", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -4111,6 +4722,16 @@ func (client BaseClient) RestoreKeyResponder(resp *http.Response) (result KeyBun
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// parameters - the parameters to restore the secret.
func (client BaseClient) RestoreSecret(ctx context.Context, vaultBaseURL string, parameters SecretRestoreParameters) (result SecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.RestoreSecret")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SecretBundleBackup", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -4185,6 +4806,16 @@ func (client BaseClient) RestoreSecretResponder(resp *http.Response) (result Sec
// vaultBaseURL - the vault name, for example https://myvault.vault.azure.net.
// contacts - the contacts for the key vault certificate.
func (client BaseClient) SetCertificateContacts(ctx context.Context, vaultBaseURL string, contacts Contacts) (result Contacts, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetCertificateContacts")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SetCertificateContactsPreparer(ctx, vaultBaseURL, contacts)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "SetCertificateContacts", nil, "Failure preparing request")
@@ -4254,6 +4885,16 @@ func (client BaseClient) SetCertificateContactsResponder(resp *http.Response) (r
// issuerName - the name of the issuer.
// parameter - certificate issuer set parameter.
func (client BaseClient) SetCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string, parameter CertificateIssuerSetParameters) (result IssuerBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetCertificateIssuer")
+ 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: parameter,
Constraints: []validation.Constraint{{Target: "parameter.Provider", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -4334,6 +4975,16 @@ func (client BaseClient) SetCertificateIssuerResponder(resp *http.Response) (res
// sasDefinitionName - the name of the SAS definition.
// parameters - the parameters to create a SAS definition.
func (client BaseClient) SetSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionCreateParameters) (result SasDefinitionBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetSasDefinition")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -4418,6 +5069,16 @@ func (client BaseClient) SetSasDefinitionResponder(resp *http.Response) (result
// secretName - the name of the secret.
// parameters - the parameters for setting the secret.
func (client BaseClient) SetSecret(ctx context.Context, vaultBaseURL string, secretName string, parameters SecretSetParameters) (result SecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetSecret")
+ 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: secretName,
Constraints: []validation.Constraint{{Target: "secretName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z-]+$`, Chain: nil}}},
@@ -4498,6 +5159,16 @@ func (client BaseClient) SetSecretResponder(resp *http.Response) (result SecretB
// storageAccountName - the name of the storage account.
// parameters - the parameters to create a storage account.
func (client BaseClient) SetStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string, parameters StorageAccountCreateParameters) (result StorageBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SetStorageAccount")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -4582,6 +5253,16 @@ func (client BaseClient) SetStorageAccountResponder(resp *http.Response) (result
// keyVersion - the version of the key.
// parameters - the parameters for the signing operation.
func (client BaseClient) Sign(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeySignParameters) (result KeyOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Sign")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -4665,6 +5346,16 @@ func (client BaseClient) SignResponder(resp *http.Response) (result KeyOperation
// keyVersion - the version of the key.
// parameters - the parameters for the key operation.
func (client BaseClient) UnwrapKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UnwrapKey")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -4746,6 +5437,16 @@ func (client BaseClient) UnwrapKeyResponder(resp *http.Response) (result KeyOper
// certificateVersion - the version of the certificate.
// parameters - the parameters for certificate update.
func (client BaseClient) UpdateCertificate(ctx context.Context, vaultBaseURL string, certificateName string, certificateVersion string, parameters CertificateUpdateParameters) (result CertificateBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateCertificate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateCertificatePreparer(ctx, vaultBaseURL, certificateName, certificateVersion, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateCertificate", nil, "Failure preparing request")
@@ -4820,6 +5521,16 @@ func (client BaseClient) UpdateCertificateResponder(resp *http.Response) (result
// issuerName - the name of the issuer.
// parameter - certificate issuer update parameter.
func (client BaseClient) UpdateCertificateIssuer(ctx context.Context, vaultBaseURL string, issuerName string, parameter CertificateIssuerUpdateParameters) (result IssuerBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateCertificateIssuer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateCertificateIssuerPreparer(ctx, vaultBaseURL, issuerName, parameter)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateCertificateIssuer", nil, "Failure preparing request")
@@ -4893,6 +5604,16 @@ func (client BaseClient) UpdateCertificateIssuerResponder(resp *http.Response) (
// certificateName - the name of the certificate.
// certificateOperation - the certificate operation response.
func (client BaseClient) UpdateCertificateOperation(ctx context.Context, vaultBaseURL string, certificateName string, certificateOperation CertificateOperationUpdateParameter) (result CertificateOperation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateCertificateOperation")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateCertificateOperationPreparer(ctx, vaultBaseURL, certificateName, certificateOperation)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateCertificateOperation", nil, "Failure preparing request")
@@ -4966,6 +5687,16 @@ func (client BaseClient) UpdateCertificateOperationResponder(resp *http.Response
// certificateName - the name of the certificate in the given vault.
// certificatePolicy - the policy for the certificate.
func (client BaseClient) UpdateCertificatePolicy(ctx context.Context, vaultBaseURL string, certificateName string, certificatePolicy CertificatePolicy) (result CertificatePolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateCertificatePolicy")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateCertificatePolicyPreparer(ctx, vaultBaseURL, certificateName, certificatePolicy)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateCertificatePolicy", nil, "Failure preparing request")
@@ -5040,6 +5771,16 @@ func (client BaseClient) UpdateCertificatePolicyResponder(resp *http.Response) (
// keyVersion - the version of the key to update.
// parameters - the parameters of the key to update.
func (client BaseClient) UpdateKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyUpdateParameters) (result KeyBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateKeyPreparer(ctx, vaultBaseURL, keyName, keyVersion, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateKey", nil, "Failure preparing request")
@@ -5115,6 +5856,16 @@ func (client BaseClient) UpdateKeyResponder(resp *http.Response) (result KeyBund
// sasDefinitionName - the name of the SAS definition.
// parameters - the parameters to update a SAS definition.
func (client BaseClient) UpdateSasDefinition(ctx context.Context, vaultBaseURL string, storageAccountName string, sasDefinitionName string, parameters SasDefinitionUpdateParameters) (result SasDefinitionBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateSasDefinition")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}},
@@ -5199,6 +5950,16 @@ func (client BaseClient) UpdateSasDefinitionResponder(resp *http.Response) (resu
// secretVersion - the version of the secret.
// parameters - the parameters for update secret operation.
func (client BaseClient) UpdateSecret(ctx context.Context, vaultBaseURL string, secretName string, secretVersion string, parameters SecretUpdateParameters) (result SecretBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateSecret")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateSecretPreparer(ctx, vaultBaseURL, secretName, secretVersion, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.BaseClient", "UpdateSecret", nil, "Failure preparing request")
@@ -5273,6 +6034,16 @@ func (client BaseClient) UpdateSecretResponder(resp *http.Response) (result Secr
// storageAccountName - the name of the storage account.
// parameters - the parameters to update a storage account.
func (client BaseClient) UpdateStorageAccount(ctx context.Context, vaultBaseURL string, storageAccountName string, parameters StorageAccountUpdateParameters) (result StorageBundle, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.UpdateStorageAccount")
+ 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: storageAccountName,
Constraints: []validation.Constraint{{Target: "storageAccountName", Name: validation.Pattern, Rule: `^[0-9a-zA-Z]+$`, Chain: nil}}}}); err != nil {
@@ -5355,6 +6126,16 @@ func (client BaseClient) UpdateStorageAccountResponder(resp *http.Response) (res
// keyVersion - the version of the key.
// parameters - the parameters for verify operations.
func (client BaseClient) Verify(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyVerifyParameters) (result KeyVerifyResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.Verify")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Digest", Name: validation.Null, Rule: true, Chain: nil},
@@ -5440,6 +6221,16 @@ func (client BaseClient) VerifyResponder(resp *http.Response) (result KeyVerifyR
// keyVersion - the version of the key.
// parameters - the parameters for wrap operation.
func (client BaseClient) WrapKey(ctx context.Context, vaultBaseURL string, keyName string, keyVersion string, parameters KeyOperationsParameters) (result KeyOperationResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.WrapKey")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
index 95fea5137d89..66803aee108c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault/models.go
@@ -18,13 +18,18 @@ package keyvault
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/keyvault/2016-10-01/keyvault"
+
// ActionType enumerates the values for action type.
type ActionType string
@@ -53,7 +58,7 @@ const (
// RecoverableProtectedSubscription Soft-delete is enabled for this vault, and the subscription is
// protected against immediate deletion.
RecoverableProtectedSubscription DeletionRecoveryLevel = "Recoverable+ProtectedSubscription"
- // RecoverablePurgeable Soft-delete is enabled for this vault; A priveleged user may trigger an immediate,
+ // RecoverablePurgeable Soft-delete is enabled for this vault; A privileged user may trigger an immediate,
// irreversible deletion(purge) of a deleted entity.
RecoverablePurgeable DeletionRecoveryLevel = "Recoverable+Purgeable"
)
@@ -217,7 +222,7 @@ type AdministratorDetails struct {
FirstName *string `json:"first_name,omitempty"`
// LastName - Last name.
LastName *string `json:"last_name,omitempty"`
- // EmailAddress - Email addresss.
+ // EmailAddress - Email address.
EmailAddress *string `json:"email,omitempty"`
// Phone - Phone number.
Phone *string `json:"phone,omitempty"`
@@ -400,20 +405,31 @@ type CertificateIssuerListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// CertificateIssuerListResultIterator provides access to a complete listing of CertificateIssuerItem values.
+// CertificateIssuerListResultIterator provides access to a complete listing of CertificateIssuerItem
+// values.
type CertificateIssuerListResultIterator struct {
i int
page CertificateIssuerListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CertificateIssuerListResultIterator) Next() error {
+func (iter *CertificateIssuerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateIssuerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -422,6 +438,13 @@ func (iter *CertificateIssuerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CertificateIssuerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CertificateIssuerListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -441,6 +464,11 @@ func (iter CertificateIssuerListResultIterator) Value() CertificateIssuerItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CertificateIssuerListResultIterator type.
+func NewCertificateIssuerListResultIterator(page CertificateIssuerListResultPage) CertificateIssuerListResultIterator {
+ return CertificateIssuerListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cilr CertificateIssuerListResult) IsEmpty() bool {
return cilr.Value == nil || len(*cilr.Value) == 0
@@ -448,11 +476,11 @@ func (cilr CertificateIssuerListResult) IsEmpty() bool {
// certificateIssuerListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cilr CertificateIssuerListResult) certificateIssuerListResultPreparer() (*http.Request, error) {
+func (cilr CertificateIssuerListResult) certificateIssuerListResultPreparer(ctx context.Context) (*http.Request, error) {
if cilr.NextLink == nil || len(to.String(cilr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cilr.NextLink)))
@@ -460,14 +488,24 @@ func (cilr CertificateIssuerListResult) certificateIssuerListResultPreparer() (*
// CertificateIssuerListResultPage contains a page of CertificateIssuerItem values.
type CertificateIssuerListResultPage struct {
- fn func(CertificateIssuerListResult) (CertificateIssuerListResult, error)
+ fn func(context.Context, CertificateIssuerListResult) (CertificateIssuerListResult, error)
cilr CertificateIssuerListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CertificateIssuerListResultPage) Next() error {
- next, err := page.fn(page.cilr)
+func (page *CertificateIssuerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateIssuerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cilr)
if err != nil {
return err
}
@@ -475,6 +513,13 @@ func (page *CertificateIssuerListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CertificateIssuerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CertificateIssuerListResultPage) NotDone() bool {
return !page.cilr.IsEmpty()
@@ -493,6 +538,11 @@ func (page CertificateIssuerListResultPage) Values() []CertificateIssuerItem {
return *page.cilr.Value
}
+// Creates a new instance of the CertificateIssuerListResultPage type.
+func NewCertificateIssuerListResultPage(getNextPage func(context.Context, CertificateIssuerListResult) (CertificateIssuerListResult, error)) CertificateIssuerListResultPage {
+ return CertificateIssuerListResultPage{fn: getNextPage}
+}
+
// CertificateIssuerSetParameters the certificate issuer set parameters.
type CertificateIssuerSetParameters struct {
// Provider - The issuer provider.
@@ -562,14 +612,24 @@ type CertificateListResultIterator struct {
page CertificateListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CertificateListResultIterator) Next() error {
+func (iter *CertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -578,6 +638,13 @@ func (iter *CertificateListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CertificateListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CertificateListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -597,6 +664,11 @@ func (iter CertificateListResultIterator) Value() CertificateItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CertificateListResultIterator type.
+func NewCertificateListResultIterator(page CertificateListResultPage) CertificateListResultIterator {
+ return CertificateListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (clr CertificateListResult) IsEmpty() bool {
return clr.Value == nil || len(*clr.Value) == 0
@@ -604,11 +676,11 @@ func (clr CertificateListResult) IsEmpty() bool {
// certificateListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (clr CertificateListResult) certificateListResultPreparer() (*http.Request, error) {
+func (clr CertificateListResult) certificateListResultPreparer(ctx context.Context) (*http.Request, error) {
if clr.NextLink == nil || len(to.String(clr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(clr.NextLink)))
@@ -616,14 +688,24 @@ func (clr CertificateListResult) certificateListResultPreparer() (*http.Request,
// CertificateListResultPage contains a page of CertificateItem values.
type CertificateListResultPage struct {
- fn func(CertificateListResult) (CertificateListResult, error)
+ fn func(context.Context, CertificateListResult) (CertificateListResult, error)
clr CertificateListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CertificateListResultPage) Next() error {
- next, err := page.fn(page.clr)
+func (page *CertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.clr)
if err != nil {
return err
}
@@ -631,6 +713,13 @@ func (page *CertificateListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CertificateListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CertificateListResultPage) NotDone() bool {
return !page.clr.IsEmpty()
@@ -649,6 +738,11 @@ func (page CertificateListResultPage) Values() []CertificateItem {
return *page.clr.Value
}
+// Creates a new instance of the CertificateListResultPage type.
+func NewCertificateListResultPage(getNextPage func(context.Context, CertificateListResult) (CertificateListResult, error)) CertificateListResultPage {
+ return CertificateListResultPage{fn: getNextPage}
+}
+
// CertificateMergeParameters the certificate merge parameters
type CertificateMergeParameters struct {
// X509Certificates - The certificate or the certificate chain to merge.
@@ -749,7 +843,7 @@ func (cup CertificateUpdateParameters) MarshalJSON() ([]byte, error) {
// Contact the contact information for the vault certificates.
type Contact struct {
- // EmailAddress - Email addresss.
+ // EmailAddress - Email address.
EmailAddress *string `json:"email,omitempty"`
// Name - Name.
Name *string `json:"name,omitempty"`
@@ -766,8 +860,8 @@ type Contacts struct {
ContactList *[]Contact `json:"contacts,omitempty"`
}
-// DeletedCertificateBundle a Deleted Certificate consisting of its previous id, attributes and its tags, as well
-// as information on when it will be purged.
+// DeletedCertificateBundle a Deleted Certificate consisting of its previous id, attributes and its tags,
+// as well as information on when it will be purged.
type DeletedCertificateBundle struct {
autorest.Response `json:"-"`
// RecoveryID - The url of the recovery object, used to identify and recover the deleted certificate.
@@ -892,20 +986,31 @@ type DeletedCertificateListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// DeletedCertificateListResultIterator provides access to a complete listing of DeletedCertificateItem values.
+// DeletedCertificateListResultIterator provides access to a complete listing of DeletedCertificateItem
+// values.
type DeletedCertificateListResultIterator struct {
i int
page DeletedCertificateListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DeletedCertificateListResultIterator) Next() error {
+func (iter *DeletedCertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedCertificateListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -914,6 +1019,13 @@ func (iter *DeletedCertificateListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DeletedCertificateListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DeletedCertificateListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -933,6 +1045,11 @@ func (iter DeletedCertificateListResultIterator) Value() DeletedCertificateItem
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DeletedCertificateListResultIterator type.
+func NewDeletedCertificateListResultIterator(page DeletedCertificateListResultPage) DeletedCertificateListResultIterator {
+ return DeletedCertificateListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dclr DeletedCertificateListResult) IsEmpty() bool {
return dclr.Value == nil || len(*dclr.Value) == 0
@@ -940,11 +1057,11 @@ func (dclr DeletedCertificateListResult) IsEmpty() bool {
// deletedCertificateListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dclr DeletedCertificateListResult) deletedCertificateListResultPreparer() (*http.Request, error) {
+func (dclr DeletedCertificateListResult) deletedCertificateListResultPreparer(ctx context.Context) (*http.Request, error) {
if dclr.NextLink == nil || len(to.String(dclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dclr.NextLink)))
@@ -952,14 +1069,24 @@ func (dclr DeletedCertificateListResult) deletedCertificateListResultPreparer()
// DeletedCertificateListResultPage contains a page of DeletedCertificateItem values.
type DeletedCertificateListResultPage struct {
- fn func(DeletedCertificateListResult) (DeletedCertificateListResult, error)
+ fn func(context.Context, DeletedCertificateListResult) (DeletedCertificateListResult, error)
dclr DeletedCertificateListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DeletedCertificateListResultPage) Next() error {
- next, err := page.fn(page.dclr)
+func (page *DeletedCertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedCertificateListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dclr)
if err != nil {
return err
}
@@ -967,6 +1094,13 @@ func (page *DeletedCertificateListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DeletedCertificateListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DeletedCertificateListResultPage) NotDone() bool {
return !page.dclr.IsEmpty()
@@ -985,6 +1119,11 @@ func (page DeletedCertificateListResultPage) Values() []DeletedCertificateItem {
return *page.dclr.Value
}
+// Creates a new instance of the DeletedCertificateListResultPage type.
+func NewDeletedCertificateListResultPage(getNextPage func(context.Context, DeletedCertificateListResult) (DeletedCertificateListResult, error)) DeletedCertificateListResultPage {
+ return DeletedCertificateListResultPage{fn: getNextPage}
+}
+
// DeletedKeyBundle a DeletedKeyBundle consisting of a WebKey plus its Attributes and deletion info
type DeletedKeyBundle struct {
autorest.Response `json:"-"`
@@ -1091,14 +1230,24 @@ type DeletedKeyListResultIterator struct {
page DeletedKeyListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DeletedKeyListResultIterator) Next() error {
+func (iter *DeletedKeyListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedKeyListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1107,6 +1256,13 @@ func (iter *DeletedKeyListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DeletedKeyListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DeletedKeyListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1126,6 +1282,11 @@ func (iter DeletedKeyListResultIterator) Value() DeletedKeyItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DeletedKeyListResultIterator type.
+func NewDeletedKeyListResultIterator(page DeletedKeyListResultPage) DeletedKeyListResultIterator {
+ return DeletedKeyListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dklr DeletedKeyListResult) IsEmpty() bool {
return dklr.Value == nil || len(*dklr.Value) == 0
@@ -1133,11 +1294,11 @@ func (dklr DeletedKeyListResult) IsEmpty() bool {
// deletedKeyListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dklr DeletedKeyListResult) deletedKeyListResultPreparer() (*http.Request, error) {
+func (dklr DeletedKeyListResult) deletedKeyListResultPreparer(ctx context.Context) (*http.Request, error) {
if dklr.NextLink == nil || len(to.String(dklr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dklr.NextLink)))
@@ -1145,14 +1306,24 @@ func (dklr DeletedKeyListResult) deletedKeyListResultPreparer() (*http.Request,
// DeletedKeyListResultPage contains a page of DeletedKeyItem values.
type DeletedKeyListResultPage struct {
- fn func(DeletedKeyListResult) (DeletedKeyListResult, error)
+ fn func(context.Context, DeletedKeyListResult) (DeletedKeyListResult, error)
dklr DeletedKeyListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DeletedKeyListResultPage) Next() error {
- next, err := page.fn(page.dklr)
+func (page *DeletedKeyListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedKeyListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dklr)
if err != nil {
return err
}
@@ -1160,6 +1331,13 @@ func (page *DeletedKeyListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DeletedKeyListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DeletedKeyListResultPage) NotDone() bool {
return !page.dklr.IsEmpty()
@@ -1178,6 +1356,11 @@ func (page DeletedKeyListResultPage) Values() []DeletedKeyItem {
return *page.dklr.Value
}
+// Creates a new instance of the DeletedKeyListResultPage type.
+func NewDeletedKeyListResultPage(getNextPage func(context.Context, DeletedKeyListResult) (DeletedKeyListResult, error)) DeletedKeyListResultPage {
+ return DeletedKeyListResultPage{fn: getNextPage}
+}
+
// DeletedSecretBundle a Deleted Secret consisting of its previous id, attributes and its tags, as well as
// information on when it will be purged.
type DeletedSecretBundle struct {
@@ -1305,14 +1488,24 @@ type DeletedSecretListResultIterator struct {
page DeletedSecretListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DeletedSecretListResultIterator) Next() error {
+func (iter *DeletedSecretListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSecretListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1321,6 +1514,13 @@ func (iter *DeletedSecretListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DeletedSecretListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DeletedSecretListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1340,6 +1540,11 @@ func (iter DeletedSecretListResultIterator) Value() DeletedSecretItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DeletedSecretListResultIterator type.
+func NewDeletedSecretListResultIterator(page DeletedSecretListResultPage) DeletedSecretListResultIterator {
+ return DeletedSecretListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dslr DeletedSecretListResult) IsEmpty() bool {
return dslr.Value == nil || len(*dslr.Value) == 0
@@ -1347,11 +1552,11 @@ func (dslr DeletedSecretListResult) IsEmpty() bool {
// deletedSecretListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dslr DeletedSecretListResult) deletedSecretListResultPreparer() (*http.Request, error) {
+func (dslr DeletedSecretListResult) deletedSecretListResultPreparer(ctx context.Context) (*http.Request, error) {
if dslr.NextLink == nil || len(to.String(dslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dslr.NextLink)))
@@ -1359,14 +1564,24 @@ func (dslr DeletedSecretListResult) deletedSecretListResultPreparer() (*http.Req
// DeletedSecretListResultPage contains a page of DeletedSecretItem values.
type DeletedSecretListResultPage struct {
- fn func(DeletedSecretListResult) (DeletedSecretListResult, error)
+ fn func(context.Context, DeletedSecretListResult) (DeletedSecretListResult, error)
dslr DeletedSecretListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DeletedSecretListResultPage) Next() error {
- next, err := page.fn(page.dslr)
+func (page *DeletedSecretListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedSecretListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dslr)
if err != nil {
return err
}
@@ -1374,6 +1589,13 @@ func (page *DeletedSecretListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DeletedSecretListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DeletedSecretListResultPage) NotDone() bool {
return !page.dslr.IsEmpty()
@@ -1392,6 +1614,11 @@ func (page DeletedSecretListResultPage) Values() []DeletedSecretItem {
return *page.dslr.Value
}
+// Creates a new instance of the DeletedSecretListResultPage type.
+func NewDeletedSecretListResultPage(getNextPage func(context.Context, DeletedSecretListResult) (DeletedSecretListResult, error)) DeletedSecretListResultPage {
+ return DeletedSecretListResultPage{fn: getNextPage}
+}
+
// Error the key vault server error.
type Error struct {
// Code - The error code.
@@ -1642,14 +1869,24 @@ type KeyListResultIterator struct {
page KeyListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *KeyListResultIterator) Next() error {
+func (iter *KeyListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/KeyListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1658,6 +1895,13 @@ func (iter *KeyListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *KeyListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter KeyListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1677,6 +1921,11 @@ func (iter KeyListResultIterator) Value() KeyItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the KeyListResultIterator type.
+func NewKeyListResultIterator(page KeyListResultPage) KeyListResultIterator {
+ return KeyListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (klr KeyListResult) IsEmpty() bool {
return klr.Value == nil || len(*klr.Value) == 0
@@ -1684,11 +1933,11 @@ func (klr KeyListResult) IsEmpty() bool {
// keyListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (klr KeyListResult) keyListResultPreparer() (*http.Request, error) {
+func (klr KeyListResult) keyListResultPreparer(ctx context.Context) (*http.Request, error) {
if klr.NextLink == nil || len(to.String(klr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(klr.NextLink)))
@@ -1696,14 +1945,24 @@ func (klr KeyListResult) keyListResultPreparer() (*http.Request, error) {
// KeyListResultPage contains a page of KeyItem values.
type KeyListResultPage struct {
- fn func(KeyListResult) (KeyListResult, error)
+ fn func(context.Context, KeyListResult) (KeyListResult, error)
klr KeyListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *KeyListResultPage) Next() error {
- next, err := page.fn(page.klr)
+func (page *KeyListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/KeyListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.klr)
if err != nil {
return err
}
@@ -1711,6 +1970,13 @@ func (page *KeyListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *KeyListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page KeyListResultPage) NotDone() bool {
return !page.klr.IsEmpty()
@@ -1729,6 +1995,11 @@ func (page KeyListResultPage) Values() []KeyItem {
return *page.klr.Value
}
+// Creates a new instance of the KeyListResultPage type.
+func NewKeyListResultPage(getNextPage func(context.Context, KeyListResult) (KeyListResult, error)) KeyListResultPage {
+ return KeyListResultPage{fn: getNextPage}
+}
+
// KeyOperationResult the key operation result.
type KeyOperationResult struct {
autorest.Response `json:"-"`
@@ -1813,7 +2084,8 @@ type KeyVerifyResult struct {
Value *bool `json:"value,omitempty"`
}
-// LifetimeAction action and its trigger that will be performed by Key Vault over the lifetime of a certificate.
+// LifetimeAction action and its trigger that will be performed by Key Vault over the lifetime of a
+// certificate.
type LifetimeAction struct {
// Trigger - The condition that will execute the action.
Trigger *Trigger `json:"trigger,omitempty"`
@@ -1845,7 +2117,8 @@ type SasDefinitionAttributes struct {
Updated *date.UnixTime `json:"updated,omitempty"`
}
-// SasDefinitionBundle a SAS definition bundle consists of key vault SAS definition details plus its attributes.
+// SasDefinitionBundle a SAS definition bundle consists of key vault SAS definition details plus its
+// attributes.
type SasDefinitionBundle struct {
autorest.Response `json:"-"`
// ID - The SAS definition id.
@@ -1941,7 +2214,7 @@ type SasDefinitionListResult struct {
autorest.Response `json:"-"`
// Value - A response message containing a list of SAS definitions along with a link to the next page of SAS definitions.
Value *[]SasDefinitionItem `json:"value,omitempty"`
- // NextLink - The URL to get the next set of SAS defintions.
+ // NextLink - The URL to get the next set of SAS definitions.
NextLink *string `json:"nextLink,omitempty"`
}
@@ -1951,14 +2224,24 @@ type SasDefinitionListResultIterator struct {
page SasDefinitionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SasDefinitionListResultIterator) Next() error {
+func (iter *SasDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SasDefinitionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1967,6 +2250,13 @@ func (iter *SasDefinitionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SasDefinitionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SasDefinitionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1986,6 +2276,11 @@ func (iter SasDefinitionListResultIterator) Value() SasDefinitionItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SasDefinitionListResultIterator type.
+func NewSasDefinitionListResultIterator(page SasDefinitionListResultPage) SasDefinitionListResultIterator {
+ return SasDefinitionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sdlr SasDefinitionListResult) IsEmpty() bool {
return sdlr.Value == nil || len(*sdlr.Value) == 0
@@ -1993,11 +2288,11 @@ func (sdlr SasDefinitionListResult) IsEmpty() bool {
// sasDefinitionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sdlr SasDefinitionListResult) sasDefinitionListResultPreparer() (*http.Request, error) {
+func (sdlr SasDefinitionListResult) sasDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
if sdlr.NextLink == nil || len(to.String(sdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sdlr.NextLink)))
@@ -2005,14 +2300,24 @@ func (sdlr SasDefinitionListResult) sasDefinitionListResultPreparer() (*http.Req
// SasDefinitionListResultPage contains a page of SasDefinitionItem values.
type SasDefinitionListResultPage struct {
- fn func(SasDefinitionListResult) (SasDefinitionListResult, error)
+ fn func(context.Context, SasDefinitionListResult) (SasDefinitionListResult, error)
sdlr SasDefinitionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SasDefinitionListResultPage) Next() error {
- next, err := page.fn(page.sdlr)
+func (page *SasDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SasDefinitionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sdlr)
if err != nil {
return err
}
@@ -2020,6 +2325,13 @@ func (page *SasDefinitionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SasDefinitionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SasDefinitionListResultPage) NotDone() bool {
return !page.sdlr.IsEmpty()
@@ -2038,6 +2350,11 @@ func (page SasDefinitionListResultPage) Values() []SasDefinitionItem {
return *page.sdlr.Value
}
+// Creates a new instance of the SasDefinitionListResultPage type.
+func NewSasDefinitionListResultPage(getNextPage func(context.Context, SasDefinitionListResult) (SasDefinitionListResult, error)) SasDefinitionListResultPage {
+ return SasDefinitionListResultPage{fn: getNextPage}
+}
+
// SasDefinitionUpdateParameters the SAS definition update parameters.
type SasDefinitionUpdateParameters struct {
// Parameters - Sas definition update metadata in the form of key-value pairs.
@@ -2175,14 +2492,24 @@ type SecretListResultIterator struct {
page SecretListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SecretListResultIterator) Next() error {
+func (iter *SecretListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2191,6 +2518,13 @@ func (iter *SecretListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SecretListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SecretListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2210,6 +2544,11 @@ func (iter SecretListResultIterator) Value() SecretItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SecretListResultIterator type.
+func NewSecretListResultIterator(page SecretListResultPage) SecretListResultIterator {
+ return SecretListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (slr SecretListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
@@ -2217,11 +2556,11 @@ func (slr SecretListResult) IsEmpty() bool {
// secretListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (slr SecretListResult) secretListResultPreparer() (*http.Request, error) {
+func (slr SecretListResult) secretListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
@@ -2229,14 +2568,24 @@ func (slr SecretListResult) secretListResultPreparer() (*http.Request, error) {
// SecretListResultPage contains a page of SecretItem values.
type SecretListResultPage struct {
- fn func(SecretListResult) (SecretListResult, error)
+ fn func(context.Context, SecretListResult) (SecretListResult, error)
slr SecretListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SecretListResultPage) Next() error {
- next, err := page.fn(page.slr)
+func (page *SecretListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecretListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
@@ -2244,6 +2593,13 @@ func (page *SecretListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SecretListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SecretListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
@@ -2262,6 +2618,11 @@ func (page SecretListResultPage) Values() []SecretItem {
return *page.slr.Value
}
+// Creates a new instance of the SecretListResultPage type.
+func NewSecretListResultPage(getNextPage func(context.Context, SecretListResult) (SecretListResult, error)) SecretListResultPage {
+ return SecretListResultPage{fn: getNextPage}
+}
+
// SecretProperties properties of the key backing a certificate.
type SecretProperties struct {
// ContentType - The media type (MIME type).
@@ -2450,7 +2811,8 @@ func (saup StorageAccountUpdateParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// StorageBundle a Storage account bundle consists of key vault storage account details plus its attributes.
+// StorageBundle a Storage account bundle consists of key vault storage account details plus its
+// attributes.
type StorageBundle struct {
autorest.Response `json:"-"`
// ID - The storage account id.
@@ -2511,14 +2873,24 @@ type StorageListResultIterator struct {
page StorageListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *StorageListResultIterator) Next() error {
+func (iter *StorageListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2527,6 +2899,13 @@ func (iter *StorageListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *StorageListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter StorageListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2546,6 +2925,11 @@ func (iter StorageListResultIterator) Value() StorageAccountItem {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the StorageListResultIterator type.
+func NewStorageListResultIterator(page StorageListResultPage) StorageListResultIterator {
+ return StorageListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (slr StorageListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
@@ -2553,11 +2937,11 @@ func (slr StorageListResult) IsEmpty() bool {
// storageListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (slr StorageListResult) storageListResultPreparer() (*http.Request, error) {
+func (slr StorageListResult) storageListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
@@ -2565,14 +2949,24 @@ func (slr StorageListResult) storageListResultPreparer() (*http.Request, error)
// StorageListResultPage contains a page of StorageAccountItem values.
type StorageListResultPage struct {
- fn func(StorageListResult) (StorageListResult, error)
+ fn func(context.Context, StorageListResult) (StorageListResult, error)
slr StorageListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *StorageListResultPage) Next() error {
- next, err := page.fn(page.slr)
+func (page *StorageListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/StorageListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
@@ -2580,6 +2974,13 @@ func (page *StorageListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *StorageListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page StorageListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
@@ -2598,6 +2999,11 @@ func (page StorageListResultPage) Values() []StorageAccountItem {
return *page.slr.Value
}
+// Creates a new instance of the StorageListResultPage type.
+func NewStorageListResultPage(getNextPage func(context.Context, StorageListResult) (StorageListResult, error)) StorageListResultPage {
+ return StorageListResultPage{fn: getNextPage}
+}
+
// SubjectAlternativeNames the subject alternate names of a X509 object.
type SubjectAlternativeNames struct {
// Emails - Email addresses.
@@ -2626,6 +3032,6 @@ type X509CertificateProperties struct {
SubjectAlternativeNames *SubjectAlternativeNames `json:"sans,omitempty"`
// KeyUsage - List of key usages.
KeyUsage *[]KeyUsageType `json:"key_usage,omitempty"`
- // ValidityInMonths - The duration that the ceritifcate is valid in months.
+ // ValidityInMonths - The duration that the certificate is valid in months.
ValidityInMonths *int32 `json:"validity_months,omitempty"`
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/models.go
index 1c4cbca7aae0..d9025bc3c2f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/models.go
@@ -18,15 +18,20 @@ package keyvault
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault"
+
// AccessPolicyUpdateKind enumerates the values for access policy update kind.
type AccessPolicyUpdateKind string
@@ -271,8 +276,8 @@ func PossibleStoragePermissionsValues() []StoragePermissions {
return []StoragePermissions{StoragePermissionsBackup, StoragePermissionsDelete, StoragePermissionsDeletesas, StoragePermissionsGet, StoragePermissionsGetsas, StoragePermissionsList, StoragePermissionsListsas, StoragePermissionsPurge, StoragePermissionsRecover, StoragePermissionsRegeneratekey, StoragePermissionsRestore, StoragePermissionsSet, StoragePermissionsSetsas, StoragePermissionsUpdate}
}
-// AccessPolicyEntry an identity that have access to the key vault. All identities in the array must use the same
-// tenant ID as the key vault's tenant ID.
+// AccessPolicyEntry an identity that have access to the key vault. All identities in the array must use
+// the same tenant ID as the key vault's tenant ID.
type AccessPolicyEntry struct {
// TenantID - The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault.
TenantID *uuid.UUID `json:"tenantId,omitempty"`
@@ -323,14 +328,24 @@ type DeletedVaultListResultIterator struct {
page DeletedVaultListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DeletedVaultListResultIterator) Next() error {
+func (iter *DeletedVaultListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedVaultListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -339,6 +354,13 @@ func (iter *DeletedVaultListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DeletedVaultListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DeletedVaultListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -358,6 +380,11 @@ func (iter DeletedVaultListResultIterator) Value() DeletedVault {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DeletedVaultListResultIterator type.
+func NewDeletedVaultListResultIterator(page DeletedVaultListResultPage) DeletedVaultListResultIterator {
+ return DeletedVaultListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dvlr DeletedVaultListResult) IsEmpty() bool {
return dvlr.Value == nil || len(*dvlr.Value) == 0
@@ -365,11 +392,11 @@ func (dvlr DeletedVaultListResult) IsEmpty() bool {
// deletedVaultListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dvlr DeletedVaultListResult) deletedVaultListResultPreparer() (*http.Request, error) {
+func (dvlr DeletedVaultListResult) deletedVaultListResultPreparer(ctx context.Context) (*http.Request, error) {
if dvlr.NextLink == nil || len(to.String(dvlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dvlr.NextLink)))
@@ -377,14 +404,24 @@ func (dvlr DeletedVaultListResult) deletedVaultListResultPreparer() (*http.Reque
// DeletedVaultListResultPage contains a page of DeletedVault values.
type DeletedVaultListResultPage struct {
- fn func(DeletedVaultListResult) (DeletedVaultListResult, error)
+ fn func(context.Context, DeletedVaultListResult) (DeletedVaultListResult, error)
dvlr DeletedVaultListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DeletedVaultListResultPage) Next() error {
- next, err := page.fn(page.dvlr)
+func (page *DeletedVaultListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DeletedVaultListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dvlr)
if err != nil {
return err
}
@@ -392,6 +429,13 @@ func (page *DeletedVaultListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DeletedVaultListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DeletedVaultListResultPage) NotDone() bool {
return !page.dvlr.IsEmpty()
@@ -410,6 +454,11 @@ func (page DeletedVaultListResultPage) Values() []DeletedVault {
return *page.dvlr.Value
}
+// Creates a new instance of the DeletedVaultListResultPage type.
+func NewDeletedVaultListResultPage(getNextPage func(context.Context, DeletedVaultListResult) (DeletedVaultListResult, error)) DeletedVaultListResultPage {
+ return DeletedVaultListResultPage{fn: getNextPage}
+}
+
// DeletedVaultProperties properties of the deleted vault.
type DeletedVaultProperties struct {
// VaultID - The resource id of the original vault.
@@ -445,7 +494,7 @@ func (dvp DeletedVaultProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// IPRule a rule governing the accesibility of a vault from a specific ip address or ip range.
+// IPRule a rule governing the accessibility of a vault from a specific ip address or ip range.
type IPRule struct {
// Value - An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78).
Value *string `json:"value,omitempty"`
@@ -562,12 +611,12 @@ type OperationDisplay struct {
Resource *string `json:"resource,omitempty"`
// Operation - Type of operation: get, read, delete, etc.
Operation *string `json:"operation,omitempty"`
- // Description - Decription of operation.
+ // Description - Description of operation.
Description *string `json:"description,omitempty"`
}
-// OperationListResult result of the request to list Storage operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationListResult result of the request to list Storage operations. It contains a list of operations
+// and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of Storage operations supported by the Storage resource provider.
@@ -582,14 +631,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -598,6 +657,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -617,6 +683,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -624,11 +695,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -636,14 +707,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -651,6 +732,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -669,6 +757,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationProperties properties of operation, include metric specifications.
type OperationProperties struct {
// ServiceSpecification - One property of operation, include metric specifications.
@@ -737,14 +830,24 @@ type ResourceListResultIterator struct {
page ResourceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceListResultIterator) Next() error {
+func (iter *ResourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -753,6 +856,13 @@ func (iter *ResourceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -772,6 +882,11 @@ func (iter ResourceListResultIterator) Value() Resource {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceListResultIterator type.
+func NewResourceListResultIterator(page ResourceListResultPage) ResourceListResultIterator {
+ return ResourceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr ResourceListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -779,11 +894,11 @@ func (rlr ResourceListResult) IsEmpty() bool {
// resourceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr ResourceListResult) resourceListResultPreparer() (*http.Request, error) {
+func (rlr ResourceListResult) resourceListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -791,14 +906,24 @@ func (rlr ResourceListResult) resourceListResultPreparer() (*http.Request, error
// ResourceListResultPage contains a page of Resource values.
type ResourceListResultPage struct {
- fn func(ResourceListResult) (ResourceListResult, error)
+ fn func(context.Context, ResourceListResult) (ResourceListResult, error)
rlr ResourceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *ResourceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -806,6 +931,13 @@ func (page *ResourceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -824,6 +956,11 @@ func (page ResourceListResultPage) Values() []Resource {
return *page.rlr.Value
}
+// Creates a new instance of the ResourceListResultPage type.
+func NewResourceListResultPage(getNextPage func(context.Context, ResourceListResult) (ResourceListResult, error)) ResourceListResultPage {
+ return ResourceListResultPage{fn: getNextPage}
+}
+
// ServiceSpecification one property of operation, include log specifications.
type ServiceSpecification struct {
// LogSpecifications - Log specifications of operation.
@@ -888,7 +1025,7 @@ type VaultAccessPolicyParameters struct {
Name *string `json:"name,omitempty"`
// Type - The resource name of the access policy.
Type *string `json:"type,omitempty"`
- // Location - The resource type of the the access policy.
+ // Location - The resource type of the access policy.
Location *string `json:"location,omitempty"`
// Properties - Properties of the access policy
Properties *VaultAccessPolicyProperties `json:"properties,omitempty"`
@@ -900,7 +1037,7 @@ type VaultAccessPolicyProperties struct {
AccessPolicies *[]AccessPolicyEntry `json:"accessPolicies,omitempty"`
}
-// VaultCheckNameAvailabilityParameters the parameters used to check the availabity of the vault name.
+// VaultCheckNameAvailabilityParameters the parameters used to check the availability of the vault name.
type VaultCheckNameAvailabilityParameters struct {
// Name - The vault name.
Name *string `json:"name,omitempty"`
@@ -948,14 +1085,24 @@ type VaultListResultIterator struct {
page VaultListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VaultListResultIterator) Next() error {
+func (iter *VaultListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -964,6 +1111,13 @@ func (iter *VaultListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VaultListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VaultListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -983,6 +1137,11 @@ func (iter VaultListResultIterator) Value() Vault {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VaultListResultIterator type.
+func NewVaultListResultIterator(page VaultListResultPage) VaultListResultIterator {
+ return VaultListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vlr VaultListResult) IsEmpty() bool {
return vlr.Value == nil || len(*vlr.Value) == 0
@@ -990,11 +1149,11 @@ func (vlr VaultListResult) IsEmpty() bool {
// vaultListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vlr VaultListResult) vaultListResultPreparer() (*http.Request, error) {
+func (vlr VaultListResult) vaultListResultPreparer(ctx context.Context) (*http.Request, error) {
if vlr.NextLink == nil || len(to.String(vlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vlr.NextLink)))
@@ -1002,14 +1161,24 @@ func (vlr VaultListResult) vaultListResultPreparer() (*http.Request, error) {
// VaultListResultPage contains a page of Vault values.
type VaultListResultPage struct {
- fn func(VaultListResult) (VaultListResult, error)
+ fn func(context.Context, VaultListResult) (VaultListResult, error)
vlr VaultListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VaultListResultPage) Next() error {
- next, err := page.fn(page.vlr)
+func (page *VaultListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vlr)
if err != nil {
return err
}
@@ -1017,6 +1186,13 @@ func (page *VaultListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VaultListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VaultListResultPage) NotDone() bool {
return !page.vlr.IsEmpty()
@@ -1035,6 +1211,11 @@ func (page VaultListResultPage) Values() []Vault {
return *page.vlr.Value
}
+// Creates a new instance of the VaultListResultPage type.
+func NewVaultListResultPage(getNextPage func(context.Context, VaultListResult) (VaultListResult, error)) VaultListResultPage {
+ return VaultListResultPage{fn: getNextPage}
+}
+
// VaultPatchParameters parameters for creating or updating a vault
type VaultPatchParameters struct {
// Tags - The tags that will be assigned to the key vault.
@@ -1105,7 +1286,8 @@ type VaultProperties struct {
NetworkAcls *NetworkRuleSet `json:"networkAcls,omitempty"`
}
-// VaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VaultsCreateOrUpdateFuture struct {
azure.Future
}
@@ -1133,7 +1315,8 @@ func (future *VaultsCreateOrUpdateFuture) Result(client VaultsClient) (vVar Vaul
return
}
-// VaultsPurgeDeletedFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VaultsPurgeDeletedFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VaultsPurgeDeletedFuture struct {
azure.Future
}
@@ -1155,7 +1338,7 @@ func (future *VaultsPurgeDeletedFuture) Result(client VaultsClient) (ar autorest
return
}
-// VirtualNetworkRule a rule governing the accesibility of a vault from a specific virtual network.
+// VirtualNetworkRule a rule governing the accessibility of a vault from a specific virtual network.
type VirtualNetworkRule struct {
// ID - Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'.
ID *string `json:"id,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/operations.go
index 13d26390d2b2..05c6c779ec04 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Key Vault Rest API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -100,8 +111,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -122,6 +133,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go
index 826a1b38bcdd..6b5b7ac3f9e5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/keyvault/mgmt/2018-02-14/keyvault/vaults.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVaultsClientWithBaseURI(baseURI string, subscriptionID string) VaultsCli
// Parameters:
// vaultName - the name of the vault.
func (client VaultsClient) CheckNameAvailability(ctx context.Context, vaultName VaultCheckNameAvailabilityParameters) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.CheckNameAvailability")
+ 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: vaultName,
Constraints: []validation.Constraint{{Target: "vaultName.Name", Name: validation.Null, Rule: true, Chain: nil},
@@ -120,6 +131,16 @@ func (client VaultsClient) CheckNameAvailabilityResponder(resp *http.Response) (
// vaultName - name of the vault
// parameters - parameters to create or update the vault
func (client VaultsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultCreateOrUpdateParameters) (result VaultsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: vaultName,
Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}},
@@ -180,10 +201,6 @@ func (client VaultsClient) CreateOrUpdateSender(req *http.Request) (future Vault
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -206,6 +223,16 @@ func (client VaultsClient) CreateOrUpdateResponder(resp *http.Response) (result
// resourceGroupName - the name of the Resource Group to which the vault belongs.
// vaultName - the name of the vault to delete
func (client VaultsClient) Delete(ctx context.Context, resourceGroupName string, vaultName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, vaultName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Delete", nil, "Failure preparing request")
@@ -272,6 +299,16 @@ func (client VaultsClient) DeleteResponder(resp *http.Response) (result autorest
// resourceGroupName - the name of the Resource Group to which the vault belongs.
// vaultName - the name of the vault.
func (client VaultsClient) Get(ctx context.Context, resourceGroupName string, vaultName string) (result Vault, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, vaultName)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "Get", nil, "Failure preparing request")
@@ -339,6 +376,16 @@ func (client VaultsClient) GetResponder(resp *http.Response) (result Vault, err
// vaultName - the name of the vault.
// location - the location of the deleted vault.
func (client VaultsClient) GetDeleted(ctx context.Context, vaultName string, location string) (result DeletedVault, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.GetDeleted")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetDeletedPreparer(ctx, vaultName, location)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "GetDeleted", nil, "Failure preparing request")
@@ -405,6 +452,16 @@ func (client VaultsClient) GetDeletedResponder(resp *http.Response) (result Dele
// Parameters:
// top - maximum number of results to return.
func (client VaultsClient) List(ctx context.Context, top *int32) (result ResourceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.List")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, top)
if err != nil {
@@ -471,8 +528,8 @@ func (client VaultsClient) ListResponder(resp *http.Response) (result ResourceLi
}
// listNextResults retrieves the next set of results, if any.
-func (client VaultsClient) listNextResults(lastResults ResourceListResult) (result ResourceListResult, err error) {
- req, err := lastResults.resourceListResultPreparer()
+func (client VaultsClient) listNextResults(ctx context.Context, lastResults ResourceListResult) (result ResourceListResult, err error) {
+ req, err := lastResults.resourceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -493,6 +550,16 @@ func (client VaultsClient) listNextResults(lastResults ResourceListResult) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VaultsClient) ListComplete(ctx context.Context, top *int32) (result ResourceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.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, top)
return
}
@@ -503,6 +570,16 @@ func (client VaultsClient) ListComplete(ctx context.Context, top *int32) (result
// resourceGroupName - the name of the Resource Group to which the vault belongs.
// top - maximum number of results to return.
func (client VaultsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result VaultListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.vlr.Response.Response != nil {
+ sc = result.vlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top)
if err != nil {
@@ -569,8 +646,8 @@ func (client VaultsClient) ListByResourceGroupResponder(resp *http.Response) (re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VaultsClient) listByResourceGroupNextResults(lastResults VaultListResult) (result VaultListResult, err error) {
- req, err := lastResults.vaultListResultPreparer()
+func (client VaultsClient) listByResourceGroupNextResults(ctx context.Context, lastResults VaultListResult) (result VaultListResult, err error) {
+ req, err := lastResults.vaultListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -591,6 +668,16 @@ func (client VaultsClient) listByResourceGroupNextResults(lastResults VaultListR
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VaultsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result VaultListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, top)
return
}
@@ -599,6 +686,16 @@ func (client VaultsClient) ListByResourceGroupComplete(ctx context.Context, reso
// Parameters:
// top - maximum number of results to return.
func (client VaultsClient) ListBySubscription(ctx context.Context, top *int32) (result VaultListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.vlr.Response.Response != nil {
+ sc = result.vlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx, top)
if err != nil {
@@ -664,8 +761,8 @@ func (client VaultsClient) ListBySubscriptionResponder(resp *http.Response) (res
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client VaultsClient) listBySubscriptionNextResults(lastResults VaultListResult) (result VaultListResult, err error) {
- req, err := lastResults.vaultListResultPreparer()
+func (client VaultsClient) listBySubscriptionNextResults(ctx context.Context, lastResults VaultListResult) (result VaultListResult, err error) {
+ req, err := lastResults.vaultListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -686,12 +783,32 @@ func (client VaultsClient) listBySubscriptionNextResults(lastResults VaultListRe
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client VaultsClient) ListBySubscriptionComplete(ctx context.Context, top *int32) (result VaultListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListBySubscription")
+ 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.ListBySubscription(ctx, top)
return
}
// ListDeleted gets information about the deleted vaults in a subscription.
func (client VaultsClient) ListDeleted(ctx context.Context) (result DeletedVaultListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListDeleted")
+ defer func() {
+ sc := -1
+ if result.dvlr.Response.Response != nil {
+ sc = result.dvlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listDeletedNextResults
req, err := client.ListDeletedPreparer(ctx)
if err != nil {
@@ -754,8 +871,8 @@ func (client VaultsClient) ListDeletedResponder(resp *http.Response) (result Del
}
// listDeletedNextResults retrieves the next set of results, if any.
-func (client VaultsClient) listDeletedNextResults(lastResults DeletedVaultListResult) (result DeletedVaultListResult, err error) {
- req, err := lastResults.deletedVaultListResultPreparer()
+func (client VaultsClient) listDeletedNextResults(ctx context.Context, lastResults DeletedVaultListResult) (result DeletedVaultListResult, err error) {
+ req, err := lastResults.deletedVaultListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "keyvault.VaultsClient", "listDeletedNextResults", nil, "Failure preparing next results request")
}
@@ -776,6 +893,16 @@ func (client VaultsClient) listDeletedNextResults(lastResults DeletedVaultListRe
// ListDeletedComplete enumerates all values, automatically crossing page boundaries as required.
func (client VaultsClient) ListDeletedComplete(ctx context.Context) (result DeletedVaultListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.ListDeleted")
+ 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.ListDeleted(ctx)
return
}
@@ -785,6 +912,16 @@ func (client VaultsClient) ListDeletedComplete(ctx context.Context) (result Dele
// vaultName - the name of the soft-deleted vault.
// location - the location of the soft-deleted vault.
func (client VaultsClient) PurgeDeleted(ctx context.Context, vaultName string, location string) (result VaultsPurgeDeletedFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.PurgeDeleted")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PurgeDeletedPreparer(ctx, vaultName, location)
if err != nil {
err = autorest.NewErrorWithError(err, "keyvault.VaultsClient", "PurgeDeleted", nil, "Failure preparing request")
@@ -830,10 +967,6 @@ func (client VaultsClient) PurgeDeletedSender(req *http.Request) (future VaultsP
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -856,6 +989,16 @@ func (client VaultsClient) PurgeDeletedResponder(resp *http.Response) (result au
// vaultName - name of the vault
// parameters - parameters to patch the vault
func (client VaultsClient) Update(ctx context.Context, resourceGroupName string, vaultName string, parameters VaultPatchParameters) (result Vault, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.Update")
+ 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: vaultName,
Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}}}); err != nil {
@@ -933,6 +1076,16 @@ func (client VaultsClient) UpdateResponder(resp *http.Response) (result Vault, e
// operationKind - name of the operation
// parameters - access policy to merge into the vault
func (client VaultsClient) UpdateAccessPolicy(ctx context.Context, resourceGroupName string, vaultName string, operationKind AccessPolicyUpdateKind, parameters VaultAccessPolicyParameters) (result VaultAccessPolicyParameters, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VaultsClient.UpdateAccessPolicy")
+ 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: vaultName,
Constraints: []validation.Constraint{{Target: "vaultName", Name: validation.Pattern, Rule: `^[a-zA-Z0-9-]{3,24}$`, Chain: nil}}},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
index 4188de4e27a1..54866bbeedab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/agreements.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewAgreementsClientWithBaseURI(baseURI string, subscriptionID string) Agree
// agreementName - the integration account agreement name.
// agreement - the integration account agreement.
func (client AgreementsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, agreement IntegrationAccountAgreement) (result IntegrationAccountAgreement, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.CreateOrUpdate")
+ 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: agreement,
Constraints: []validation.Constraint{{Target: "agreement.IntegrationAccountAgreementProperties", Name: validation.Null, Rule: true,
@@ -553,6 +564,16 @@ func (client AgreementsClient) CreateOrUpdateResponder(resp *http.Response) (res
// integrationAccountName - the integration account name.
// agreementName - the integration account agreement name.
func (client AgreementsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, agreementName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "Delete", nil, "Failure preparing request")
@@ -621,6 +642,16 @@ func (client AgreementsClient) DeleteResponder(resp *http.Response) (result auto
// integrationAccountName - the integration account name.
// agreementName - the integration account agreement name.
func (client AgreementsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string) (result IntegrationAccountAgreement, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, agreementName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "Get", nil, "Failure preparing request")
@@ -691,6 +722,16 @@ func (client AgreementsClient) GetResponder(resp *http.Response) (result Integra
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: AgreementType.
func (client AgreementsClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountAgreementListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iaalr.Response.Response != nil {
+ sc = result.iaalr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top, filter)
if err != nil {
@@ -761,8 +802,8 @@ func (client AgreementsClient) ListByIntegrationAccountsResponder(resp *http.Res
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client AgreementsClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountAgreementListResult) (result IntegrationAccountAgreementListResult, err error) {
- req, err := lastResults.integrationAccountAgreementListResultPreparer()
+func (client AgreementsClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountAgreementListResult) (result IntegrationAccountAgreementListResult, err error) {
+ req, err := lastResults.integrationAccountAgreementListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.AgreementsClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -783,6 +824,16 @@ func (client AgreementsClient) listByIntegrationAccountsNextResults(lastResults
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client AgreementsClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountAgreementListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
@@ -793,6 +844,16 @@ func (client AgreementsClient) ListByIntegrationAccountsComplete(ctx context.Con
// integrationAccountName - the integration account name.
// agreementName - the integration account agreement name.
func (client AgreementsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, agreementName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AgreementsClient.ListContentCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, agreementName, listContentCallbackURL)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.AgreementsClient", "ListContentCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/certificates.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/certificates.go
index b51fec4f071d..3f77fa748601 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/certificates.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/certificates.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewCertificatesClientWithBaseURI(baseURI string, subscriptionID string) Cer
// certificateName - the integration account certificate name.
// certificate - the integration account certificate.
func (client CertificatesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string, certificate IntegrationAccountCertificate) (result IntegrationAccountCertificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.CreateOrUpdate")
+ 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: certificate,
Constraints: []validation.Constraint{{Target: "certificate.IntegrationAccountCertificateProperties", Name: validation.Null, Rule: true,
@@ -129,6 +140,16 @@ func (client CertificatesClient) CreateOrUpdateResponder(resp *http.Response) (r
// integrationAccountName - the integration account name.
// certificateName - the integration account certificate name.
func (client CertificatesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.CertificatesClient", "Delete", nil, "Failure preparing request")
@@ -197,6 +218,16 @@ func (client CertificatesClient) DeleteResponder(resp *http.Response) (result au
// integrationAccountName - the integration account name.
// certificateName - the integration account certificate name.
func (client CertificatesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, certificateName string) (result IntegrationAccountCertificate, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, certificateName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.CertificatesClient", "Get", nil, "Failure preparing request")
@@ -266,6 +297,16 @@ func (client CertificatesClient) GetResponder(resp *http.Response) (result Integ
// integrationAccountName - the integration account name.
// top - the number of items to be included in the result.
func (client CertificatesClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result IntegrationAccountCertificateListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iaclr.Response.Response != nil {
+ sc = result.iaclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top)
if err != nil {
@@ -333,8 +374,8 @@ func (client CertificatesClient) ListByIntegrationAccountsResponder(resp *http.R
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client CertificatesClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountCertificateListResult) (result IntegrationAccountCertificateListResult, err error) {
- req, err := lastResults.integrationAccountCertificateListResultPreparer()
+func (client CertificatesClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountCertificateListResult) (result IntegrationAccountCertificateListResult, err error) {
+ req, err := lastResults.integrationAccountCertificateListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.CertificatesClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -355,6 +396,16 @@ func (client CertificatesClient) listByIntegrationAccountsNextResults(lastResult
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client CertificatesClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32) (result IntegrationAccountCertificateListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificatesClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/client.go
index 7c22198ec2e5..67445ead6120 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/client.go
@@ -24,6 +24,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -55,6 +56,16 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
// ListOperations lists all of the available Logic REST API operations.
func (client BaseClient) ListOperations(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListOperations")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listOperationsNextResults
req, err := client.ListOperationsPreparer(ctx)
if err != nil {
@@ -113,8 +124,8 @@ func (client BaseClient) ListOperationsResponder(resp *http.Response) (result Op
}
// listOperationsNextResults retrieves the next set of results, if any.
-func (client BaseClient) listOperationsNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client BaseClient) listOperationsNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.BaseClient", "listOperationsNextResults", nil, "Failure preparing next results request")
}
@@ -135,6 +146,16 @@ func (client BaseClient) listOperationsNextResults(lastResults OperationListResu
// ListOperationsComplete enumerates all values, automatically crossing page boundaries as required.
func (client BaseClient) ListOperationsComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.ListOperations")
+ 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.ListOperations(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go
index dd45c29fd2d2..a29a333b3214 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountassemblies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewIntegrationAccountAssembliesClientWithBaseURI(baseURI string, subscripti
// assemblyArtifactName - the assembly artifact name.
// assemblyArtifact - the assembly artifact.
func (client IntegrationAccountAssembliesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string, assemblyArtifact AssemblyDefinition) (result AssemblyDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.CreateOrUpdate")
+ 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: assemblyArtifact,
Constraints: []validation.Constraint{{Target: "assemblyArtifact.Properties", Name: validation.Null, Rule: true,
@@ -126,6 +137,16 @@ func (client IntegrationAccountAssembliesClient) CreateOrUpdateResponder(resp *h
// integrationAccountName - the integration account name.
// assemblyArtifactName - the assembly artifact name.
func (client IntegrationAccountAssembliesClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Delete", nil, "Failure preparing request")
@@ -194,6 +215,16 @@ func (client IntegrationAccountAssembliesClient) DeleteResponder(resp *http.Resp
// integrationAccountName - the integration account name.
// assemblyArtifactName - the assembly artifact name.
func (client IntegrationAccountAssembliesClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result AssemblyDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client IntegrationAccountAssembliesClient) GetResponder(resp *http.Respons
// resourceGroupName - the resource group name.
// integrationAccountName - the integration account name.
func (client IntegrationAccountAssembliesClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result AssemblyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "List", nil, "Failure preparing request")
@@ -330,6 +371,16 @@ func (client IntegrationAccountAssembliesClient) ListResponder(resp *http.Respon
// integrationAccountName - the integration account name.
// assemblyArtifactName - the assembly artifact name.
func (client IntegrationAccountAssembliesClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, assemblyArtifactName string) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAssembliesClient.ListContentCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, assemblyArtifactName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountAssembliesClient", "ListContentCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go
index 579db5b4f2d0..12c67e0ca6b8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccountbatchconfigurations.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewIntegrationAccountBatchConfigurationsClientWithBaseURI(baseURI string, s
// batchConfigurationName - the batch configuration name.
// batchConfiguration - the batch configuration.
func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string, batchConfiguration BatchConfiguration) (result BatchConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.CreateOrUpdate")
+ 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: batchConfiguration,
Constraints: []validation.Constraint{{Target: "batchConfiguration.Properties", Name: validation.Null, Rule: true,
@@ -129,6 +140,16 @@ func (client IntegrationAccountBatchConfigurationsClient) CreateOrUpdateResponde
// integrationAccountName - the integration account name.
// batchConfigurationName - the batch configuration name.
func (client IntegrationAccountBatchConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Delete", nil, "Failure preparing request")
@@ -197,6 +218,16 @@ func (client IntegrationAccountBatchConfigurationsClient) DeleteResponder(resp *
// integrationAccountName - the integration account name.
// batchConfigurationName - the batch configuration name.
func (client IntegrationAccountBatchConfigurationsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, batchConfigurationName string) (result BatchConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, batchConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -265,6 +296,16 @@ func (client IntegrationAccountBatchConfigurationsClient) GetResponder(resp *htt
// resourceGroupName - the resource group name.
// integrationAccountName - the integration account name.
func (client IntegrationAccountBatchConfigurationsClient) List(ctx context.Context, resourceGroupName string, integrationAccountName string) (result BatchConfigurationCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountBatchConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, integrationAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountBatchConfigurationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
index 2f3cf53088be..abe4a89b8400 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/integrationaccounts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewIntegrationAccountsClientWithBaseURI(baseURI string, subscriptionID stri
// integrationAccountName - the integration account name.
// integrationAccount - the integration account.
func (client IntegrationAccountsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, integrationAccountName, integrationAccount)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client IntegrationAccountsClient) CreateOrUpdateResponder(resp *http.Respo
// resourceGroupName - the resource group name.
// integrationAccountName - the integration account name.
func (client IntegrationAccountsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client IntegrationAccountsClient) DeleteResponder(resp *http.Response) (re
// resourceGroupName - the resource group name.
// integrationAccountName - the integration account name.
func (client IntegrationAccountsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string) (result IntegrationAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Get", nil, "Failure preparing request")
@@ -249,6 +280,16 @@ func (client IntegrationAccountsClient) GetResponder(resp *http.Response) (resul
// integrationAccountName - the integration account name.
// parameters - the callback URL parameters.
func (client IntegrationAccountsClient) GetCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, parameters GetCallbackURLParameters) (result CallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.GetCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "GetCallbackURL", nil, "Failure preparing request")
@@ -318,6 +359,16 @@ func (client IntegrationAccountsClient) GetCallbackURLResponder(resp *http.Respo
// resourceGroupName - the resource group name.
// top - the number of items to be included in the result.
func (client IntegrationAccountsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result IntegrationAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ialr.Response.Response != nil {
+ sc = result.ialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top)
if err != nil {
@@ -384,8 +435,8 @@ func (client IntegrationAccountsClient) ListByResourceGroupResponder(resp *http.
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client IntegrationAccountsClient) listByResourceGroupNextResults(lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) {
- req, err := lastResults.integrationAccountListResultPreparer()
+func (client IntegrationAccountsClient) listByResourceGroupNextResults(ctx context.Context, lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) {
+ req, err := lastResults.integrationAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -406,6 +457,16 @@ func (client IntegrationAccountsClient) listByResourceGroupNextResults(lastResul
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client IntegrationAccountsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result IntegrationAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, top)
return
}
@@ -414,6 +475,16 @@ func (client IntegrationAccountsClient) ListByResourceGroupComplete(ctx context.
// Parameters:
// top - the number of items to be included in the result.
func (client IntegrationAccountsClient) ListBySubscription(ctx context.Context, top *int32) (result IntegrationAccountListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.ialr.Response.Response != nil {
+ sc = result.ialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx, top)
if err != nil {
@@ -479,8 +550,8 @@ func (client IntegrationAccountsClient) ListBySubscriptionResponder(resp *http.R
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client IntegrationAccountsClient) listBySubscriptionNextResults(lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) {
- req, err := lastResults.integrationAccountListResultPreparer()
+func (client IntegrationAccountsClient) listBySubscriptionNextResults(ctx context.Context, lastResults IntegrationAccountListResult) (result IntegrationAccountListResult, err error) {
+ req, err := lastResults.integrationAccountListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -501,6 +572,16 @@ func (client IntegrationAccountsClient) listBySubscriptionNextResults(lastResult
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client IntegrationAccountsClient) ListBySubscriptionComplete(ctx context.Context, top *int32) (result IntegrationAccountListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListBySubscription")
+ 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.ListBySubscription(ctx, top)
return
}
@@ -511,6 +592,16 @@ func (client IntegrationAccountsClient) ListBySubscriptionComplete(ctx context.C
// integrationAccountName - the integration account name.
// listKeyVaultKeys - the key vault parameters.
func (client IntegrationAccountsClient) ListKeyVaultKeys(ctx context.Context, resourceGroupName string, integrationAccountName string, listKeyVaultKeys ListKeyVaultKeysDefinition) (result KeyVaultKeyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.ListKeyVaultKeys")
+ 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: listKeyVaultKeys,
Constraints: []validation.Constraint{{Target: "listKeyVaultKeys.KeyVault", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -587,6 +678,16 @@ func (client IntegrationAccountsClient) ListKeyVaultKeysResponder(resp *http.Res
// integrationAccountName - the integration account name.
// logTrackingEvents - the callback URL parameters.
func (client IntegrationAccountsClient) LogTrackingEvents(ctx context.Context, resourceGroupName string, integrationAccountName string, logTrackingEvents TrackingEventsDefinition) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.LogTrackingEvents")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: logTrackingEvents,
Constraints: []validation.Constraint{{Target: "logTrackingEvents.SourceType", Name: validation.Null, Rule: true, Chain: nil},
@@ -663,6 +764,16 @@ func (client IntegrationAccountsClient) LogTrackingEventsResponder(resp *http.Re
// integrationAccountName - the integration account name.
// regenerateAccessKey - the access key type.
func (client IntegrationAccountsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, integrationAccountName string, regenerateAccessKey RegenerateActionParameter) (result IntegrationAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.RegenerateAccessKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, integrationAccountName, regenerateAccessKey)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "RegenerateAccessKey", nil, "Failure preparing request")
@@ -733,6 +844,16 @@ func (client IntegrationAccountsClient) RegenerateAccessKeyResponder(resp *http.
// integrationAccountName - the integration account name.
// integrationAccount - the integration account.
func (client IntegrationAccountsClient) Update(ctx context.Context, resourceGroupName string, integrationAccountName string, integrationAccount IntegrationAccount) (result IntegrationAccount, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, integrationAccountName, integrationAccount)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.IntegrationAccountsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
index 21b1ab1628a4..56770fc36afe 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/maps.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewMapsClientWithBaseURI(baseURI string, subscriptionID string) MapsClient
// mapName - the integration account map name.
// mapParameter - the integration account map.
func (client MapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, mapParameter IntegrationAccountMap) (result IntegrationAccountMap, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.CreateOrUpdate")
+ 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: mapParameter,
Constraints: []validation.Constraint{{Target: "mapParameter.IntegrationAccountMapProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -124,6 +135,16 @@ func (client MapsClient) CreateOrUpdateResponder(resp *http.Response) (result In
// integrationAccountName - the integration account name.
// mapName - the integration account map name.
func (client MapsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, mapName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.MapsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client MapsClient) DeleteResponder(resp *http.Response) (result autorest.R
// integrationAccountName - the integration account name.
// mapName - the integration account map name.
func (client MapsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string) (result IntegrationAccountMap, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, mapName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.MapsClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client MapsClient) GetResponder(resp *http.Response) (result IntegrationAc
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: MapType.
func (client MapsClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountMapListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iamlr.Response.Response != nil {
+ sc = result.iamlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top, filter)
if err != nil {
@@ -332,8 +373,8 @@ func (client MapsClient) ListByIntegrationAccountsResponder(resp *http.Response)
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client MapsClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountMapListResult) (result IntegrationAccountMapListResult, err error) {
- req, err := lastResults.integrationAccountMapListResultPreparer()
+func (client MapsClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountMapListResult) (result IntegrationAccountMapListResult, err error) {
+ req, err := lastResults.integrationAccountMapListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.MapsClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -354,6 +395,16 @@ func (client MapsClient) listByIntegrationAccountsNextResults(lastResults Integr
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client MapsClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountMapListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
@@ -364,6 +415,16 @@ func (client MapsClient) ListByIntegrationAccountsComplete(ctx context.Context,
// integrationAccountName - the integration account name.
// mapName - the integration account map name.
func (client MapsClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, mapName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MapsClient.ListContentCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, mapName, listContentCallbackURL)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.MapsClient", "ListContentCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
index 5e545c016415..aa8f91e46668 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/models.go
@@ -18,13 +18,18 @@ package logic
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic"
+
// AccessKeyType enumerates the values for access key type.
type AccessKeyType string
@@ -1493,8 +1498,8 @@ type ErrorInfo struct {
Code *string `json:"code,omitempty"`
}
-// ErrorProperties error properties indicate why the Logic service was not able to process the incoming request.
-// The reason is provided in the error message.
+// ErrorProperties error properties indicate why the Logic service was not able to process the incoming
+// request. The reason is provided in the error message.
type ErrorProperties struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
@@ -1502,8 +1507,8 @@ type ErrorProperties struct {
Message *string `json:"message,omitempty"`
}
-// ErrorResponse error response indicates Logic service is not able to process the incoming request. The error
-// property contains the error details.
+// ErrorResponse error response indicates Logic service is not able to process the incoming request. The
+// error property contains the error details.
type ErrorResponse struct {
// Error - The error properties.
Error *ErrorProperties `json:"error,omitempty"`
@@ -1569,7 +1574,9 @@ type IntegrationAccount struct {
// MarshalJSON is the custom marshaler for IntegrationAccount.
func (ia IntegrationAccount) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- objectMap["properties"] = ia.Properties
+ if ia.Properties != nil {
+ objectMap["properties"] = ia.Properties
+ }
if ia.Sku != nil {
objectMap["sku"] = ia.Sku
}
@@ -1723,14 +1730,24 @@ type IntegrationAccountAgreementListResultIterator struct {
page IntegrationAccountAgreementListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountAgreementListResultIterator) Next() error {
+func (iter *IntegrationAccountAgreementListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1739,6 +1756,13 @@ func (iter *IntegrationAccountAgreementListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountAgreementListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountAgreementListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1758,6 +1782,11 @@ func (iter IntegrationAccountAgreementListResultIterator) Value() IntegrationAcc
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountAgreementListResultIterator type.
+func NewIntegrationAccountAgreementListResultIterator(page IntegrationAccountAgreementListResultPage) IntegrationAccountAgreementListResultIterator {
+ return IntegrationAccountAgreementListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iaalr IntegrationAccountAgreementListResult) IsEmpty() bool {
return iaalr.Value == nil || len(*iaalr.Value) == 0
@@ -1765,11 +1794,11 @@ func (iaalr IntegrationAccountAgreementListResult) IsEmpty() bool {
// integrationAccountAgreementListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iaalr IntegrationAccountAgreementListResult) integrationAccountAgreementListResultPreparer() (*http.Request, error) {
+func (iaalr IntegrationAccountAgreementListResult) integrationAccountAgreementListResultPreparer(ctx context.Context) (*http.Request, error) {
if iaalr.NextLink == nil || len(to.String(iaalr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iaalr.NextLink)))
@@ -1777,14 +1806,24 @@ func (iaalr IntegrationAccountAgreementListResult) integrationAccountAgreementLi
// IntegrationAccountAgreementListResultPage contains a page of IntegrationAccountAgreement values.
type IntegrationAccountAgreementListResultPage struct {
- fn func(IntegrationAccountAgreementListResult) (IntegrationAccountAgreementListResult, error)
+ fn func(context.Context, IntegrationAccountAgreementListResult) (IntegrationAccountAgreementListResult, error)
iaalr IntegrationAccountAgreementListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountAgreementListResultPage) Next() error {
- next, err := page.fn(page.iaalr)
+func (page *IntegrationAccountAgreementListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountAgreementListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iaalr)
if err != nil {
return err
}
@@ -1792,6 +1831,13 @@ func (page *IntegrationAccountAgreementListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountAgreementListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountAgreementListResultPage) NotDone() bool {
return !page.iaalr.IsEmpty()
@@ -1810,6 +1856,11 @@ func (page IntegrationAccountAgreementListResultPage) Values() []IntegrationAcco
return *page.iaalr.Value
}
+// Creates a new instance of the IntegrationAccountAgreementListResultPage type.
+func NewIntegrationAccountAgreementListResultPage(getNextPage func(context.Context, IntegrationAccountAgreementListResult) (IntegrationAccountAgreementListResult, error)) IntegrationAccountAgreementListResultPage {
+ return IntegrationAccountAgreementListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountAgreementProperties the integration account agreement properties.
type IntegrationAccountAgreementProperties struct {
// CreatedTime - The created time.
@@ -1958,14 +2009,24 @@ type IntegrationAccountCertificateListResultIterator struct {
page IntegrationAccountCertificateListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountCertificateListResultIterator) Next() error {
+func (iter *IntegrationAccountCertificateListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificateListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1974,6 +2035,13 @@ func (iter *IntegrationAccountCertificateListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountCertificateListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountCertificateListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1993,6 +2061,11 @@ func (iter IntegrationAccountCertificateListResultIterator) Value() IntegrationA
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountCertificateListResultIterator type.
+func NewIntegrationAccountCertificateListResultIterator(page IntegrationAccountCertificateListResultPage) IntegrationAccountCertificateListResultIterator {
+ return IntegrationAccountCertificateListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iaclr IntegrationAccountCertificateListResult) IsEmpty() bool {
return iaclr.Value == nil || len(*iaclr.Value) == 0
@@ -2000,11 +2073,11 @@ func (iaclr IntegrationAccountCertificateListResult) IsEmpty() bool {
// integrationAccountCertificateListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iaclr IntegrationAccountCertificateListResult) integrationAccountCertificateListResultPreparer() (*http.Request, error) {
+func (iaclr IntegrationAccountCertificateListResult) integrationAccountCertificateListResultPreparer(ctx context.Context) (*http.Request, error) {
if iaclr.NextLink == nil || len(to.String(iaclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iaclr.NextLink)))
@@ -2012,14 +2085,24 @@ func (iaclr IntegrationAccountCertificateListResult) integrationAccountCertifica
// IntegrationAccountCertificateListResultPage contains a page of IntegrationAccountCertificate values.
type IntegrationAccountCertificateListResultPage struct {
- fn func(IntegrationAccountCertificateListResult) (IntegrationAccountCertificateListResult, error)
+ fn func(context.Context, IntegrationAccountCertificateListResult) (IntegrationAccountCertificateListResult, error)
iaclr IntegrationAccountCertificateListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountCertificateListResultPage) Next() error {
- next, err := page.fn(page.iaclr)
+func (page *IntegrationAccountCertificateListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountCertificateListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iaclr)
if err != nil {
return err
}
@@ -2027,6 +2110,13 @@ func (page *IntegrationAccountCertificateListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountCertificateListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountCertificateListResultPage) NotDone() bool {
return !page.iaclr.IsEmpty()
@@ -2045,6 +2135,11 @@ func (page IntegrationAccountCertificateListResultPage) Values() []IntegrationAc
return *page.iaclr.Value
}
+// Creates a new instance of the IntegrationAccountCertificateListResultPage type.
+func NewIntegrationAccountCertificateListResultPage(getNextPage func(context.Context, IntegrationAccountCertificateListResult) (IntegrationAccountCertificateListResult, error)) IntegrationAccountCertificateListResultPage {
+ return IntegrationAccountCertificateListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountCertificateProperties the integration account certificate properties.
type IntegrationAccountCertificateProperties struct {
// CreatedTime - The created time.
@@ -2074,14 +2169,24 @@ type IntegrationAccountListResultIterator struct {
page IntegrationAccountListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountListResultIterator) Next() error {
+func (iter *IntegrationAccountListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2090,6 +2195,13 @@ func (iter *IntegrationAccountListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2109,6 +2221,11 @@ func (iter IntegrationAccountListResultIterator) Value() IntegrationAccount {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountListResultIterator type.
+func NewIntegrationAccountListResultIterator(page IntegrationAccountListResultPage) IntegrationAccountListResultIterator {
+ return IntegrationAccountListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ialr IntegrationAccountListResult) IsEmpty() bool {
return ialr.Value == nil || len(*ialr.Value) == 0
@@ -2116,11 +2233,11 @@ func (ialr IntegrationAccountListResult) IsEmpty() bool {
// integrationAccountListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ialr IntegrationAccountListResult) integrationAccountListResultPreparer() (*http.Request, error) {
+func (ialr IntegrationAccountListResult) integrationAccountListResultPreparer(ctx context.Context) (*http.Request, error) {
if ialr.NextLink == nil || len(to.String(ialr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ialr.NextLink)))
@@ -2128,14 +2245,24 @@ func (ialr IntegrationAccountListResult) integrationAccountListResultPreparer()
// IntegrationAccountListResultPage contains a page of IntegrationAccount values.
type IntegrationAccountListResultPage struct {
- fn func(IntegrationAccountListResult) (IntegrationAccountListResult, error)
+ fn func(context.Context, IntegrationAccountListResult) (IntegrationAccountListResult, error)
ialr IntegrationAccountListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountListResultPage) Next() error {
- next, err := page.fn(page.ialr)
+func (page *IntegrationAccountListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ialr)
if err != nil {
return err
}
@@ -2143,6 +2270,13 @@ func (page *IntegrationAccountListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountListResultPage) NotDone() bool {
return !page.ialr.IsEmpty()
@@ -2161,6 +2295,11 @@ func (page IntegrationAccountListResultPage) Values() []IntegrationAccount {
return *page.ialr.Value
}
+// Creates a new instance of the IntegrationAccountListResultPage type.
+func NewIntegrationAccountListResultPage(getNextPage func(context.Context, IntegrationAccountListResult) (IntegrationAccountListResult, error)) IntegrationAccountListResultPage {
+ return IntegrationAccountListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountMap the integration account map.
type IntegrationAccountMap struct {
autorest.Response `json:"-"`
@@ -2286,20 +2425,31 @@ type IntegrationAccountMapListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IntegrationAccountMapListResultIterator provides access to a complete listing of IntegrationAccountMap values.
+// IntegrationAccountMapListResultIterator provides access to a complete listing of IntegrationAccountMap
+// values.
type IntegrationAccountMapListResultIterator struct {
i int
page IntegrationAccountMapListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountMapListResultIterator) Next() error {
+func (iter *IntegrationAccountMapListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2308,6 +2458,13 @@ func (iter *IntegrationAccountMapListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountMapListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountMapListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2327,6 +2484,11 @@ func (iter IntegrationAccountMapListResultIterator) Value() IntegrationAccountMa
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountMapListResultIterator type.
+func NewIntegrationAccountMapListResultIterator(page IntegrationAccountMapListResultPage) IntegrationAccountMapListResultIterator {
+ return IntegrationAccountMapListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iamlr IntegrationAccountMapListResult) IsEmpty() bool {
return iamlr.Value == nil || len(*iamlr.Value) == 0
@@ -2334,11 +2496,11 @@ func (iamlr IntegrationAccountMapListResult) IsEmpty() bool {
// integrationAccountMapListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iamlr IntegrationAccountMapListResult) integrationAccountMapListResultPreparer() (*http.Request, error) {
+func (iamlr IntegrationAccountMapListResult) integrationAccountMapListResultPreparer(ctx context.Context) (*http.Request, error) {
if iamlr.NextLink == nil || len(to.String(iamlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iamlr.NextLink)))
@@ -2346,14 +2508,24 @@ func (iamlr IntegrationAccountMapListResult) integrationAccountMapListResultPrep
// IntegrationAccountMapListResultPage contains a page of IntegrationAccountMap values.
type IntegrationAccountMapListResultPage struct {
- fn func(IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error)
+ fn func(context.Context, IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error)
iamlr IntegrationAccountMapListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountMapListResultPage) Next() error {
- next, err := page.fn(page.iamlr)
+func (page *IntegrationAccountMapListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountMapListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iamlr)
if err != nil {
return err
}
@@ -2361,6 +2533,13 @@ func (page *IntegrationAccountMapListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountMapListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountMapListResultPage) NotDone() bool {
return !page.iamlr.IsEmpty()
@@ -2379,6 +2558,11 @@ func (page IntegrationAccountMapListResultPage) Values() []IntegrationAccountMap
return *page.iamlr.Value
}
+// Creates a new instance of the IntegrationAccountMapListResultPage type.
+func NewIntegrationAccountMapListResultPage(getNextPage func(context.Context, IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error)) IntegrationAccountMapListResultPage {
+ return IntegrationAccountMapListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountMapProperties the integration account map.
type IntegrationAccountMapProperties struct {
// MapType - The map type. Possible values include: 'MapTypeNotSpecified', 'MapTypeXslt'
@@ -2530,21 +2714,31 @@ type IntegrationAccountPartnerListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IntegrationAccountPartnerListResultIterator provides access to a complete listing of IntegrationAccountPartner
-// values.
+// IntegrationAccountPartnerListResultIterator provides access to a complete listing of
+// IntegrationAccountPartner values.
type IntegrationAccountPartnerListResultIterator struct {
i int
page IntegrationAccountPartnerListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountPartnerListResultIterator) Next() error {
+func (iter *IntegrationAccountPartnerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2553,6 +2747,13 @@ func (iter *IntegrationAccountPartnerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountPartnerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountPartnerListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2572,6 +2773,11 @@ func (iter IntegrationAccountPartnerListResultIterator) Value() IntegrationAccou
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountPartnerListResultIterator type.
+func NewIntegrationAccountPartnerListResultIterator(page IntegrationAccountPartnerListResultPage) IntegrationAccountPartnerListResultIterator {
+ return IntegrationAccountPartnerListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iaplr IntegrationAccountPartnerListResult) IsEmpty() bool {
return iaplr.Value == nil || len(*iaplr.Value) == 0
@@ -2579,11 +2785,11 @@ func (iaplr IntegrationAccountPartnerListResult) IsEmpty() bool {
// integrationAccountPartnerListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iaplr IntegrationAccountPartnerListResult) integrationAccountPartnerListResultPreparer() (*http.Request, error) {
+func (iaplr IntegrationAccountPartnerListResult) integrationAccountPartnerListResultPreparer(ctx context.Context) (*http.Request, error) {
if iaplr.NextLink == nil || len(to.String(iaplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iaplr.NextLink)))
@@ -2591,14 +2797,24 @@ func (iaplr IntegrationAccountPartnerListResult) integrationAccountPartnerListRe
// IntegrationAccountPartnerListResultPage contains a page of IntegrationAccountPartner values.
type IntegrationAccountPartnerListResultPage struct {
- fn func(IntegrationAccountPartnerListResult) (IntegrationAccountPartnerListResult, error)
+ fn func(context.Context, IntegrationAccountPartnerListResult) (IntegrationAccountPartnerListResult, error)
iaplr IntegrationAccountPartnerListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountPartnerListResultPage) Next() error {
- next, err := page.fn(page.iaplr)
+func (page *IntegrationAccountPartnerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountPartnerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iaplr)
if err != nil {
return err
}
@@ -2606,6 +2822,13 @@ func (page *IntegrationAccountPartnerListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountPartnerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountPartnerListResultPage) NotDone() bool {
return !page.iaplr.IsEmpty()
@@ -2624,6 +2847,11 @@ func (page IntegrationAccountPartnerListResultPage) Values() []IntegrationAccoun
return *page.iaplr.Value
}
+// Creates a new instance of the IntegrationAccountPartnerListResultPage type.
+func NewIntegrationAccountPartnerListResultPage(getNextPage func(context.Context, IntegrationAccountPartnerListResult) (IntegrationAccountPartnerListResult, error)) IntegrationAccountPartnerListResultPage {
+ return IntegrationAccountPartnerListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountPartnerProperties the integration account partner properties.
type IntegrationAccountPartnerProperties struct {
// PartnerType - The partner type. Possible values include: 'PartnerTypeNotSpecified', 'PartnerTypeB2B'
@@ -2763,21 +2991,31 @@ type IntegrationAccountSchemaListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IntegrationAccountSchemaListResultIterator provides access to a complete listing of IntegrationAccountSchema
-// values.
+// IntegrationAccountSchemaListResultIterator provides access to a complete listing of
+// IntegrationAccountSchema values.
type IntegrationAccountSchemaListResultIterator struct {
i int
page IntegrationAccountSchemaListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountSchemaListResultIterator) Next() error {
+func (iter *IntegrationAccountSchemaListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemaListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2786,6 +3024,13 @@ func (iter *IntegrationAccountSchemaListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountSchemaListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountSchemaListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2805,6 +3050,11 @@ func (iter IntegrationAccountSchemaListResultIterator) Value() IntegrationAccoun
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountSchemaListResultIterator type.
+func NewIntegrationAccountSchemaListResultIterator(page IntegrationAccountSchemaListResultPage) IntegrationAccountSchemaListResultIterator {
+ return IntegrationAccountSchemaListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iaslr IntegrationAccountSchemaListResult) IsEmpty() bool {
return iaslr.Value == nil || len(*iaslr.Value) == 0
@@ -2812,11 +3062,11 @@ func (iaslr IntegrationAccountSchemaListResult) IsEmpty() bool {
// integrationAccountSchemaListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iaslr IntegrationAccountSchemaListResult) integrationAccountSchemaListResultPreparer() (*http.Request, error) {
+func (iaslr IntegrationAccountSchemaListResult) integrationAccountSchemaListResultPreparer(ctx context.Context) (*http.Request, error) {
if iaslr.NextLink == nil || len(to.String(iaslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iaslr.NextLink)))
@@ -2824,14 +3074,24 @@ func (iaslr IntegrationAccountSchemaListResult) integrationAccountSchemaListResu
// IntegrationAccountSchemaListResultPage contains a page of IntegrationAccountSchema values.
type IntegrationAccountSchemaListResultPage struct {
- fn func(IntegrationAccountSchemaListResult) (IntegrationAccountSchemaListResult, error)
+ fn func(context.Context, IntegrationAccountSchemaListResult) (IntegrationAccountSchemaListResult, error)
iaslr IntegrationAccountSchemaListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountSchemaListResultPage) Next() error {
- next, err := page.fn(page.iaslr)
+func (page *IntegrationAccountSchemaListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSchemaListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iaslr)
if err != nil {
return err
}
@@ -2839,6 +3099,13 @@ func (page *IntegrationAccountSchemaListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountSchemaListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountSchemaListResultPage) NotDone() bool {
return !page.iaslr.IsEmpty()
@@ -2857,6 +3124,11 @@ func (page IntegrationAccountSchemaListResultPage) Values() []IntegrationAccount
return *page.iaslr.Value
}
+// Creates a new instance of the IntegrationAccountSchemaListResultPage type.
+func NewIntegrationAccountSchemaListResultPage(getNextPage func(context.Context, IntegrationAccountSchemaListResult) (IntegrationAccountSchemaListResult, error)) IntegrationAccountSchemaListResultPage {
+ return IntegrationAccountSchemaListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountSchemaProperties the integration account schema properties.
type IntegrationAccountSchemaProperties struct {
// SchemaType - The schema type. Possible values include: 'SchemaTypeNotSpecified', 'SchemaTypeXML'
@@ -3006,21 +3278,31 @@ type IntegrationAccountSessionListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IntegrationAccountSessionListResultIterator provides access to a complete listing of IntegrationAccountSession
-// values.
+// IntegrationAccountSessionListResultIterator provides access to a complete listing of
+// IntegrationAccountSession values.
type IntegrationAccountSessionListResultIterator struct {
i int
page IntegrationAccountSessionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IntegrationAccountSessionListResultIterator) Next() error {
+func (iter *IntegrationAccountSessionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3029,6 +3311,13 @@ func (iter *IntegrationAccountSessionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IntegrationAccountSessionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IntegrationAccountSessionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3048,6 +3337,11 @@ func (iter IntegrationAccountSessionListResultIterator) Value() IntegrationAccou
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IntegrationAccountSessionListResultIterator type.
+func NewIntegrationAccountSessionListResultIterator(page IntegrationAccountSessionListResultPage) IntegrationAccountSessionListResultIterator {
+ return IntegrationAccountSessionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iaslr IntegrationAccountSessionListResult) IsEmpty() bool {
return iaslr.Value == nil || len(*iaslr.Value) == 0
@@ -3055,11 +3349,11 @@ func (iaslr IntegrationAccountSessionListResult) IsEmpty() bool {
// integrationAccountSessionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iaslr IntegrationAccountSessionListResult) integrationAccountSessionListResultPreparer() (*http.Request, error) {
+func (iaslr IntegrationAccountSessionListResult) integrationAccountSessionListResultPreparer(ctx context.Context) (*http.Request, error) {
if iaslr.NextLink == nil || len(to.String(iaslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iaslr.NextLink)))
@@ -3067,14 +3361,24 @@ func (iaslr IntegrationAccountSessionListResult) integrationAccountSessionListRe
// IntegrationAccountSessionListResultPage contains a page of IntegrationAccountSession values.
type IntegrationAccountSessionListResultPage struct {
- fn func(IntegrationAccountSessionListResult) (IntegrationAccountSessionListResult, error)
+ fn func(context.Context, IntegrationAccountSessionListResult) (IntegrationAccountSessionListResult, error)
iaslr IntegrationAccountSessionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IntegrationAccountSessionListResultPage) Next() error {
- next, err := page.fn(page.iaslr)
+func (page *IntegrationAccountSessionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IntegrationAccountSessionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iaslr)
if err != nil {
return err
}
@@ -3082,6 +3386,13 @@ func (page *IntegrationAccountSessionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IntegrationAccountSessionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IntegrationAccountSessionListResultPage) NotDone() bool {
return !page.iaslr.IsEmpty()
@@ -3100,6 +3411,11 @@ func (page IntegrationAccountSessionListResultPage) Values() []IntegrationAccoun
return *page.iaslr.Value
}
+// Creates a new instance of the IntegrationAccountSessionListResultPage type.
+func NewIntegrationAccountSessionListResultPage(getNextPage func(context.Context, IntegrationAccountSessionListResult) (IntegrationAccountSessionListResult, error)) IntegrationAccountSessionListResultPage {
+ return IntegrationAccountSessionListResultPage{fn: getNextPage}
+}
+
// IntegrationAccountSessionProperties the integration account session properties.
type IntegrationAccountSessionProperties struct {
// CreatedTime - The created time.
@@ -3208,8 +3524,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationListResult result of the request to list Logic operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationListResult result of the request to list Logic operations. It contains a list of operations and
+// a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of Logic operations supported by the Logic resource provider.
@@ -3224,14 +3540,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3240,6 +3566,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3259,6 +3592,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -3266,11 +3604,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -3278,14 +3616,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -3293,6 +3641,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -3311,6 +3666,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationResult the operation result definition.
type OperationResult struct {
// TrackingID - Gets the tracking id.
@@ -3398,6 +3758,215 @@ type RepetitionIndex struct {
ItemIndex *int32 `json:"itemIndex,omitempty"`
}
+// Request a request.
+type Request struct {
+ // Headers - A list of all the headers attached to the request.
+ Headers interface{} `json:"headers,omitempty"`
+ // URI - The destination for the request.
+ URI *string `json:"uri,omitempty"`
+ // Method - The HTTP method used for the request.
+ Method *string `json:"method,omitempty"`
+}
+
+// RequestHistory the request history.
+type RequestHistory struct {
+ autorest.Response `json:"-"`
+ // Properties - The request history properties.
+ Properties *RequestHistoryProperties `json:"properties,omitempty"`
+ // ID - The resource id.
+ ID *string `json:"id,omitempty"`
+ // Name - Gets the resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Gets the resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - The resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - The resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for RequestHistory.
+func (rh RequestHistory) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if rh.Properties != nil {
+ objectMap["properties"] = rh.Properties
+ }
+ if rh.ID != nil {
+ objectMap["id"] = rh.ID
+ }
+ if rh.Name != nil {
+ objectMap["name"] = rh.Name
+ }
+ if rh.Type != nil {
+ objectMap["type"] = rh.Type
+ }
+ if rh.Location != nil {
+ objectMap["location"] = rh.Location
+ }
+ if rh.Tags != nil {
+ objectMap["tags"] = rh.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// RequestHistoryListResult the list of workflow request histories.
+type RequestHistoryListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of workflow request histories.
+ Value *[]RequestHistory `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// RequestHistoryListResultIterator provides access to a complete listing of RequestHistory values.
+type RequestHistoryListResultIterator struct {
+ i int
+ page RequestHistoryListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *RequestHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RequestHistoryListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter RequestHistoryListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter RequestHistoryListResultIterator) Response() RequestHistoryListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter RequestHistoryListResultIterator) Value() RequestHistory {
+ if !iter.page.NotDone() {
+ return RequestHistory{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the RequestHistoryListResultIterator type.
+func NewRequestHistoryListResultIterator(page RequestHistoryListResultPage) RequestHistoryListResultIterator {
+ return RequestHistoryListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rhlr RequestHistoryListResult) IsEmpty() bool {
+ return rhlr.Value == nil || len(*rhlr.Value) == 0
+}
+
+// requestHistoryListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rhlr RequestHistoryListResult) requestHistoryListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if rhlr.NextLink == nil || len(to.String(rhlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rhlr.NextLink)))
+}
+
+// RequestHistoryListResultPage contains a page of RequestHistory values.
+type RequestHistoryListResultPage struct {
+ fn func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error)
+ rhlr RequestHistoryListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *RequestHistoryListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RequestHistoryListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rhlr)
+ if err != nil {
+ return err
+ }
+ page.rhlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RequestHistoryListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page RequestHistoryListResultPage) NotDone() bool {
+ return !page.rhlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page RequestHistoryListResultPage) Response() RequestHistoryListResult {
+ return page.rhlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page RequestHistoryListResultPage) Values() []RequestHistory {
+ if page.rhlr.IsEmpty() {
+ return nil
+ }
+ return *page.rhlr.Value
+}
+
+// Creates a new instance of the RequestHistoryListResultPage type.
+func NewRequestHistoryListResultPage(getNextPage func(context.Context, RequestHistoryListResult) (RequestHistoryListResult, error)) RequestHistoryListResultPage {
+ return RequestHistoryListResultPage{fn: getNextPage}
+}
+
+// RequestHistoryProperties the request history.
+type RequestHistoryProperties struct {
+ // StartTime - The time the request started.
+ StartTime *date.Time `json:"startTime,omitempty"`
+ // EndTime - The time the request ended.
+ EndTime *date.Time `json:"endTime,omitempty"`
+ // Request - The request.
+ Request *Request `json:"request,omitempty"`
+ // Response - The response.
+ Response *Response `json:"response,omitempty"`
+}
+
// Resource the base resource type.
type Resource struct {
// ID - The resource id.
@@ -3443,6 +4012,16 @@ type ResourceReference struct {
Type *string `json:"type,omitempty"`
}
+// Response a response.
+type Response struct {
+ // Headers - A list of all the headers attached to the response.
+ Headers interface{} `json:"headers,omitempty"`
+ // StatusCode - The status code of the response.
+ StatusCode *int32 `json:"statusCode,omitempty"`
+ // BodyLink - Details on the location of the body content.
+ BodyLink *ContentLink `json:"bodyLink,omitempty"`
+}
+
// RetryHistory the retry history.
type RetryHistory struct {
// StartTime - Gets the start time.
@@ -3657,14 +4236,24 @@ type WorkflowListResultIterator struct {
page WorkflowListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowListResultIterator) Next() error {
+func (iter *WorkflowListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3673,6 +4262,13 @@ func (iter *WorkflowListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3692,6 +4288,11 @@ func (iter WorkflowListResultIterator) Value() Workflow {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowListResultIterator type.
+func NewWorkflowListResultIterator(page WorkflowListResultPage) WorkflowListResultIterator {
+ return WorkflowListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wlr WorkflowListResult) IsEmpty() bool {
return wlr.Value == nil || len(*wlr.Value) == 0
@@ -3699,11 +4300,11 @@ func (wlr WorkflowListResult) IsEmpty() bool {
// workflowListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wlr WorkflowListResult) workflowListResultPreparer() (*http.Request, error) {
+func (wlr WorkflowListResult) workflowListResultPreparer(ctx context.Context) (*http.Request, error) {
if wlr.NextLink == nil || len(to.String(wlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wlr.NextLink)))
@@ -3711,14 +4312,24 @@ func (wlr WorkflowListResult) workflowListResultPreparer() (*http.Request, error
// WorkflowListResultPage contains a page of Workflow values.
type WorkflowListResultPage struct {
- fn func(WorkflowListResult) (WorkflowListResult, error)
+ fn func(context.Context, WorkflowListResult) (WorkflowListResult, error)
wlr WorkflowListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowListResultPage) Next() error {
- next, err := page.fn(page.wlr)
+func (page *WorkflowListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wlr)
if err != nil {
return err
}
@@ -3726,6 +4337,13 @@ func (page *WorkflowListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowListResultPage) NotDone() bool {
return !page.wlr.IsEmpty()
@@ -3744,6 +4362,11 @@ func (page WorkflowListResultPage) Values() []Workflow {
return *page.wlr.Value
}
+// Creates a new instance of the WorkflowListResultPage type.
+func NewWorkflowListResultPage(getNextPage func(context.Context, WorkflowListResult) (WorkflowListResult, error)) WorkflowListResultPage {
+ return WorkflowListResultPage{fn: getNextPage}
+}
+
// WorkflowOutputParameter the workflow output parameter.
type WorkflowOutputParameter struct {
// Error - Gets the error.
@@ -3821,7 +4444,9 @@ func (wp WorkflowProperties) MarshalJSON() ([]byte, error) {
if wp.IntegrationAccount != nil {
objectMap["integrationAccount"] = wp.IntegrationAccount
}
- objectMap["definition"] = wp.Definition
+ if wp.Definition != nil {
+ objectMap["definition"] = wp.Definition
+ }
if wp.Parameters != nil {
objectMap["parameters"] = wp.Parameters
}
@@ -4013,14 +4638,24 @@ type WorkflowRunActionListResultIterator struct {
page WorkflowRunActionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowRunActionListResultIterator) Next() error {
+func (iter *WorkflowRunActionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4029,6 +4664,13 @@ func (iter *WorkflowRunActionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowRunActionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowRunActionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4048,6 +4690,11 @@ func (iter WorkflowRunActionListResultIterator) Value() WorkflowRunAction {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowRunActionListResultIterator type.
+func NewWorkflowRunActionListResultIterator(page WorkflowRunActionListResultPage) WorkflowRunActionListResultIterator {
+ return WorkflowRunActionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wralr WorkflowRunActionListResult) IsEmpty() bool {
return wralr.Value == nil || len(*wralr.Value) == 0
@@ -4055,11 +4702,11 @@ func (wralr WorkflowRunActionListResult) IsEmpty() bool {
// workflowRunActionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wralr WorkflowRunActionListResult) workflowRunActionListResultPreparer() (*http.Request, error) {
+func (wralr WorkflowRunActionListResult) workflowRunActionListResultPreparer(ctx context.Context) (*http.Request, error) {
if wralr.NextLink == nil || len(to.String(wralr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wralr.NextLink)))
@@ -4067,14 +4714,24 @@ func (wralr WorkflowRunActionListResult) workflowRunActionListResultPreparer() (
// WorkflowRunActionListResultPage contains a page of WorkflowRunAction values.
type WorkflowRunActionListResultPage struct {
- fn func(WorkflowRunActionListResult) (WorkflowRunActionListResult, error)
+ fn func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error)
wralr WorkflowRunActionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowRunActionListResultPage) Next() error {
- next, err := page.fn(page.wralr)
+func (page *WorkflowRunActionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wralr)
if err != nil {
return err
}
@@ -4082,6 +4739,13 @@ func (page *WorkflowRunActionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowRunActionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowRunActionListResultPage) NotDone() bool {
return !page.wralr.IsEmpty()
@@ -4100,6 +4764,11 @@ func (page WorkflowRunActionListResultPage) Values() []WorkflowRunAction {
return *page.wralr.Value
}
+// Creates a new instance of the WorkflowRunActionListResultPage type.
+func NewWorkflowRunActionListResultPage(getNextPage func(context.Context, WorkflowRunActionListResult) (WorkflowRunActionListResult, error)) WorkflowRunActionListResultPage {
+ return WorkflowRunActionListResultPage{fn: getNextPage}
+}
+
// WorkflowRunActionProperties the workflow run action properties.
type WorkflowRunActionProperties struct {
// StartTime - Gets the start time.
@@ -4295,14 +4964,24 @@ type WorkflowRunListResultIterator struct {
page WorkflowRunListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowRunListResultIterator) Next() error {
+func (iter *WorkflowRunListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4311,6 +4990,13 @@ func (iter *WorkflowRunListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowRunListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowRunListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4330,6 +5016,11 @@ func (iter WorkflowRunListResultIterator) Value() WorkflowRun {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowRunListResultIterator type.
+func NewWorkflowRunListResultIterator(page WorkflowRunListResultPage) WorkflowRunListResultIterator {
+ return WorkflowRunListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wrlr WorkflowRunListResult) IsEmpty() bool {
return wrlr.Value == nil || len(*wrlr.Value) == 0
@@ -4337,11 +5028,11 @@ func (wrlr WorkflowRunListResult) IsEmpty() bool {
// workflowRunListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wrlr WorkflowRunListResult) workflowRunListResultPreparer() (*http.Request, error) {
+func (wrlr WorkflowRunListResult) workflowRunListResultPreparer(ctx context.Context) (*http.Request, error) {
if wrlr.NextLink == nil || len(to.String(wrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wrlr.NextLink)))
@@ -4349,14 +5040,24 @@ func (wrlr WorkflowRunListResult) workflowRunListResultPreparer() (*http.Request
// WorkflowRunListResultPage contains a page of WorkflowRun values.
type WorkflowRunListResultPage struct {
- fn func(WorkflowRunListResult) (WorkflowRunListResult, error)
+ fn func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error)
wrlr WorkflowRunListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowRunListResultPage) Next() error {
- next, err := page.fn(page.wrlr)
+func (page *WorkflowRunListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wrlr)
if err != nil {
return err
}
@@ -4364,6 +5065,13 @@ func (page *WorkflowRunListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowRunListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowRunListResultPage) NotDone() bool {
return !page.wrlr.IsEmpty()
@@ -4382,6 +5090,11 @@ func (page WorkflowRunListResultPage) Values() []WorkflowRun {
return *page.wrlr.Value
}
+// Creates a new instance of the WorkflowRunListResultPage type.
+func NewWorkflowRunListResultPage(getNextPage func(context.Context, WorkflowRunListResult) (WorkflowRunListResult, error)) WorkflowRunListResultPage {
+ return WorkflowRunListResultPage{fn: getNextPage}
+}
+
// WorkflowRunProperties the workflow run properties.
type WorkflowRunProperties struct {
// WaitEndTime - Gets the wait end time.
@@ -4428,7 +5141,9 @@ func (wrp WorkflowRunProperties) MarshalJSON() ([]byte, error) {
if wrp.Code != nil {
objectMap["code"] = wrp.Code
}
- objectMap["error"] = wrp.Error
+ if wrp.Error != nil {
+ objectMap["error"] = wrp.Error
+ }
if wrp.CorrelationID != nil {
objectMap["correlationId"] = wrp.CorrelationID
}
@@ -4684,20 +5399,31 @@ type WorkflowTriggerHistoryListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// WorkflowTriggerHistoryListResultIterator provides access to a complete listing of WorkflowTriggerHistory values.
+// WorkflowTriggerHistoryListResultIterator provides access to a complete listing of WorkflowTriggerHistory
+// values.
type WorkflowTriggerHistoryListResultIterator struct {
i int
page WorkflowTriggerHistoryListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowTriggerHistoryListResultIterator) Next() error {
+func (iter *WorkflowTriggerHistoryListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4706,6 +5432,13 @@ func (iter *WorkflowTriggerHistoryListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowTriggerHistoryListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowTriggerHistoryListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4725,6 +5458,11 @@ func (iter WorkflowTriggerHistoryListResultIterator) Value() WorkflowTriggerHist
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowTriggerHistoryListResultIterator type.
+func NewWorkflowTriggerHistoryListResultIterator(page WorkflowTriggerHistoryListResultPage) WorkflowTriggerHistoryListResultIterator {
+ return WorkflowTriggerHistoryListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wthlr WorkflowTriggerHistoryListResult) IsEmpty() bool {
return wthlr.Value == nil || len(*wthlr.Value) == 0
@@ -4732,11 +5470,11 @@ func (wthlr WorkflowTriggerHistoryListResult) IsEmpty() bool {
// workflowTriggerHistoryListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wthlr WorkflowTriggerHistoryListResult) workflowTriggerHistoryListResultPreparer() (*http.Request, error) {
+func (wthlr WorkflowTriggerHistoryListResult) workflowTriggerHistoryListResultPreparer(ctx context.Context) (*http.Request, error) {
if wthlr.NextLink == nil || len(to.String(wthlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wthlr.NextLink)))
@@ -4744,14 +5482,24 @@ func (wthlr WorkflowTriggerHistoryListResult) workflowTriggerHistoryListResultPr
// WorkflowTriggerHistoryListResultPage contains a page of WorkflowTriggerHistory values.
type WorkflowTriggerHistoryListResultPage struct {
- fn func(WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error)
+ fn func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error)
wthlr WorkflowTriggerHistoryListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowTriggerHistoryListResultPage) Next() error {
- next, err := page.fn(page.wthlr)
+func (page *WorkflowTriggerHistoryListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoryListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wthlr)
if err != nil {
return err
}
@@ -4759,6 +5507,13 @@ func (page *WorkflowTriggerHistoryListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowTriggerHistoryListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowTriggerHistoryListResultPage) NotDone() bool {
return !page.wthlr.IsEmpty()
@@ -4777,6 +5532,11 @@ func (page WorkflowTriggerHistoryListResultPage) Values() []WorkflowTriggerHisto
return *page.wthlr.Value
}
+// Creates a new instance of the WorkflowTriggerHistoryListResultPage type.
+func NewWorkflowTriggerHistoryListResultPage(getNextPage func(context.Context, WorkflowTriggerHistoryListResult) (WorkflowTriggerHistoryListResult, error)) WorkflowTriggerHistoryListResultPage {
+ return WorkflowTriggerHistoryListResultPage{fn: getNextPage}
+}
+
// WorkflowTriggerHistoryProperties the workflow trigger history properties.
type WorkflowTriggerHistoryProperties struct {
// StartTime - Gets the start time.
@@ -4832,14 +5592,24 @@ type WorkflowTriggerListResultIterator struct {
page WorkflowTriggerListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowTriggerListResultIterator) Next() error {
+func (iter *WorkflowTriggerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4848,6 +5618,13 @@ func (iter *WorkflowTriggerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowTriggerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowTriggerListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4867,6 +5644,11 @@ func (iter WorkflowTriggerListResultIterator) Value() WorkflowTrigger {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowTriggerListResultIterator type.
+func NewWorkflowTriggerListResultIterator(page WorkflowTriggerListResultPage) WorkflowTriggerListResultIterator {
+ return WorkflowTriggerListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wtlr WorkflowTriggerListResult) IsEmpty() bool {
return wtlr.Value == nil || len(*wtlr.Value) == 0
@@ -4874,11 +5656,11 @@ func (wtlr WorkflowTriggerListResult) IsEmpty() bool {
// workflowTriggerListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wtlr WorkflowTriggerListResult) workflowTriggerListResultPreparer() (*http.Request, error) {
+func (wtlr WorkflowTriggerListResult) workflowTriggerListResultPreparer(ctx context.Context) (*http.Request, error) {
if wtlr.NextLink == nil || len(to.String(wtlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wtlr.NextLink)))
@@ -4886,14 +5668,24 @@ func (wtlr WorkflowTriggerListResult) workflowTriggerListResultPreparer() (*http
// WorkflowTriggerListResultPage contains a page of WorkflowTrigger values.
type WorkflowTriggerListResultPage struct {
- fn func(WorkflowTriggerListResult) (WorkflowTriggerListResult, error)
+ fn func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error)
wtlr WorkflowTriggerListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowTriggerListResultPage) Next() error {
- next, err := page.fn(page.wtlr)
+func (page *WorkflowTriggerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wtlr)
if err != nil {
return err
}
@@ -4901,6 +5693,13 @@ func (page *WorkflowTriggerListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowTriggerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowTriggerListResultPage) NotDone() bool {
return !page.wtlr.IsEmpty()
@@ -4919,6 +5718,11 @@ func (page WorkflowTriggerListResultPage) Values() []WorkflowTrigger {
return *page.wtlr.Value
}
+// Creates a new instance of the WorkflowTriggerListResultPage type.
+func NewWorkflowTriggerListResultPage(getNextPage func(context.Context, WorkflowTriggerListResult) (WorkflowTriggerListResult, error)) WorkflowTriggerListResultPage {
+ return WorkflowTriggerListResultPage{fn: getNextPage}
+}
+
// WorkflowTriggerProperties the workflow trigger properties.
type WorkflowTriggerProperties struct {
// ProvisioningState - Gets the provisioning state. Possible values include: 'WorkflowTriggerProvisioningStateNotSpecified', 'WorkflowTriggerProvisioningStateAccepted', 'WorkflowTriggerProvisioningStateRunning', 'WorkflowTriggerProvisioningStateReady', 'WorkflowTriggerProvisioningStateCreating', 'WorkflowTriggerProvisioningStateCreated', 'WorkflowTriggerProvisioningStateDeleting', 'WorkflowTriggerProvisioningStateDeleted', 'WorkflowTriggerProvisioningStateCanceled', 'WorkflowTriggerProvisioningStateFailed', 'WorkflowTriggerProvisioningStateSucceeded', 'WorkflowTriggerProvisioningStateMoving', 'WorkflowTriggerProvisioningStateUpdating', 'WorkflowTriggerProvisioningStateRegistering', 'WorkflowTriggerProvisioningStateRegistered', 'WorkflowTriggerProvisioningStateUnregistering', 'WorkflowTriggerProvisioningStateUnregistered', 'WorkflowTriggerProvisioningStateCompleted'
@@ -5082,14 +5886,24 @@ type WorkflowVersionListResultIterator struct {
page WorkflowVersionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkflowVersionListResultIterator) Next() error {
+func (iter *WorkflowVersionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5098,6 +5912,13 @@ func (iter *WorkflowVersionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkflowVersionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkflowVersionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5117,6 +5938,11 @@ func (iter WorkflowVersionListResultIterator) Value() WorkflowVersion {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkflowVersionListResultIterator type.
+func NewWorkflowVersionListResultIterator(page WorkflowVersionListResultPage) WorkflowVersionListResultIterator {
+ return WorkflowVersionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wvlr WorkflowVersionListResult) IsEmpty() bool {
return wvlr.Value == nil || len(*wvlr.Value) == 0
@@ -5124,11 +5950,11 @@ func (wvlr WorkflowVersionListResult) IsEmpty() bool {
// workflowVersionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wvlr WorkflowVersionListResult) workflowVersionListResultPreparer() (*http.Request, error) {
+func (wvlr WorkflowVersionListResult) workflowVersionListResultPreparer(ctx context.Context) (*http.Request, error) {
if wvlr.NextLink == nil || len(to.String(wvlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wvlr.NextLink)))
@@ -5136,14 +5962,24 @@ func (wvlr WorkflowVersionListResult) workflowVersionListResultPreparer() (*http
// WorkflowVersionListResultPage contains a page of WorkflowVersion values.
type WorkflowVersionListResultPage struct {
- fn func(WorkflowVersionListResult) (WorkflowVersionListResult, error)
+ fn func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error)
wvlr WorkflowVersionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkflowVersionListResultPage) Next() error {
- next, err := page.fn(page.wvlr)
+func (page *WorkflowVersionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wvlr)
if err != nil {
return err
}
@@ -5151,6 +5987,13 @@ func (page *WorkflowVersionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkflowVersionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkflowVersionListResultPage) NotDone() bool {
return !page.wvlr.IsEmpty()
@@ -5169,6 +6012,11 @@ func (page WorkflowVersionListResultPage) Values() []WorkflowVersion {
return *page.wvlr.Value
}
+// Creates a new instance of the WorkflowVersionListResultPage type.
+func NewWorkflowVersionListResultPage(getNextPage func(context.Context, WorkflowVersionListResult) (WorkflowVersionListResult, error)) WorkflowVersionListResultPage {
+ return WorkflowVersionListResultPage{fn: getNextPage}
+}
+
// WorkflowVersionProperties the workflow version properties.
type WorkflowVersionProperties struct {
// CreatedTime - Gets the created time.
@@ -5215,7 +6063,9 @@ func (wvp WorkflowVersionProperties) MarshalJSON() ([]byte, error) {
if wvp.IntegrationAccount != nil {
objectMap["integrationAccount"] = wvp.IntegrationAccount
}
- objectMap["definition"] = wvp.Definition
+ if wvp.Definition != nil {
+ objectMap["definition"] = wvp.Definition
+ }
if wvp.Parameters != nil {
objectMap["parameters"] = wvp.Parameters
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
index 08c28d46b3ee..bcf822e171ac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/partners.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewPartnersClientWithBaseURI(baseURI string, subscriptionID string) Partner
// partnerName - the integration account partner name.
// partner - the integration account partner.
func (client PartnersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, partner IntegrationAccountPartner) (result IntegrationAccountPartner, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.CreateOrUpdate")
+ 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: partner,
Constraints: []validation.Constraint{{Target: "partner.IntegrationAccountPartnerProperties", Name: validation.Null, Rule: true,
@@ -125,6 +136,16 @@ func (client PartnersClient) CreateOrUpdateResponder(resp *http.Response) (resul
// integrationAccountName - the integration account name.
// partnerName - the integration account partner name.
func (client PartnersClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, partnerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.PartnersClient", "Delete", nil, "Failure preparing request")
@@ -193,6 +214,16 @@ func (client PartnersClient) DeleteResponder(resp *http.Response) (result autore
// integrationAccountName - the integration account name.
// partnerName - the integration account partner name.
func (client PartnersClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string) (result IntegrationAccountPartner, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, partnerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.PartnersClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client PartnersClient) GetResponder(resp *http.Response) (result Integrati
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: PartnerType.
func (client PartnersClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountPartnerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iaplr.Response.Response != nil {
+ sc = result.iaplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top, filter)
if err != nil {
@@ -333,8 +374,8 @@ func (client PartnersClient) ListByIntegrationAccountsResponder(resp *http.Respo
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client PartnersClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountPartnerListResult) (result IntegrationAccountPartnerListResult, err error) {
- req, err := lastResults.integrationAccountPartnerListResultPreparer()
+func (client PartnersClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountPartnerListResult) (result IntegrationAccountPartnerListResult, err error) {
+ req, err := lastResults.integrationAccountPartnerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.PartnersClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -355,6 +396,16 @@ func (client PartnersClient) listByIntegrationAccountsNextResults(lastResults In
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client PartnersClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountPartnerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
@@ -365,6 +416,16 @@ func (client PartnersClient) ListByIntegrationAccountsComplete(ctx context.Conte
// integrationAccountName - the integration account name.
// partnerName - the integration account partner name.
func (client PartnersClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, partnerName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PartnersClient.ListContentCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, partnerName, listContentCallbackURL)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.PartnersClient", "ListContentCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
index 36d2fbae233a..5ac3cb31071d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/schemas.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewSchemasClientWithBaseURI(baseURI string, subscriptionID string) SchemasC
// schemaName - the integration account schema name.
// schema - the integration account schema.
func (client SchemasClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, schema IntegrationAccountSchema) (result IntegrationAccountSchema, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.CreateOrUpdate")
+ 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: schema,
Constraints: []validation.Constraint{{Target: "schema.IntegrationAccountSchemaProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -124,6 +135,16 @@ func (client SchemasClient) CreateOrUpdateResponder(resp *http.Response) (result
// integrationAccountName - the integration account name.
// schemaName - the integration account schema name.
func (client SchemasClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, schemaName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.SchemasClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client SchemasClient) DeleteResponder(resp *http.Response) (result autores
// integrationAccountName - the integration account name.
// schemaName - the integration account schema name.
func (client SchemasClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string) (result IntegrationAccountSchema, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, schemaName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.SchemasClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client SchemasClient) GetResponder(resp *http.Response) (result Integratio
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: SchemaType.
func (client SchemasClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSchemaListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iaslr.Response.Response != nil {
+ sc = result.iaslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top, filter)
if err != nil {
@@ -332,8 +373,8 @@ func (client SchemasClient) ListByIntegrationAccountsResponder(resp *http.Respon
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client SchemasClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountSchemaListResult) (result IntegrationAccountSchemaListResult, err error) {
- req, err := lastResults.integrationAccountSchemaListResultPreparer()
+func (client SchemasClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountSchemaListResult) (result IntegrationAccountSchemaListResult, err error) {
+ req, err := lastResults.integrationAccountSchemaListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.SchemasClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -354,6 +395,16 @@ func (client SchemasClient) listByIntegrationAccountsNextResults(lastResults Int
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client SchemasClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSchemaListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
@@ -364,6 +415,16 @@ func (client SchemasClient) ListByIntegrationAccountsComplete(ctx context.Contex
// integrationAccountName - the integration account name.
// schemaName - the integration account schema name.
func (client SchemasClient) ListContentCallbackURL(ctx context.Context, resourceGroupName string, integrationAccountName string, schemaName string, listContentCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemasClient.ListContentCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListContentCallbackURLPreparer(ctx, resourceGroupName, integrationAccountName, schemaName, listContentCallbackURL)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.SchemasClient", "ListContentCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/sessions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/sessions.go
index 72fe4038d4e1..9ff7433504b7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/sessions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/sessions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewSessionsClientWithBaseURI(baseURI string, subscriptionID string) Session
// sessionName - the integration account session name.
// session - the integration account session.
func (client SessionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string, session IntegrationAccountSession) (result IntegrationAccountSession, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SessionsClient.CreateOrUpdate")
+ 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: session,
Constraints: []validation.Constraint{{Target: "session.IntegrationAccountSessionProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -124,6 +135,16 @@ func (client SessionsClient) CreateOrUpdateResponder(resp *http.Response) (resul
// integrationAccountName - the integration account name.
// sessionName - the integration account session name.
func (client SessionsClient) Delete(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SessionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, integrationAccountName, sessionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.SessionsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client SessionsClient) DeleteResponder(resp *http.Response) (result autore
// integrationAccountName - the integration account name.
// sessionName - the integration account session name.
func (client SessionsClient) Get(ctx context.Context, resourceGroupName string, integrationAccountName string, sessionName string) (result IntegrationAccountSession, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SessionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, integrationAccountName, sessionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.SessionsClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client SessionsClient) GetResponder(resp *http.Response) (result Integrati
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: ChangedTime.
func (client SessionsClient) ListByIntegrationAccounts(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSessionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SessionsClient.ListByIntegrationAccounts")
+ defer func() {
+ sc := -1
+ if result.iaslr.Response.Response != nil {
+ sc = result.iaslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByIntegrationAccountsNextResults
req, err := client.ListByIntegrationAccountsPreparer(ctx, resourceGroupName, integrationAccountName, top, filter)
if err != nil {
@@ -332,8 +373,8 @@ func (client SessionsClient) ListByIntegrationAccountsResponder(resp *http.Respo
}
// listByIntegrationAccountsNextResults retrieves the next set of results, if any.
-func (client SessionsClient) listByIntegrationAccountsNextResults(lastResults IntegrationAccountSessionListResult) (result IntegrationAccountSessionListResult, err error) {
- req, err := lastResults.integrationAccountSessionListResultPreparer()
+func (client SessionsClient) listByIntegrationAccountsNextResults(ctx context.Context, lastResults IntegrationAccountSessionListResult) (result IntegrationAccountSessionListResult, err error) {
+ req, err := lastResults.integrationAccountSessionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.SessionsClient", "listByIntegrationAccountsNextResults", nil, "Failure preparing next results request")
}
@@ -354,6 +395,16 @@ func (client SessionsClient) listByIntegrationAccountsNextResults(lastResults In
// ListByIntegrationAccountsComplete enumerates all values, automatically crossing page boundaries as required.
func (client SessionsClient) ListByIntegrationAccountsComplete(ctx context.Context, resourceGroupName string, integrationAccountName string, top *int32, filter string) (result IntegrationAccountSessionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SessionsClient.ListByIntegrationAccounts")
+ 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.ListByIntegrationAccounts(ctx, resourceGroupName, integrationAccountName, top, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go
index b5269af98910..f2744f8793de 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewWorkflowRunActionRepetitionsClientWithBaseURI(baseURI string, subscripti
// actionName - the workflow action name.
// repetitionName - the workflow repetition.
func (client WorkflowRunActionRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "Get", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client WorkflowRunActionRepetitionsClient) GetResponder(resp *http.Respons
// runName - the workflow run name.
// actionName - the workflow action name.
func (client WorkflowRunActionRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "List", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client WorkflowRunActionRepetitionsClient) ListResponder(resp *http.Respon
// actionName - the workflow action name.
// repetitionName - the workflow repetition.
func (client WorkflowRunActionRepetitionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result ExpressionTraces, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsClient.ListExpressionTraces")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsClient", "ListExpressionTraces", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go
new file mode 100644
index 000000000000..6f5838edd2fb
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrepetitionsrequesthistories.go
@@ -0,0 +1,249 @@
+package logic
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// WorkflowRunActionRepetitionsRequestHistoriesClient is the REST API for Azure Logic Apps.
+type WorkflowRunActionRepetitionsRequestHistoriesClient struct {
+ BaseClient
+}
+
+// NewWorkflowRunActionRepetitionsRequestHistoriesClient creates an instance of the
+// WorkflowRunActionRepetitionsRequestHistoriesClient client.
+func NewWorkflowRunActionRepetitionsRequestHistoriesClient(subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient {
+ return NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI creates an instance of the
+// WorkflowRunActionRepetitionsRequestHistoriesClient client.
+func NewWorkflowRunActionRepetitionsRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRepetitionsRequestHistoriesClient {
+ return WorkflowRunActionRepetitionsRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a workflow run repetition request history.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// repetitionName - the workflow repetition.
+// requestHistoryName - the request history name.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (result RequestHistory, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName, requestHistoryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string, requestHistoryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "repetitionName": autorest.Encode("path", repetitionName),
+ "requestHistoryName": autorest.Encode("path", requestHistoryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories/{requestHistoryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) GetResponder(resp *http.Response) (result RequestHistory, 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 list a workflow run repetition request history.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// repetitionName - the workflow repetition.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.List")
+ defer func() {
+ sc := -1
+ if result.rhlr.Response.Response != nil {
+ sc = result.rhlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rhlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rhlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "repetitionName": autorest.Encode("path", repetitionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/repetitions/{repetitionName}/requestHistories", 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 WorkflowRunActionRepetitionsRequestHistoriesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListResponder(resp *http.Response) (result RequestHistoryListResult, 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 WorkflowRunActionRepetitionsRequestHistoriesClient) listNextResults(ctx context.Context, lastResults RequestHistoryListResult) (result RequestHistoryListResult, err error) {
+ req, err := lastResults.requestHistoryListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "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, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRepetitionsRequestHistoriesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkflowRunActionRepetitionsRequestHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result RequestHistoryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRepetitionsRequestHistoriesClient.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, resourceGroupName, workflowName, runName, actionName, repetitionName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go
new file mode 100644
index 000000000000..13d19927ffed
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionrequesthistories.go
@@ -0,0 +1,245 @@
+package logic
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// WorkflowRunActionRequestHistoriesClient is the REST API for Azure Logic Apps.
+type WorkflowRunActionRequestHistoriesClient struct {
+ BaseClient
+}
+
+// NewWorkflowRunActionRequestHistoriesClient creates an instance of the WorkflowRunActionRequestHistoriesClient
+// client.
+func NewWorkflowRunActionRequestHistoriesClient(subscriptionID string) WorkflowRunActionRequestHistoriesClient {
+ return NewWorkflowRunActionRequestHistoriesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewWorkflowRunActionRequestHistoriesClientWithBaseURI creates an instance of the
+// WorkflowRunActionRequestHistoriesClient client.
+func NewWorkflowRunActionRequestHistoriesClientWithBaseURI(baseURI string, subscriptionID string) WorkflowRunActionRequestHistoriesClient {
+ return WorkflowRunActionRequestHistoriesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets a workflow run request history.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+// requestHistoryName - the request history name.
+func (client WorkflowRunActionRequestHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (result RequestHistory, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, requestHistoryName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client WorkflowRunActionRequestHistoriesClient) GetPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, requestHistoryName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "requestHistoryName": autorest.Encode("path", requestHistoryName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories/{requestHistoryName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client WorkflowRunActionRequestHistoriesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRequestHistoriesClient) GetResponder(resp *http.Response) (result RequestHistory, 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 list a workflow run request history.
+// Parameters:
+// resourceGroupName - the resource group name.
+// workflowName - the workflow name.
+// runName - the workflow run name.
+// actionName - the workflow action name.
+func (client WorkflowRunActionRequestHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result RequestHistoryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.List")
+ defer func() {
+ sc := -1
+ if result.rhlr.Response.Response != nil {
+ sc = result.rhlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.rhlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.rhlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client WorkflowRunActionRequestHistoriesClient) ListPreparer(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "actionName": autorest.Encode("path", actionName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "runName": autorest.Encode("path", runName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "workflowName": autorest.Encode("path", workflowName),
+ }
+
+ const APIVersion = "2016-06-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.Logic/workflows/{workflowName}/runs/{runName}/actions/{actionName}/requestHistories", 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 WorkflowRunActionRequestHistoriesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client WorkflowRunActionRequestHistoriesClient) ListResponder(resp *http.Response) (result RequestHistoryListResult, 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 WorkflowRunActionRequestHistoriesClient) listNextResults(ctx context.Context, lastResults RequestHistoryListResult) (result RequestHistoryListResult, err error) {
+ req, err := lastResults.requestHistoryListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "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, "logic.WorkflowRunActionRequestHistoriesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionRequestHistoriesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client WorkflowRunActionRequestHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result RequestHistoryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionRequestHistoriesClient.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, resourceGroupName, workflowName, runName, actionName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
index b55cf9e5ea1f..08725c73101b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkflowRunActionsClientWithBaseURI(baseURI string, subscriptionID strin
// runName - the workflow run name.
// actionName - the workflow action name.
func (client WorkflowRunActionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunAction, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "Get", nil, "Failure preparing request")
@@ -118,6 +129,16 @@ func (client WorkflowRunActionsClient) GetResponder(resp *http.Response) (result
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation. Options for filters include: Status.
func (client WorkflowRunActionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.List")
+ defer func() {
+ sc := -1
+ if result.wralr.Response.Response != nil {
+ sc = result.wralr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, top, filter)
if err != nil {
@@ -189,8 +210,8 @@ func (client WorkflowRunActionsClient) ListResponder(resp *http.Response) (resul
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkflowRunActionsClient) listNextResults(lastResults WorkflowRunActionListResult) (result WorkflowRunActionListResult, err error) {
- req, err := lastResults.workflowRunActionListResultPreparer()
+func (client WorkflowRunActionsClient) listNextResults(ctx context.Context, lastResults WorkflowRunActionListResult) (result WorkflowRunActionListResult, err error) {
+ req, err := lastResults.workflowRunActionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -211,6 +232,16 @@ func (client WorkflowRunActionsClient) listNextResults(lastResults WorkflowRunAc
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowRunActionsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, runName string, top *int32, filter string) (result WorkflowRunActionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.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, resourceGroupName, workflowName, runName, top, filter)
return
}
@@ -222,6 +253,16 @@ func (client WorkflowRunActionsClient) ListComplete(ctx context.Context, resourc
// runName - the workflow run name.
// actionName - the workflow action name.
func (client WorkflowRunActionsClient) ListExpressionTraces(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result ExpressionTraces, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionsClient.ListExpressionTraces")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListExpressionTracesPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionsClient", "ListExpressionTraces", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go
index 4d76cb59d757..2815f9d0b72f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunactionscopedrepetitions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewWorkflowRunActionScopedRepetitionsClientWithBaseURI(baseURI string, subs
// actionName - the workflow action name.
// repetitionName - the workflow repetition.
func (client WorkflowRunActionScopedRepetitionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string, repetitionName string) (result WorkflowRunActionRepetitionDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopedRepetitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, actionName, repetitionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "Get", nil, "Failure preparing request")
@@ -121,6 +132,16 @@ func (client WorkflowRunActionScopedRepetitionsClient) GetResponder(resp *http.R
// runName - the workflow run name.
// actionName - the workflow action name.
func (client WorkflowRunActionScopedRepetitionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, runName string, actionName string) (result WorkflowRunActionRepetitionDefinitionCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunActionScopedRepetitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, runName, actionName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunActionScopedRepetitionsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go
index 6070849e5dec..3644fcb58409 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowrunoperations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkflowRunOperationsClientWithBaseURI(baseURI string, subscriptionID st
// runName - the workflow run name.
// operationID - the workflow operation id.
func (client WorkflowRunOperationsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string, operationID string) (result WorkflowRun, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunOperationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName, operationID)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunOperationsClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowruns.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowruns.go
index 91af4bb42b9b..6ad6d47f5ac3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowruns.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowruns.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewWorkflowRunsClientWithBaseURI(baseURI string, subscriptionID string) Wor
// workflowName - the workflow name.
// runName - the workflow run name.
func (client WorkflowRunsClient) Cancel(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Cancel")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CancelPreparer(ctx, resourceGroupName, workflowName, runName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Cancel", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client WorkflowRunsClient) CancelResponder(resp *http.Response) (result au
// workflowName - the workflow name.
// runName - the workflow run name.
func (client WorkflowRunsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, runName string) (result WorkflowRun, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, runName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "Get", nil, "Failure preparing request")
@@ -184,6 +205,16 @@ func (client WorkflowRunsClient) GetResponder(resp *http.Response) (result Workf
// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and
// ClientTrackingId.
func (client WorkflowRunsClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowRunListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.List")
+ defer func() {
+ sc := -1
+ if result.wrlr.Response.Response != nil {
+ sc = result.wrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top, filter)
if err != nil {
@@ -254,8 +285,8 @@ func (client WorkflowRunsClient) ListResponder(resp *http.Response) (result Work
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkflowRunsClient) listNextResults(lastResults WorkflowRunListResult) (result WorkflowRunListResult, err error) {
- req, err := lastResults.workflowRunListResultPreparer()
+func (client WorkflowRunsClient) listNextResults(ctx context.Context, lastResults WorkflowRunListResult) (result WorkflowRunListResult, err error) {
+ req, err := lastResults.workflowRunListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowRunsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -276,6 +307,16 @@ func (client WorkflowRunsClient) listNextResults(lastResults WorkflowRunListResu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowRunsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowRunListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowRunsClient.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, resourceGroupName, workflowName, top, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
index 12f1c2c74861..6c7b90ff14b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflows.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewWorkflowsClientWithBaseURI(baseURI string, subscriptionID string) Workfl
// workflowName - the workflow name.
// workflow - the workflow.
func (client WorkflowsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workflowName string, workflow Workflow) (result Workflow, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, workflowName, workflow)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client WorkflowsClient) CreateOrUpdateResponder(resp *http.Response) (resu
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
func (client WorkflowsClient) Delete(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, workflowName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client WorkflowsClient) DeleteResponder(resp *http.Response) (result autor
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
func (client WorkflowsClient) Disable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Disable")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DisablePreparer(ctx, resourceGroupName, workflowName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Disable", nil, "Failure preparing request")
@@ -246,6 +277,16 @@ func (client WorkflowsClient) DisableResponder(resp *http.Response) (result auto
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
func (client WorkflowsClient) Enable(ctx context.Context, resourceGroupName string, workflowName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Enable")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.EnablePreparer(ctx, resourceGroupName, workflowName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Enable", nil, "Failure preparing request")
@@ -313,6 +354,16 @@ func (client WorkflowsClient) EnableResponder(resp *http.Response) (result autor
// workflowName - the workflow name.
// parameters - parameters for generating an upgraded definition.
func (client WorkflowsClient) GenerateUpgradedDefinition(ctx context.Context, resourceGroupName string, workflowName string, parameters GenerateUpgradedDefinitionParameters) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.GenerateUpgradedDefinition")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GenerateUpgradedDefinitionPreparer(ctx, resourceGroupName, workflowName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "GenerateUpgradedDefinition", nil, "Failure preparing request")
@@ -382,6 +433,16 @@ func (client WorkflowsClient) GenerateUpgradedDefinitionResponder(resp *http.Res
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
func (client WorkflowsClient) Get(ctx context.Context, resourceGroupName string, workflowName string) (result Workflow, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Get", nil, "Failure preparing request")
@@ -451,6 +512,16 @@ func (client WorkflowsClient) GetResponder(resp *http.Response) (result Workflow
// filter - the filter to apply on the operation. Options for filters include: State, Trigger, and
// ReferencedResourceId.
func (client WorkflowsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32, filter string) (result WorkflowListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top, filter)
if err != nil {
@@ -520,8 +591,8 @@ func (client WorkflowsClient) ListByResourceGroupResponder(resp *http.Response)
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client WorkflowsClient) listByResourceGroupNextResults(lastResults WorkflowListResult) (result WorkflowListResult, err error) {
- req, err := lastResults.workflowListResultPreparer()
+func (client WorkflowsClient) listByResourceGroupNextResults(ctx context.Context, lastResults WorkflowListResult) (result WorkflowListResult, err error) {
+ req, err := lastResults.workflowListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -542,6 +613,16 @@ func (client WorkflowsClient) listByResourceGroupNextResults(lastResults Workflo
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32, filter string) (result WorkflowListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, top, filter)
return
}
@@ -552,6 +633,16 @@ func (client WorkflowsClient) ListByResourceGroupComplete(ctx context.Context, r
// filter - the filter to apply on the operation. Options for filters include: State, Trigger, and
// ReferencedResourceId.
func (client WorkflowsClient) ListBySubscription(ctx context.Context, top *int32, filter string) (result WorkflowListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.wlr.Response.Response != nil {
+ sc = result.wlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx, top, filter)
if err != nil {
@@ -620,8 +711,8 @@ func (client WorkflowsClient) ListBySubscriptionResponder(resp *http.Response) (
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client WorkflowsClient) listBySubscriptionNextResults(lastResults WorkflowListResult) (result WorkflowListResult, err error) {
- req, err := lastResults.workflowListResultPreparer()
+func (client WorkflowsClient) listBySubscriptionNextResults(ctx context.Context, lastResults WorkflowListResult) (result WorkflowListResult, err error) {
+ req, err := lastResults.workflowListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -642,6 +733,16 @@ func (client WorkflowsClient) listBySubscriptionNextResults(lastResults Workflow
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowsClient) ListBySubscriptionComplete(ctx context.Context, top *int32, filter string) (result WorkflowListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListBySubscription")
+ 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.ListBySubscription(ctx, top, filter)
return
}
@@ -652,6 +753,16 @@ func (client WorkflowsClient) ListBySubscriptionComplete(ctx context.Context, to
// workflowName - the workflow name.
// listCallbackURL - which callback url to list.
func (client WorkflowsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, listCallbackURL GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, listCallbackURL)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListCallbackURL", nil, "Failure preparing request")
@@ -721,6 +832,16 @@ func (client WorkflowsClient) ListCallbackURLResponder(resp *http.Response) (res
// resourceGroupName - the resource group name.
// workflowName - the workflow name.
func (client WorkflowsClient) ListSwagger(ctx context.Context, resourceGroupName string, workflowName string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ListSwagger")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListSwaggerPreparer(ctx, resourceGroupName, workflowName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ListSwagger", nil, "Failure preparing request")
@@ -789,6 +910,16 @@ func (client WorkflowsClient) ListSwaggerResponder(resp *http.Response) (result
// workflowName - the workflow name.
// move - the workflow to move.
func (client WorkflowsClient) Move(ctx context.Context, resourceGroupName string, workflowName string, move Workflow) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Move")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.MovePreparer(ctx, resourceGroupName, workflowName, move)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Move", nil, "Failure preparing request")
@@ -858,6 +989,16 @@ func (client WorkflowsClient) MoveResponder(resp *http.Response) (result autores
// workflowName - the workflow name.
// keyType - the access key type.
func (client WorkflowsClient) RegenerateAccessKey(ctx context.Context, resourceGroupName string, workflowName string, keyType RegenerateActionParameter) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.RegenerateAccessKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RegenerateAccessKeyPreparer(ctx, resourceGroupName, workflowName, keyType)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "RegenerateAccessKey", nil, "Failure preparing request")
@@ -927,6 +1068,16 @@ func (client WorkflowsClient) RegenerateAccessKeyResponder(resp *http.Response)
// workflowName - the workflow name.
// workflow - the workflow.
func (client WorkflowsClient) Update(ctx context.Context, resourceGroupName string, workflowName string, workflow Workflow) (result Workflow, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, workflowName, workflow)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Update", nil, "Failure preparing request")
@@ -998,6 +1149,16 @@ func (client WorkflowsClient) UpdateResponder(resp *http.Response) (result Workf
// workflowName - the workflow name.
// workflow - the workflow definition.
func (client WorkflowsClient) Validate(ctx context.Context, resourceGroupName string, location string, workflowName string, workflow Workflow) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.Validate")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ValidatePreparer(ctx, resourceGroupName, location, workflowName, workflow)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "Validate", nil, "Failure preparing request")
@@ -1068,6 +1229,16 @@ func (client WorkflowsClient) ValidateResponder(resp *http.Response) (result aut
// workflowName - the workflow name.
// validate - the workflow.
func (client WorkflowsClient) ValidateWorkflow(ctx context.Context, resourceGroupName string, workflowName string, validate Workflow) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowsClient.ValidateWorkflow")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ValidateWorkflowPreparer(ctx, resourceGroupName, workflowName, validate)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowsClient", "ValidateWorkflow", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go
index 7cb25db4dc7e..d2d165903603 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggerhistories.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewWorkflowTriggerHistoriesClientWithBaseURI(baseURI string, subscriptionID
// historyName - the workflow trigger history name. Corresponds to the run name for triggers that resulted in a
// run.
func (client WorkflowTriggerHistoriesClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result WorkflowTriggerHistory, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, triggerName, historyName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Get", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client WorkflowTriggerHistoriesClient) GetResponder(resp *http.Response) (
// filter - the filter to apply on the operation. Options for filters include: Status, StartTime, and
// ClientTrackingId.
func (client WorkflowTriggerHistoriesClient) List(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.List")
+ defer func() {
+ sc := -1
+ if result.wthlr.Response.Response != nil {
+ sc = result.wthlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, triggerName, top, filter)
if err != nil {
@@ -191,8 +212,8 @@ func (client WorkflowTriggerHistoriesClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkflowTriggerHistoriesClient) listNextResults(lastResults WorkflowTriggerHistoryListResult) (result WorkflowTriggerHistoryListResult, err error) {
- req, err := lastResults.workflowTriggerHistoryListResultPreparer()
+func (client WorkflowTriggerHistoriesClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerHistoryListResult) (result WorkflowTriggerHistoryListResult, err error) {
+ req, err := lastResults.workflowTriggerHistoryListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -213,6 +234,16 @@ func (client WorkflowTriggerHistoriesClient) listNextResults(lastResults Workflo
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowTriggerHistoriesClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, top *int32, filter string) (result WorkflowTriggerHistoryListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.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, resourceGroupName, workflowName, triggerName, top, filter)
return
}
@@ -225,6 +256,16 @@ func (client WorkflowTriggerHistoriesClient) ListComplete(ctx context.Context, r
// historyName - the workflow trigger history name. Corresponds to the run name for triggers that resulted in a
// run.
func (client WorkflowTriggerHistoriesClient) Resubmit(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, historyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggerHistoriesClient.Resubmit")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ResubmitPreparer(ctx, resourceGroupName, workflowName, triggerName, historyName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggerHistoriesClient", "Resubmit", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
index 5cbf24201b1d..fdbfd722094f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowtriggers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkflowTriggersClientWithBaseURI(baseURI string, subscriptionID string)
// workflowName - the workflow name.
// triggerName - the workflow trigger name.
func (client WorkflowTriggersClient) Get(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result WorkflowTrigger, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, triggerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Get", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client WorkflowTriggersClient) GetResponder(resp *http.Response) (result W
// workflowName - the workflow name.
// triggerName - the workflow trigger name.
func (client WorkflowTriggersClient) GetSchemaJSON(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result JSONSchema, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.GetSchemaJSON")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetSchemaJSONPreparer(ctx, resourceGroupName, workflowName, triggerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "GetSchemaJSON", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client WorkflowTriggersClient) GetSchemaJSONResponder(resp *http.Response)
// top - the number of items to be included in the result.
// filter - the filter to apply on the operation.
func (client WorkflowTriggersClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.List")
+ defer func() {
+ sc := -1
+ if result.wtlr.Response.Response != nil {
+ sc = result.wtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top, filter)
if err != nil {
@@ -255,8 +286,8 @@ func (client WorkflowTriggersClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkflowTriggersClient) listNextResults(lastResults WorkflowTriggerListResult) (result WorkflowTriggerListResult, err error) {
- req, err := lastResults.workflowTriggerListResultPreparer()
+func (client WorkflowTriggersClient) listNextResults(ctx context.Context, lastResults WorkflowTriggerListResult) (result WorkflowTriggerListResult, err error) {
+ req, err := lastResults.workflowTriggerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -277,6 +308,16 @@ func (client WorkflowTriggersClient) listNextResults(lastResults WorkflowTrigger
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowTriggersClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32, filter string) (result WorkflowTriggerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.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, resourceGroupName, workflowName, top, filter)
return
}
@@ -287,6 +328,16 @@ func (client WorkflowTriggersClient) ListComplete(ctx context.Context, resourceG
// workflowName - the workflow name.
// triggerName - the workflow trigger name.
func (client WorkflowTriggersClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.ListCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, triggerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "ListCallbackURL", nil, "Failure preparing request")
@@ -356,6 +407,16 @@ func (client WorkflowTriggersClient) ListCallbackURLResponder(resp *http.Respons
// workflowName - the workflow name.
// triggerName - the workflow trigger name.
func (client WorkflowTriggersClient) Reset(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Reset")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ResetPreparer(ctx, resourceGroupName, workflowName, triggerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Reset", nil, "Failure preparing request")
@@ -424,6 +485,16 @@ func (client WorkflowTriggersClient) ResetResponder(resp *http.Response) (result
// workflowName - the workflow name.
// triggerName - the workflow trigger name.
func (client WorkflowTriggersClient) Run(ctx context.Context, resourceGroupName string, workflowName string, triggerName string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.Run")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RunPreparer(ctx, resourceGroupName, workflowName, triggerName)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowTriggersClient", "Run", nil, "Failure preparing request")
@@ -494,6 +565,16 @@ func (client WorkflowTriggersClient) RunResponder(resp *http.Response) (result S
// triggerName - the workflow trigger name.
// setState - the workflow trigger state.
func (client WorkflowTriggersClient) SetState(ctx context.Context, resourceGroupName string, workflowName string, triggerName string, setState SetTriggerStateActionDefinition) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowTriggersClient.SetState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: setState,
Constraints: []validation.Constraint{{Target: "setState.Source", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
index ebfb7b4d8248..0222cfbb4c0d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/logic/mgmt/2016-06-01/logic/workflowversions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewWorkflowVersionsClientWithBaseURI(baseURI string, subscriptionID string)
// workflowName - the workflow name.
// versionID - the workflow versionId.
func (client WorkflowVersionsClient) Get(ctx context.Context, resourceGroupName string, workflowName string, versionID string) (result WorkflowVersion, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workflowName, versionID)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "Get", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client WorkflowVersionsClient) GetResponder(resp *http.Response) (result W
// workflowName - the workflow name.
// top - the number of items to be included in the result.
func (client WorkflowVersionsClient) List(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result WorkflowVersionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.List")
+ defer func() {
+ sc := -1
+ if result.wvlr.Response.Response != nil {
+ sc = result.wvlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, workflowName, top)
if err != nil {
@@ -181,8 +202,8 @@ func (client WorkflowVersionsClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkflowVersionsClient) listNextResults(lastResults WorkflowVersionListResult) (result WorkflowVersionListResult, err error) {
- req, err := lastResults.workflowVersionListResultPreparer()
+func (client WorkflowVersionsClient) listNextResults(ctx context.Context, lastResults WorkflowVersionListResult) (result WorkflowVersionListResult, err error) {
+ req, err := lastResults.workflowVersionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -203,6 +224,16 @@ func (client WorkflowVersionsClient) listNextResults(lastResults WorkflowVersion
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkflowVersionsClient) ListComplete(ctx context.Context, resourceGroupName string, workflowName string, top *int32) (result WorkflowVersionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.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, resourceGroupName, workflowName, top)
return
}
@@ -215,6 +246,16 @@ func (client WorkflowVersionsClient) ListComplete(ctx context.Context, resourceG
// triggerName - the workflow trigger name.
// parameters - the callback URL parameters.
func (client WorkflowVersionsClient) ListCallbackURL(ctx context.Context, resourceGroupName string, workflowName string, versionID string, triggerName string, parameters *GetCallbackURLParameters) (result WorkflowTriggerCallbackURL, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkflowVersionsClient.ListCallbackURL")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListCallbackURLPreparer(ctx, resourceGroupName, workflowName, versionID, triggerName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "logic.WorkflowVersionsClient", "ListCallbackURL", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
index aff51201d082..42a7c15e46a9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/checknameavailability.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID st
// Parameters:
// nameAvailabilityRequest - the required parameters for checking if resource name is available.
func (client CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest) (result NameAvailability, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CheckNameAvailabilityClient.Execute")
+ 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: nameAvailabilityRequest,
Constraints: []validation.Constraint{{Target: "nameAvailabilityRequest.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
index c2d669c9dc88..f5c8355a9228 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/configurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) C
// configurationName - the name of the server configuration.
// parameters - the required parameters for updating a server configuration.
func (client ConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration) (result ConfigurationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, configurationName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client ConfigurationsClient) CreateOrUpdateResponder(resp *http.Response)
// serverName - the name of the server.
// configurationName - the name of the server configuration.
func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (result Configuration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, configurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -194,6 +211,16 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result Con
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ConfigurationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ConfigurationsClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
index d659483733bc..6075158b00c9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/databases.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) Databa
// databaseName - the name of the database.
// parameters - the required parameters for creating or updating a database.
func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future Da
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.DatabasesClient", "Delete", nil, "Failure preparing request")
@@ -171,10 +188,6 @@ func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -198,6 +211,16 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.DatabasesClient", "Get", nil, "Failure preparing request")
@@ -267,6 +290,16 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.DatabasesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
index 528aeaa2f005..28d97a0f5e05 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the server firewall rule.
// parameters - the required parameters for creating or updating a firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: true,
@@ -109,10 +120,6 @@ func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -137,6 +144,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -183,10 +200,6 @@ func (client FirewallRulesClient) DeleteSender(req *http.Request) (future Firewa
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -210,6 +223,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -279,6 +302,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.FirewallRulesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
index 16c645ad8ba4..c6c54ce49974 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/locationbasedperformancetier.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscripti
// Parameters:
// locationName - the name of the location.
func (client LocationBasedPerformanceTierClient) List(ctx context.Context, locationName string) (result PerformanceTierListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedPerformanceTierClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, locationName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.LocationBasedPerformanceTierClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
index ef252ba46bc1..1b3ea5647963 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/logfiles.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFile
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogFileListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogFilesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.LogFilesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
index 2fa5f0dae836..a07ed19436b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/models.go
@@ -18,14 +18,19 @@ package mysql
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql"
+
// CreateMode enumerates the values for create mode.
type CreateMode string
@@ -284,8 +289,8 @@ type ConfigurationProperties struct {
Source *string `json:"source,omitempty"`
}
-// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ConfigurationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -439,7 +444,8 @@ func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d D
return
}
-// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DatabasesDeleteFuture struct {
azure.Future
}
@@ -558,8 +564,8 @@ type FirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type FirewallRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -587,7 +593,8 @@ func (future *FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClie
return
}
-// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type FirewallRulesDeleteFuture struct {
azure.Future
}
@@ -1069,7 +1076,7 @@ type ServerProperties struct {
StorageProfile *StorageProfile `json:"storageProfile,omitempty"`
// ReplicationRole - The replication role of the server.
ReplicationRole *string `json:"replicationRole,omitempty"`
- // MasterServerID - The master server id of a relica server.
+ // MasterServerID - The master server id of a replica server.
MasterServerID *string `json:"masterServerId,omitempty"`
// ReplicaCapacity - The maximum number of replicas that a master server can have.
ReplicaCapacity *int32 `json:"replicaCapacity,omitempty"`
@@ -1265,8 +1272,8 @@ func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate()
return &spfdc, true
}
-// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different region from
-// a geo replicated backup.
+// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different
+// region from a geo replicated backup.
type ServerPropertiesForGeoRestore struct {
// SourceServerID - The source server id to restore from.
SourceServerID *string `json:"sourceServerId,omitempty"`
@@ -1469,7 +1476,8 @@ func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (Basic
return &spfr, true
}
-// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersCreateFuture struct {
azure.Future
}
@@ -1497,7 +1505,8 @@ func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersDeleteFuture struct {
azure.Future
}
@@ -1519,8 +1528,8 @@ func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Res
return
}
-// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1630,7 +1639,8 @@ func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
return nil
}
-// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersUpdateFuture struct {
azure.Future
}
@@ -1658,7 +1668,7 @@ func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServerUpdateParameters parameters allowd to update for a server.
+// ServerUpdateParameters parameters allowed to update for a server.
type ServerUpdateParameters struct {
// Sku - The SKU (pricing tier) of the server.
Sku *Sku `json:"sku,omitempty"`
@@ -1895,14 +1905,24 @@ type VirtualNetworkRuleListResultIterator struct {
page VirtualNetworkRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1911,6 +1931,13 @@ func (iter *VirtualNetworkRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1930,6 +1957,11 @@ func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkRuleListResultIterator type.
+func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator {
+ return VirtualNetworkRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
return vnrlr.Value == nil || len(*vnrlr.Value) == 0
@@ -1937,11 +1969,11 @@ func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnrlr.NextLink)))
@@ -1949,14 +1981,24 @@ func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer()
// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
type VirtualNetworkRuleListResultPage struct {
- fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
vnrlr VirtualNetworkRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkRuleListResultPage) Next() error {
- next, err := page.fn(page.vnrlr)
+func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnrlr)
if err != nil {
return err
}
@@ -1964,6 +2006,13 @@ func (page *VirtualNetworkRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkRuleListResultPage) NotDone() bool {
return !page.vnrlr.IsEmpty()
@@ -1982,6 +2031,11 @@ func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
return *page.vnrlr.Value
}
+// Creates a new instance of the VirtualNetworkRuleListResultPage type.
+func NewVirtualNetworkRuleListResultPage(getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage {
+ return VirtualNetworkRuleListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkRuleProperties properties of a virtual network rule.
type VirtualNetworkRuleProperties struct {
// VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
@@ -2021,8 +2075,8 @@ func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetw
return
}
-// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkRulesDeleteFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
index 6c36b558e70c..bb2d16b61929 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/replicas.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/replicas.go
index 53d674416b88..b708a28dd5d0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/replicas.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/replicas.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewReplicasClientWithBaseURI(baseURI string, subscriptionID string) Replica
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ReplicasClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReplicasClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ReplicasClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
index 66b2f6678ffa..fa51290fe446 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/servers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC
// serverName - the name of the server.
// parameters - the required parameters for creating or updating a server.
func (client ServersClient) Create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (result ServersCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
@@ -107,10 +118,6 @@ func (client ServersClient) CreateSender(req *http.Request) (future ServersCreat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -134,6 +141,16 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server,
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServersClient", "Delete", nil, "Failure preparing request")
@@ -179,10 +196,6 @@ func (client ServersClient) DeleteSender(req *http.Request) (future ServersDelet
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -205,6 +218,16 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServersClient", "Get", nil, "Failure preparing request")
@@ -269,6 +292,16 @@ func (client ServersClient) GetResponder(resp *http.Response) (result Server, er
// List list all the servers in a given subscription.
func (client ServersClient) List(ctx context.Context) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServersClient", "List", nil, "Failure preparing request")
@@ -334,6 +367,16 @@ func (client ServersClient) ListResponder(resp *http.Response) (result ServerLis
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServersClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -403,6 +446,16 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r
// serverName - the name of the server.
// parameters - the required parameters for updating a server.
func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (result ServersUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServersClient", "Update", nil, "Failure preparing request")
@@ -450,10 +503,6 @@ func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go
index 8b9e8ab82e60..716b5ec4aa73 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/serversecurityalertpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptio
// serverName - the name of the server.
// parameters - the server security alert policy.
func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -96,10 +107,6 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.R
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -123,6 +130,16 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *ht
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go
index 99b70e42de66..79bcc6e8729f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/mysql/mgmt/2017-12-01/mysql/virtualnetworkrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID stri
// virtualNetworkRuleName - the name of the virtual network rule.
// parameters - the requested virtual Network Rule Resource state.
func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false,
@@ -105,10 +116,6 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -133,6 +140,16 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Respo
// serverName - the name of the server.
// virtualNetworkRuleName - the name of the virtual network rule.
func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
@@ -179,10 +196,6 @@ func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -206,6 +219,16 @@ func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (re
// serverName - the name of the server.
// virtualNetworkRuleName - the name of the virtual network rule.
func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request")
@@ -275,6 +298,16 @@ func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (resul
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.vnrlr.Response.Response != nil {
+ sc = result.vnrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByServerNextResults
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
@@ -339,8 +372,8 @@ func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Respons
}
// listByServerNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkRulesClient) listByServerNextResults(lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
- req, err := lastResults.virtualNetworkRuleListResultPreparer()
+func (client VirtualNetworkRulesClient) listByServerNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
+ req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "mysql.VirtualNetworkRulesClient", "listByServerNextResults", nil, "Failure preparing next results request")
}
@@ -361,6 +394,16 @@ func (client VirtualNetworkRulesClient) listByServerNextResults(lastResults Virt
// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ 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.ListByServer(ctx, resourceGroupName, serverName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go
index b12b1f57b73d..c09a0364e9af 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationgateways.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewApplicationGatewaysClientWithBaseURI(baseURI string, subscriptionID stri
// applicationGatewayName - the name of the application gateway.
// expand - expands BackendAddressPool and BackendHttpSettings referenced in backend health.
func (client ApplicationGatewaysClient) BackendHealth(ctx context.Context, resourceGroupName string, applicationGatewayName string, expand string) (result ApplicationGatewaysBackendHealthFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.BackendHealth")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.BackendHealthPreparer(ctx, resourceGroupName, applicationGatewayName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "BackendHealth", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client ApplicationGatewaysClient) BackendHealthResponder(resp *http.Respon
// applicationGatewayName - the name of the application gateway.
// parameters - parameters supplied to the create or update application gateway operation.
func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters ApplicationGateway) (result ApplicationGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat", Name: validation.Null, Rule: false,
@@ -128,6 +149,14 @@ func (client ApplicationGatewaysClient) CreateOrUpdate(ctx context.Context, reso
Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil},
{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySize", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil},
}},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMaximum, Rule: int64(128), Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.MaxRequestBodySizeInKb", Name: validation.InclusiveMinimum, Rule: 8, Chain: nil},
+ }},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMaximum, Rule: int64(500), Chain: nil},
+ {Target: "parameters.ApplicationGatewayPropertiesFormat.WebApplicationFirewallConfiguration.FileUploadLimitInMb", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
+ }},
}},
{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.ApplicationGatewayPropertiesFormat.AutoscaleConfiguration.MinCapacity", Name: validation.Null, Rule: true,
@@ -206,6 +235,16 @@ func (client ApplicationGatewaysClient) CreateOrUpdateResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// applicationGatewayName - the name of the application gateway.
func (client ApplicationGatewaysClient) Delete(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, applicationGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Delete", nil, "Failure preparing request")
@@ -272,6 +311,16 @@ func (client ApplicationGatewaysClient) DeleteResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// applicationGatewayName - the name of the application gateway.
func (client ApplicationGatewaysClient) Get(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, applicationGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Get", nil, "Failure preparing request")
@@ -338,6 +387,16 @@ func (client ApplicationGatewaysClient) GetResponder(resp *http.Response) (resul
// Parameters:
// predefinedPolicyName - name of Ssl predefined policy.
func (client ApplicationGatewaysClient) GetSslPredefinedPolicy(ctx context.Context, predefinedPolicyName string) (result ApplicationGatewaySslPredefinedPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.GetSslPredefinedPolicy")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetSslPredefinedPolicyPreparer(ctx, predefinedPolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "GetSslPredefinedPolicy", nil, "Failure preparing request")
@@ -403,6 +462,16 @@ func (client ApplicationGatewaysClient) GetSslPredefinedPolicyResponder(resp *ht
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ApplicationGatewaysClient) List(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.List")
+ defer func() {
+ sc := -1
+ if result.aglr.Response.Response != nil {
+ sc = result.aglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -466,8 +535,8 @@ func (client ApplicationGatewaysClient) ListResponder(resp *http.Response) (resu
}
// listNextResults retrieves the next set of results, if any.
-func (client ApplicationGatewaysClient) listNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
- req, err := lastResults.applicationGatewayListResultPreparer()
+func (client ApplicationGatewaysClient) listNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
+ req, err := lastResults.applicationGatewayListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -488,12 +557,32 @@ func (client ApplicationGatewaysClient) listNextResults(lastResults ApplicationG
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationGatewayListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.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, resourceGroupName)
return
}
// ListAll gets all the application gateways in a subscription.
func (client ApplicationGatewaysClient) ListAll(ctx context.Context) (result ApplicationGatewayListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.aglr.Response.Response != nil {
+ sc = result.aglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -556,8 +645,8 @@ func (client ApplicationGatewaysClient) ListAllResponder(resp *http.Response) (r
}
// listAllNextResults retrieves the next set of results, if any.
-func (client ApplicationGatewaysClient) listAllNextResults(lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
- req, err := lastResults.applicationGatewayListResultPreparer()
+func (client ApplicationGatewaysClient) listAllNextResults(ctx context.Context, lastResults ApplicationGatewayListResult) (result ApplicationGatewayListResult, err error) {
+ req, err := lastResults.applicationGatewayListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -578,12 +667,32 @@ func (client ApplicationGatewaysClient) listAllNextResults(lastResults Applicati
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationGatewaysClient) ListAllComplete(ctx context.Context) (result ApplicationGatewayListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAll")
+ 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.ListAll(ctx)
return
}
// ListAvailableSslOptions lists available Ssl options for configuring Ssl policy.
func (client ApplicationGatewaysClient) ListAvailableSslOptions(ctx context.Context) (result ApplicationGatewayAvailableSslOptions, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslOptions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAvailableSslOptionsPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableSslOptions", nil, "Failure preparing request")
@@ -646,6 +755,16 @@ func (client ApplicationGatewaysClient) ListAvailableSslOptionsResponder(resp *h
// ListAvailableSslPredefinedPolicies lists all SSL predefined policies for configuring Ssl policy.
func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPolicies(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies")
+ defer func() {
+ sc := -1
+ if result.agaspp.Response.Response != nil {
+ sc = result.agaspp.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAvailableSslPredefinedPoliciesNextResults
req, err := client.ListAvailableSslPredefinedPoliciesPreparer(ctx)
if err != nil {
@@ -708,8 +827,8 @@ func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesRespon
}
// listAvailableSslPredefinedPoliciesNextResults retrieves the next set of results, if any.
-func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextResults(lastResults ApplicationGatewayAvailableSslPredefinedPolicies) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) {
- req, err := lastResults.applicationGatewayAvailableSslPredefinedPoliciesPreparer()
+func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextResults(ctx context.Context, lastResults ApplicationGatewayAvailableSslPredefinedPolicies) (result ApplicationGatewayAvailableSslPredefinedPolicies, err error) {
+ req, err := lastResults.applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "listAvailableSslPredefinedPoliciesNextResults", nil, "Failure preparing next results request")
}
@@ -730,12 +849,32 @@ func (client ApplicationGatewaysClient) listAvailableSslPredefinedPoliciesNextRe
// ListAvailableSslPredefinedPoliciesComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationGatewaysClient) ListAvailableSslPredefinedPoliciesComplete(ctx context.Context) (result ApplicationGatewayAvailableSslPredefinedPoliciesIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableSslPredefinedPolicies")
+ 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.ListAvailableSslPredefinedPolicies(ctx)
return
}
// ListAvailableWafRuleSets lists all available web application firewall rule sets.
func (client ApplicationGatewaysClient) ListAvailableWafRuleSets(ctx context.Context) (result ApplicationGatewayAvailableWafRuleSetsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.ListAvailableWafRuleSets")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAvailableWafRuleSetsPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "ListAvailableWafRuleSets", nil, "Failure preparing request")
@@ -801,6 +940,16 @@ func (client ApplicationGatewaysClient) ListAvailableWafRuleSetsResponder(resp *
// resourceGroupName - the name of the resource group.
// applicationGatewayName - the name of the application gateway.
func (client ApplicationGatewaysClient) Start(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, applicationGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Start", nil, "Failure preparing request")
@@ -867,6 +1016,16 @@ func (client ApplicationGatewaysClient) StartResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group.
// applicationGatewayName - the name of the application gateway.
func (client ApplicationGatewaysClient) Stop(ctx context.Context, resourceGroupName string, applicationGatewayName string) (result ApplicationGatewaysStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.Stop")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StopPreparer(ctx, resourceGroupName, applicationGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "Stop", nil, "Failure preparing request")
@@ -934,6 +1093,16 @@ func (client ApplicationGatewaysClient) StopResponder(resp *http.Response) (resu
// applicationGatewayName - the name of the application gateway.
// parameters - parameters supplied to update application gateway tags.
func (client ApplicationGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, applicationGatewayName string, parameters TagsObject) (result ApplicationGatewaysUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewaysClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, applicationGatewayName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationGatewaysClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go
index 67f4b27510d5..53cd49dd8d50 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/applicationsecuritygroups.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewApplicationSecurityGroupsClientWithBaseURI(baseURI string, subscriptionI
// applicationSecurityGroupName - the name of the application security group.
// parameters - parameters supplied to the create or update ApplicationSecurityGroup operation.
func (client ApplicationSecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string, parameters ApplicationSecurityGroup) (result ApplicationSecurityGroupsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, applicationSecurityGroupName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client ApplicationSecurityGroupsClient) CreateOrUpdateResponder(resp *http
// resourceGroupName - the name of the resource group.
// applicationSecurityGroupName - the name of the application security group.
func (client ApplicationSecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroupsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, applicationSecurityGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client ApplicationSecurityGroupsClient) DeleteResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// applicationSecurityGroupName - the name of the application security group.
func (client ApplicationSecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, applicationSecurityGroupName string) (result ApplicationSecurityGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, applicationSecurityGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "Get", nil, "Failure preparing request")
@@ -246,6 +277,16 @@ func (client ApplicationSecurityGroupsClient) GetResponder(resp *http.Response)
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ApplicationSecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.asglr.Response.Response != nil {
+ sc = result.asglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -309,8 +350,8 @@ func (client ApplicationSecurityGroupsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client ApplicationSecurityGroupsClient) listNextResults(lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) {
- req, err := lastResults.applicationSecurityGroupListResultPreparer()
+func (client ApplicationSecurityGroupsClient) listNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) {
+ req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -331,12 +372,32 @@ func (client ApplicationSecurityGroupsClient) listNextResults(lastResults Applic
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationSecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ApplicationSecurityGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.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, resourceGroupName)
return
}
// ListAll gets all application security groups in a subscription.
func (client ApplicationSecurityGroupsClient) ListAll(ctx context.Context) (result ApplicationSecurityGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.asglr.Response.Response != nil {
+ sc = result.asglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -399,8 +460,8 @@ func (client ApplicationSecurityGroupsClient) ListAllResponder(resp *http.Respon
}
// listAllNextResults retrieves the next set of results, if any.
-func (client ApplicationSecurityGroupsClient) listAllNextResults(lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) {
- req, err := lastResults.applicationSecurityGroupListResultPreparer()
+func (client ApplicationSecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults ApplicationSecurityGroupListResult) (result ApplicationSecurityGroupListResult, err error) {
+ req, err := lastResults.applicationSecurityGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ApplicationSecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client ApplicationSecurityGroupsClient) listAllNextResults(lastResults App
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client ApplicationSecurityGroupsClient) ListAllComplete(ctx context.Context) (result ApplicationSecurityGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupsClient.ListAll")
+ 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.ListAll(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go
index eab4fc41e702..d7a23e25449f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availabledelegations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewAvailableDelegationsClientWithBaseURI(baseURI string, subscriptionID str
// Parameters:
// location - the location of the subnet.
func (client AvailableDelegationsClient) List(ctx context.Context, location string) (result AvailableDelegationsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.List")
+ defer func() {
+ sc := -1
+ if result.adr.Response.Response != nil {
+ sc = result.adr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, location)
if err != nil {
@@ -106,8 +117,8 @@ func (client AvailableDelegationsClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client AvailableDelegationsClient) listNextResults(lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
- req, err := lastResults.availableDelegationsResultPreparer()
+func (client AvailableDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
+ req, err := lastResults.availableDelegationsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AvailableDelegationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -128,6 +139,16 @@ func (client AvailableDelegationsClient) listNextResults(lastResults AvailableDe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AvailableDelegationsClient) ListComplete(ctx context.Context, location string) (result AvailableDelegationsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go
index a07e71c432d2..d0febeb237b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableendpointservices.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewAvailableEndpointServicesClientWithBaseURI(baseURI string, subscriptionI
// Parameters:
// location - the location to check available endpoint services.
func (client AvailableEndpointServicesClient) List(ctx context.Context, location string) (result EndpointServicesListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.List")
+ defer func() {
+ sc := -1
+ if result.eslr.Response.Response != nil {
+ sc = result.eslr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, location)
if err != nil {
@@ -106,8 +117,8 @@ func (client AvailableEndpointServicesClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client AvailableEndpointServicesClient) listNextResults(lastResults EndpointServicesListResult) (result EndpointServicesListResult, err error) {
- req, err := lastResults.endpointServicesListResultPreparer()
+func (client AvailableEndpointServicesClient) listNextResults(ctx context.Context, lastResults EndpointServicesListResult) (result EndpointServicesListResult, err error) {
+ req, err := lastResults.endpointServicesListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AvailableEndpointServicesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -128,6 +139,16 @@ func (client AvailableEndpointServicesClient) listNextResults(lastResults Endpoi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AvailableEndpointServicesClient) ListComplete(ctx context.Context, location string) (result EndpointServicesListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableEndpointServicesClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go
index 6fcd07d49068..4eb2ce595ca9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/availableresourcegroupdelegations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAvailableResourceGroupDelegationsClientWithBaseURI(baseURI string, subsc
// location - the location of the domain name.
// resourceGroupName - the name of the resource group.
func (client AvailableResourceGroupDelegationsClient) List(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.List")
+ defer func() {
+ sc := -1
+ if result.adr.Response.Response != nil {
+ sc = result.adr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, location, resourceGroupName)
if err != nil {
@@ -110,8 +121,8 @@ func (client AvailableResourceGroupDelegationsClient) ListResponder(resp *http.R
}
// listNextResults retrieves the next set of results, if any.
-func (client AvailableResourceGroupDelegationsClient) listNextResults(lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
- req, err := lastResults.availableDelegationsResultPreparer()
+func (client AvailableResourceGroupDelegationsClient) listNextResults(ctx context.Context, lastResults AvailableDelegationsResult) (result AvailableDelegationsResult, err error) {
+ req, err := lastResults.availableDelegationsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AvailableResourceGroupDelegationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -132,6 +143,16 @@ func (client AvailableResourceGroupDelegationsClient) listNextResults(lastResult
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AvailableResourceGroupDelegationsClient) ListComplete(ctx context.Context, location string, resourceGroupName string) (result AvailableDelegationsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableResourceGroupDelegationsClient.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, location, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go
index 62778fff230b..1f359207ce0c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewallfqdntags.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewAzureFirewallFqdnTagsClientWithBaseURI(baseURI string, subscriptionID st
// ListAll gets all the Azure Firewall FQDN Tags in a subscription.
func (client AzureFirewallFqdnTagsClient) ListAll(ctx context.Context) (result AzureFirewallFqdnTagListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.afftlr.Response.Response != nil {
+ sc = result.afftlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -103,8 +114,8 @@ func (client AzureFirewallFqdnTagsClient) ListAllResponder(resp *http.Response)
}
// listAllNextResults retrieves the next set of results, if any.
-func (client AzureFirewallFqdnTagsClient) listAllNextResults(lastResults AzureFirewallFqdnTagListResult) (result AzureFirewallFqdnTagListResult, err error) {
- req, err := lastResults.azureFirewallFqdnTagListResultPreparer()
+func (client AzureFirewallFqdnTagsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallFqdnTagListResult) (result AzureFirewallFqdnTagListResult, err error) {
+ req, err := lastResults.azureFirewallFqdnTagListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AzureFirewallFqdnTagsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -125,6 +136,16 @@ func (client AzureFirewallFqdnTagsClient) listAllNextResults(lastResults AzureFi
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client AzureFirewallFqdnTagsClient) ListAllComplete(ctx context.Context) (result AzureFirewallFqdnTagListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagsClient.ListAll")
+ 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.ListAll(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go
index 93ff2267fc45..7430268d237a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/azurefirewalls.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAzureFirewallsClientWithBaseURI(baseURI string, subscriptionID string) A
// azureFirewallName - the name of the Azure Firewall.
// parameters - parameters supplied to the create or update Azure Firewall operation.
func (client AzureFirewallsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, azureFirewallName string, parameters AzureFirewall) (result AzureFirewallsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, azureFirewallName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client AzureFirewallsClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// azureFirewallName - the name of the Azure Firewall.
func (client AzureFirewallsClient) Delete(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewallsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, azureFirewallName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client AzureFirewallsClient) DeleteResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// azureFirewallName - the name of the Azure Firewall.
func (client AzureFirewallsClient) Get(ctx context.Context, resourceGroupName string, azureFirewallName string) (result AzureFirewall, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, azureFirewallName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "Get", nil, "Failure preparing request")
@@ -246,6 +277,16 @@ func (client AzureFirewallsClient) GetResponder(resp *http.Response) (result Azu
// Parameters:
// resourceGroupName - the name of the resource group.
func (client AzureFirewallsClient) List(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.List")
+ defer func() {
+ sc := -1
+ if result.aflr.Response.Response != nil {
+ sc = result.aflr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -309,8 +350,8 @@ func (client AzureFirewallsClient) ListResponder(resp *http.Response) (result Az
}
// listNextResults retrieves the next set of results, if any.
-func (client AzureFirewallsClient) listNextResults(lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
- req, err := lastResults.azureFirewallListResultPreparer()
+func (client AzureFirewallsClient) listNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
+ req, err := lastResults.azureFirewallListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -331,12 +372,32 @@ func (client AzureFirewallsClient) listNextResults(lastResults AzureFirewallList
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AzureFirewallsClient) ListComplete(ctx context.Context, resourceGroupName string) (result AzureFirewallListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.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, resourceGroupName)
return
}
// ListAll gets all the Azure Firewalls in a subscription.
func (client AzureFirewallsClient) ListAll(ctx context.Context) (result AzureFirewallListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.aflr.Response.Response != nil {
+ sc = result.aflr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -399,8 +460,8 @@ func (client AzureFirewallsClient) ListAllResponder(resp *http.Response) (result
}
// listAllNextResults retrieves the next set of results, if any.
-func (client AzureFirewallsClient) listAllNextResults(lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
- req, err := lastResults.azureFirewallListResultPreparer()
+func (client AzureFirewallsClient) listAllNextResults(ctx context.Context, lastResults AzureFirewallListResult) (result AzureFirewallListResult, err error) {
+ req, err := lastResults.azureFirewallListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.AzureFirewallsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client AzureFirewallsClient) listAllNextResults(lastResults AzureFirewallL
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client AzureFirewallsClient) ListAllComplete(ctx context.Context) (result AzureFirewallListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallsClient.ListAll")
+ 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.ListAll(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go
index 434544cdd339..795993d3a17f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/bgpservicecommunities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewBgpServiceCommunitiesClientWithBaseURI(baseURI string, subscriptionID st
// List gets all the available bgp service communities.
func (client BgpServiceCommunitiesClient) List(ctx context.Context) (result BgpServiceCommunityListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.List")
+ defer func() {
+ sc := -1
+ if result.bsclr.Response.Response != nil {
+ sc = result.bsclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -103,8 +114,8 @@ func (client BgpServiceCommunitiesClient) ListResponder(resp *http.Response) (re
}
// listNextResults retrieves the next set of results, if any.
-func (client BgpServiceCommunitiesClient) listNextResults(lastResults BgpServiceCommunityListResult) (result BgpServiceCommunityListResult, err error) {
- req, err := lastResults.bgpServiceCommunityListResultPreparer()
+func (client BgpServiceCommunitiesClient) listNextResults(ctx context.Context, lastResults BgpServiceCommunityListResult) (result BgpServiceCommunityListResult, err error) {
+ req, err := lastResults.bgpServiceCommunityListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.BgpServiceCommunitiesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -125,6 +136,16 @@ func (client BgpServiceCommunitiesClient) listNextResults(lastResults BgpService
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client BgpServiceCommunitiesClient) ListComplete(ctx context.Context) (result BgpServiceCommunityListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunitiesClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go
index 57a105db6fba..118e80d933e2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/client.go
@@ -24,6 +24,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -59,6 +60,16 @@ func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient {
// domainNameLabel - the domain name to be verified. It must conform to the following regular expression:
// ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.
func (client BaseClient) CheckDNSNameAvailability(ctx context.Context, location string, domainNameLabel string) (result DNSNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckDNSNameAvailability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CheckDNSNameAvailabilityPreparer(ctx, location, domainNameLabel)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BaseClient", "CheckDNSNameAvailability", nil, "Failure preparing request")
@@ -126,6 +137,16 @@ func (client BaseClient) CheckDNSNameAvailabilityResponder(resp *http.Response)
// resourceGroupName - the resource group name.
// virtualWANName - the name of the VirtualWAN for which supported security providers are needed.
func (client BaseClient) SupportedSecurityProviders(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWanSecurityProviders, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.SupportedSecurityProviders")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SupportedSecurityProvidersPreparer(ctx, resourceGroupName, virtualWANName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.BaseClient", "SupportedSecurityProviders", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go
index b64b3c1c0347..b20ab6858e21 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/connectionmonitors.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewConnectionMonitorsClientWithBaseURI(baseURI string, subscriptionID strin
// connectionMonitorName - the name of the connection monitor.
// parameters - parameters that define the operation to create a connection monitor.
func (client ConnectionMonitorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string, parameters ConnectionMonitor) (result ConnectionMonitorsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ConnectionMonitorParameters", Name: validation.Null, Rule: true,
@@ -128,6 +139,16 @@ func (client ConnectionMonitorsClient) CreateOrUpdateResponder(resp *http.Respon
// networkWatcherName - the name of the Network Watcher resource.
// connectionMonitorName - the name of the connection monitor.
func (client ConnectionMonitorsClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Delete", nil, "Failure preparing request")
@@ -196,6 +217,16 @@ func (client ConnectionMonitorsClient) DeleteResponder(resp *http.Response) (res
// networkWatcherName - the name of the Network Watcher resource.
// connectionMonitorName - the name of the connection monitor.
func (client ConnectionMonitorsClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Get", nil, "Failure preparing request")
@@ -264,6 +295,16 @@ func (client ConnectionMonitorsClient) GetResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group containing Network Watcher.
// networkWatcherName - the name of the Network Watcher resource.
func (client ConnectionMonitorsClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result ConnectionMonitorListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "List", nil, "Failure preparing request")
@@ -332,6 +373,16 @@ func (client ConnectionMonitorsClient) ListResponder(resp *http.Response) (resul
// networkWatcherName - the name of the Network Watcher resource.
// connectionMonitorName - the name given to the connection monitor.
func (client ConnectionMonitorsClient) Query(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsQueryFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Query")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.QueryPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Query", nil, "Failure preparing request")
@@ -401,6 +452,16 @@ func (client ConnectionMonitorsClient) QueryResponder(resp *http.Response) (resu
// networkWatcherName - the name of the Network Watcher resource.
// connectionMonitorName - the name of the connection monitor.
func (client ConnectionMonitorsClient) Start(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStartFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Start")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Start", nil, "Failure preparing request")
@@ -469,6 +530,16 @@ func (client ConnectionMonitorsClient) StartResponder(resp *http.Response) (resu
// networkWatcherName - the name of the Network Watcher resource.
// connectionMonitorName - the name of the connection monitor.
func (client ConnectionMonitorsClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, connectionMonitorName string) (result ConnectionMonitorsStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConnectionMonitorsClient.Stop")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, connectionMonitorName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ConnectionMonitorsClient", "Stop", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go
index ffbbffbc003c..c4d2d7128923 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/ddosprotectionplans.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewDdosProtectionPlansClientWithBaseURI(baseURI string, subscriptionID stri
// ddosProtectionPlanName - the name of the DDoS protection plan.
// parameters - parameters supplied to the create or update operation.
func (client DdosProtectionPlansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string, parameters DdosProtectionPlan) (result DdosProtectionPlansCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, ddosProtectionPlanName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client DdosProtectionPlansClient) CreateOrUpdateResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// ddosProtectionPlanName - the name of the DDoS protection plan.
func (client DdosProtectionPlansClient) Delete(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlansDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, ddosProtectionPlanName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client DdosProtectionPlansClient) DeleteResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// ddosProtectionPlanName - the name of the DDoS protection plan.
func (client DdosProtectionPlansClient) Get(ctx context.Context, resourceGroupName string, ddosProtectionPlanName string) (result DdosProtectionPlan, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, ddosProtectionPlanName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "Get", nil, "Failure preparing request")
@@ -244,6 +275,16 @@ func (client DdosProtectionPlansClient) GetResponder(resp *http.Response) (resul
// List gets all DDoS protection plans in a subscription.
func (client DdosProtectionPlansClient) List(ctx context.Context) (result DdosProtectionPlanListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.List")
+ defer func() {
+ sc := -1
+ if result.dpplr.Response.Response != nil {
+ sc = result.dpplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -306,8 +347,8 @@ func (client DdosProtectionPlansClient) ListResponder(resp *http.Response) (resu
}
// listNextResults retrieves the next set of results, if any.
-func (client DdosProtectionPlansClient) listNextResults(lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
- req, err := lastResults.ddosProtectionPlanListResultPreparer()
+func (client DdosProtectionPlansClient) listNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
+ req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -328,6 +369,16 @@ func (client DdosProtectionPlansClient) listNextResults(lastResults DdosProtecti
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (result DdosProtectionPlanListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.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
}
@@ -336,6 +387,16 @@ func (client DdosProtectionPlansClient) ListComplete(ctx context.Context) (resul
// Parameters:
// resourceGroupName - the name of the resource group.
func (client DdosProtectionPlansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.dpplr.Response.Response != nil {
+ sc = result.dpplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -399,8 +460,8 @@ func (client DdosProtectionPlansClient) ListByResourceGroupResponder(resp *http.
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client DdosProtectionPlansClient) listByResourceGroupNextResults(lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
- req, err := lastResults.ddosProtectionPlanListResultPreparer()
+func (client DdosProtectionPlansClient) listByResourceGroupNextResults(ctx context.Context, lastResults DdosProtectionPlanListResult) (result DdosProtectionPlanListResult, err error) {
+ req, err := lastResults.ddosProtectionPlanListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.DdosProtectionPlansClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client DdosProtectionPlansClient) listByResourceGroupNextResults(lastResul
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client DdosProtectionPlansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result DdosProtectionPlanListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlansClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go
index f4904a545af3..340275ba0001 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/defaultsecurityrules.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewDefaultSecurityRulesClientWithBaseURI(baseURI string, subscriptionID str
// networkSecurityGroupName - the name of the network security group.
// defaultSecurityRuleName - the name of the default security rule.
func (client DefaultSecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, defaultSecurityRuleName string) (result SecurityRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, defaultSecurityRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "Get", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client DefaultSecurityRulesClient) GetResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// networkSecurityGroupName - the name of the network security group.
func (client DefaultSecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.srlr.Response.Response != nil {
+ sc = result.srlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName)
if err != nil {
@@ -177,8 +198,8 @@ func (client DefaultSecurityRulesClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client DefaultSecurityRulesClient) listNextResults(lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) {
- req, err := lastResults.securityRuleListResultPreparer()
+func (client DefaultSecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) {
+ req, err := lastResults.securityRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.DefaultSecurityRulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -199,6 +220,16 @@ func (client DefaultSecurityRulesClient) listNextResults(lastResults SecurityRul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DefaultSecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DefaultSecurityRulesClient.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, resourceGroupName, networkSecurityGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go
index d53da63e0b36..4b2d84dff046 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitauthorizations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewExpressRouteCircuitAuthorizationsClientWithBaseURI(baseURI string, subsc
// authorizationParameters - parameters supplied to the create or update express route circuit authorization
// operation.
func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string, authorizationParameters ExpressRouteCircuitAuthorization) (result ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, authorizationName, authorizationParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) CreateOrUpdateResponder(re
// circuitName - the name of the express route circuit.
// authorizationName - the name of the authorization.
func (client ExpressRouteCircuitAuthorizationsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorizationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, authorizationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Delete", nil, "Failure preparing request")
@@ -188,6 +209,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) DeleteResponder(resp *http
// circuitName - the name of the express route circuit.
// authorizationName - the name of the authorization.
func (client ExpressRouteCircuitAuthorizationsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, authorizationName string) (result ExpressRouteCircuitAuthorization, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, authorizationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "Get", nil, "Failure preparing request")
@@ -256,6 +287,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) GetResponder(resp *http.Re
// resourceGroupName - the name of the resource group.
// circuitName - the name of the circuit.
func (client ExpressRouteCircuitAuthorizationsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.List")
+ defer func() {
+ sc := -1
+ if result.alr.Response.Response != nil {
+ sc = result.alr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, circuitName)
if err != nil {
@@ -320,8 +361,8 @@ func (client ExpressRouteCircuitAuthorizationsClient) ListResponder(resp *http.R
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(lastResults AuthorizationListResult) (result AuthorizationListResult, err error) {
- req, err := lastResults.authorizationListResultPreparer()
+func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(ctx context.Context, lastResults AuthorizationListResult) (result AuthorizationListResult, err error) {
+ req, err := lastResults.authorizationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitAuthorizationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -342,6 +383,16 @@ func (client ExpressRouteCircuitAuthorizationsClient) listNextResults(lastResult
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCircuitAuthorizationsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result AuthorizationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitAuthorizationsClient.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, resourceGroupName, circuitName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go
index 8fe3fcc32eed..379aab976f8b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitconnections.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,8 +48,18 @@ func NewExpressRouteCircuitConnectionsClientWithBaseURI(baseURI string, subscrip
// peeringName - the name of the peering.
// connectionName - the name of the express route circuit connection.
// expressRouteCircuitConnectionParameters - parameters supplied to the create or update express route circuit
-// circuit connection operation.
+// connection operation.
func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string, expressRouteCircuitConnectionParameters ExpressRouteCircuitConnection) (result ExpressRouteCircuitConnectionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -122,6 +133,16 @@ func (client ExpressRouteCircuitConnectionsClient) CreateOrUpdateResponder(resp
// peeringName - the name of the peering.
// connectionName - the name of the express route circuit connection.
func (client ExpressRouteCircuitConnectionsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client ExpressRouteCircuitConnectionsClient) DeleteResponder(resp *http.Re
// peeringName - the name of the peering.
// connectionName - the name of the express route circuit connection.
func (client ExpressRouteCircuitConnectionsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, connectionName string) (result ExpressRouteCircuitConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitConnectionsClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go
index 0b5975c261f2..d0475b1afd51 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuitpeerings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewExpressRouteCircuitPeeringsClientWithBaseURI(baseURI string, subscriptio
// peeringName - the name of the peering.
// peeringParameters - parameters supplied to the create or update express route circuit peering operation.
func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, peeringParameters ExpressRouteCircuitPeering) (result ExpressRouteCircuitPeeringsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: peeringParameters,
Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCircuitPeeringPropertiesFormat", Name: validation.Null, Rule: false,
@@ -129,6 +140,16 @@ func (client ExpressRouteCircuitPeeringsClient) CreateOrUpdateResponder(resp *ht
// circuitName - the name of the express route circuit.
// peeringName - the name of the peering.
func (client ExpressRouteCircuitPeeringsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeeringsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName, peeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Delete", nil, "Failure preparing request")
@@ -197,6 +218,16 @@ func (client ExpressRouteCircuitPeeringsClient) DeleteResponder(resp *http.Respo
// circuitName - the name of the express route circuit.
// peeringName - the name of the peering.
func (client ExpressRouteCircuitPeeringsClient) Get(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitPeering, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, circuitName, peeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "Get", nil, "Failure preparing request")
@@ -265,6 +296,16 @@ func (client ExpressRouteCircuitPeeringsClient) GetResponder(resp *http.Response
// resourceGroupName - the name of the resource group.
// circuitName - the name of the express route circuit.
func (client ExpressRouteCircuitPeeringsClient) List(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.List")
+ defer func() {
+ sc := -1
+ if result.ercplr.Response.Response != nil {
+ sc = result.ercplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, circuitName)
if err != nil {
@@ -329,8 +370,8 @@ func (client ExpressRouteCircuitPeeringsClient) ListResponder(resp *http.Respons
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCircuitPeeringsClient) listNextResults(lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) {
- req, err := lastResults.expressRouteCircuitPeeringListResultPreparer()
+func (client ExpressRouteCircuitPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitPeeringListResult) (result ExpressRouteCircuitPeeringListResult, err error) {
+ req, err := lastResults.expressRouteCircuitPeeringListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitPeeringsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -351,6 +392,16 @@ func (client ExpressRouteCircuitPeeringsClient) listNextResults(lastResults Expr
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCircuitPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitPeeringListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringsClient.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, resourceGroupName, circuitName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go
index e5e90a7c1ad4..26fe33037165 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecircuits.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewExpressRouteCircuitsClientWithBaseURI(baseURI string, subscriptionID str
// circuitName - the name of the circuit.
// parameters - parameters supplied to the create or update express route circuit operation.
func (client ExpressRouteCircuitsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, circuitName string, parameters ExpressRouteCircuit) (result ExpressRouteCircuitsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, circuitName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client ExpressRouteCircuitsClient) CreateOrUpdateResponder(resp *http.Resp
// resourceGroupName - the name of the resource group.
// circuitName - the name of the express route circuit.
func (client ExpressRouteCircuitsClient) Delete(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, circuitName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client ExpressRouteCircuitsClient) DeleteResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// circuitName - the name of express route circuit.
func (client ExpressRouteCircuitsClient) Get(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuit, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, circuitName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "Get", nil, "Failure preparing request")
@@ -248,6 +279,16 @@ func (client ExpressRouteCircuitsClient) GetResponder(resp *http.Response) (resu
// circuitName - the name of the express route circuit.
// peeringName - the name of the peering.
func (client ExpressRouteCircuitsClient) GetPeeringStats(ctx context.Context, resourceGroupName string, circuitName string, peeringName string) (result ExpressRouteCircuitStats, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetPeeringStats")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPeeringStatsPreparer(ctx, resourceGroupName, circuitName, peeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetPeeringStats", nil, "Failure preparing request")
@@ -316,6 +357,16 @@ func (client ExpressRouteCircuitsClient) GetPeeringStatsResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// circuitName - the name of the express route circuit.
func (client ExpressRouteCircuitsClient) GetStats(ctx context.Context, resourceGroupName string, circuitName string) (result ExpressRouteCircuitStats, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.GetStats")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetStatsPreparer(ctx, resourceGroupName, circuitName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "GetStats", nil, "Failure preparing request")
@@ -382,6 +433,16 @@ func (client ExpressRouteCircuitsClient) GetStatsResponder(resp *http.Response)
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ExpressRouteCircuitsClient) List(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.List")
+ defer func() {
+ sc := -1
+ if result.erclr.Response.Response != nil {
+ sc = result.erclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -445,8 +506,8 @@ func (client ExpressRouteCircuitsClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCircuitsClient) listNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
- req, err := lastResults.expressRouteCircuitListResultPreparer()
+func (client ExpressRouteCircuitsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
+ req, err := lastResults.expressRouteCircuitListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -467,12 +528,32 @@ func (client ExpressRouteCircuitsClient) listNextResults(lastResults ExpressRout
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCircuitsClient) ListComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCircuitListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.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, resourceGroupName)
return
}
// ListAll gets all the express route circuits in a subscription.
func (client ExpressRouteCircuitsClient) ListAll(ctx context.Context) (result ExpressRouteCircuitListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.erclr.Response.Response != nil {
+ sc = result.erclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -535,8 +616,8 @@ func (client ExpressRouteCircuitsClient) ListAllResponder(resp *http.Response) (
}
// listAllNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCircuitsClient) listAllNextResults(lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
- req, err := lastResults.expressRouteCircuitListResultPreparer()
+func (client ExpressRouteCircuitsClient) listAllNextResults(ctx context.Context, lastResults ExpressRouteCircuitListResult) (result ExpressRouteCircuitListResult, err error) {
+ req, err := lastResults.expressRouteCircuitListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -557,6 +638,16 @@ func (client ExpressRouteCircuitsClient) listAllNextResults(lastResults ExpressR
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (result ExpressRouteCircuitListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -568,6 +659,16 @@ func (client ExpressRouteCircuitsClient) ListAllComplete(ctx context.Context) (r
// peeringName - the name of the peering.
// devicePath - the path of the device.
func (client ExpressRouteCircuitsClient) ListArpTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListArpTableFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListArpTable")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListArpTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListArpTable", nil, "Failure preparing request")
@@ -640,6 +741,16 @@ func (client ExpressRouteCircuitsClient) ListArpTableResponder(resp *http.Respon
// peeringName - the name of the peering.
// devicePath - the path of the device.
func (client ExpressRouteCircuitsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTable")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTable", nil, "Failure preparing request")
@@ -712,6 +823,16 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableResponder(resp *http.Res
// peeringName - the name of the peering.
// devicePath - the path of the device.
func (client ExpressRouteCircuitsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, circuitName string, peeringName string, devicePath string) (result ExpressRouteCircuitsListRoutesTableSummaryFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.ListRoutesTableSummary")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, circuitName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "ListRoutesTableSummary", nil, "Failure preparing request")
@@ -782,6 +903,16 @@ func (client ExpressRouteCircuitsClient) ListRoutesTableSummaryResponder(resp *h
// circuitName - the name of the circuit.
// parameters - parameters supplied to update express route circuit tags.
func (client ExpressRouteCircuitsClient) UpdateTags(ctx context.Context, resourceGroupName string, circuitName string, parameters TagsObject) (result ExpressRouteCircuitsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, circuitName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCircuitsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go
index 05a6d7c5ebc2..bcb01b6e981d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteconnections.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewExpressRouteConnectionsClientWithBaseURI(baseURI string, subscriptionID
// connectionName - the name of the connection subresource.
// putExpressRouteConnectionParameters - parameters required in an ExpressRouteConnection PUT operation.
func (client ExpressRouteConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string, putExpressRouteConnectionParameters ExpressRouteConnection) (result ExpressRouteConnectionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: putExpressRouteConnectionParameters,
Constraints: []validation.Constraint{{Target: "putExpressRouteConnectionParameters.ExpressRouteConnectionProperties", Name: validation.Null, Rule: false,
@@ -126,6 +137,16 @@ func (client ExpressRouteConnectionsClient) CreateOrUpdateResponder(resp *http.R
// expressRouteGatewayName - the name of the ExpressRoute gateway.
// connectionName - the name of the connection subresource.
func (client ExpressRouteConnectionsClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Delete", nil, "Failure preparing request")
@@ -194,6 +215,16 @@ func (client ExpressRouteConnectionsClient) DeleteResponder(resp *http.Response)
// expressRouteGatewayName - the name of the ExpressRoute gateway.
// connectionName - the name of the ExpressRoute connection.
func (client ExpressRouteConnectionsClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, connectionName string) (result ExpressRouteConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, expressRouteGatewayName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "Get", nil, "Failure preparing request")
@@ -262,6 +293,16 @@ func (client ExpressRouteConnectionsClient) GetResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// expressRouteGatewayName - the name of the ExpressRoute gateway.
func (client ExpressRouteConnectionsClient) List(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteConnectionList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, expressRouteGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteConnectionsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go
index 2d49d06f7fac..6fe3f842b0e6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnectionpeerings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewExpressRouteCrossConnectionPeeringsClientWithBaseURI(baseURI string, sub
// peeringParameters - parameters supplied to the create or update ExpressRouteCrossConnection peering
// operation.
func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, peeringParameters ExpressRouteCrossConnectionPeering) (result ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: peeringParameters,
Constraints: []validation.Constraint{{Target: "peeringParameters.ExpressRouteCrossConnectionPeeringProperties", Name: validation.Null, Rule: false,
@@ -132,6 +143,16 @@ func (client ExpressRouteCrossConnectionPeeringsClient) CreateOrUpdateResponder(
// crossConnectionName - the name of the ExpressRouteCrossConnection.
// peeringName - the name of the peering.
func (client ExpressRouteCrossConnectionPeeringsClient) Delete(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeeringsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, crossConnectionName, peeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Delete", nil, "Failure preparing request")
@@ -200,6 +221,16 @@ func (client ExpressRouteCrossConnectionPeeringsClient) DeleteResponder(resp *ht
// crossConnectionName - the name of the ExpressRouteCrossConnection.
// peeringName - the name of the peering.
func (client ExpressRouteCrossConnectionPeeringsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string) (result ExpressRouteCrossConnectionPeering, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, crossConnectionName, peeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "Get", nil, "Failure preparing request")
@@ -268,6 +299,16 @@ func (client ExpressRouteCrossConnectionPeeringsClient) GetResponder(resp *http.
// resourceGroupName - the name of the resource group.
// crossConnectionName - the name of the ExpressRouteCrossConnection.
func (client ExpressRouteCrossConnectionPeeringsClient) List(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.List")
+ defer func() {
+ sc := -1
+ if result.erccpl.Response.Response != nil {
+ sc = result.erccpl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, crossConnectionName)
if err != nil {
@@ -332,8 +373,8 @@ func (client ExpressRouteCrossConnectionPeeringsClient) ListResponder(resp *http
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCrossConnectionPeeringsClient) listNextResults(lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) {
- req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer()
+func (client ExpressRouteCrossConnectionPeeringsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionPeeringList) (result ExpressRouteCrossConnectionPeeringList, err error) {
+ req, err := lastResults.expressRouteCrossConnectionPeeringListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionPeeringsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -354,6 +395,16 @@ func (client ExpressRouteCrossConnectionPeeringsClient) listNextResults(lastResu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCrossConnectionPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnectionPeeringListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringsClient.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, resourceGroupName, crossConnectionName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go
index 2c8068f6710b..ffa74d592255 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutecrossconnections.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewExpressRouteCrossConnectionsClientWithBaseURI(baseURI string, subscripti
// crossConnectionName - the name of the ExpressRouteCrossConnection.
// parameters - parameters supplied to the update express route crossConnection operation.
func (client ExpressRouteCrossConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, crossConnectionName string, parameters ExpressRouteCrossConnection) (result ExpressRouteCrossConnectionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, crossConnectionName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client ExpressRouteCrossConnectionsClient) CreateOrUpdateResponder(resp *h
// resourceGroupName - the name of the resource group (peering location of the circuit).
// crossConnectionName - the name of the ExpressRouteCrossConnection (service key of the circuit).
func (client ExpressRouteCrossConnectionsClient) Get(ctx context.Context, resourceGroupName string, crossConnectionName string) (result ExpressRouteCrossConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, crossConnectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "Get", nil, "Failure preparing request")
@@ -179,6 +200,16 @@ func (client ExpressRouteCrossConnectionsClient) GetResponder(resp *http.Respons
// List retrieves all the ExpressRouteCrossConnections in a subscription.
func (client ExpressRouteCrossConnectionsClient) List(ctx context.Context) (result ExpressRouteCrossConnectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.ercclr.Response.Response != nil {
+ sc = result.ercclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -241,8 +272,8 @@ func (client ExpressRouteCrossConnectionsClient) ListResponder(resp *http.Respon
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCrossConnectionsClient) listNextResults(lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
- req, err := lastResults.expressRouteCrossConnectionListResultPreparer()
+func (client ExpressRouteCrossConnectionsClient) listNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
+ req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -263,6 +294,16 @@ func (client ExpressRouteCrossConnectionsClient) listNextResults(lastResults Exp
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Context) (result ExpressRouteCrossConnectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.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
}
@@ -275,6 +316,16 @@ func (client ExpressRouteCrossConnectionsClient) ListComplete(ctx context.Contex
// peeringName - the name of the peering.
// devicePath - the path of the device
func (client ExpressRouteCrossConnectionsClient) ListArpTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListArpTableFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListArpTable")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListArpTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListArpTable", nil, "Failure preparing request")
@@ -343,6 +394,16 @@ func (client ExpressRouteCrossConnectionsClient) ListArpTableResponder(resp *htt
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ExpressRouteCrossConnectionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ercclr.Response.Response != nil {
+ sc = result.ercclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -406,8 +467,8 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupResponder(re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
- req, err := lastResults.expressRouteCrossConnectionListResultPreparer()
+func (client ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRouteCrossConnectionListResult) (result ExpressRouteCrossConnectionListResult, err error) {
+ req, err := lastResults.expressRouteCrossConnectionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -428,6 +489,16 @@ func (client ExpressRouteCrossConnectionsClient) listByResourceGroupNextResults(
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRouteCrossConnectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -440,6 +511,16 @@ func (client ExpressRouteCrossConnectionsClient) ListByResourceGroupComplete(ctx
// peeringName - the name of the peering.
// devicePath - the path of the device.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTable(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTable")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRoutesTablePreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTable", nil, "Failure preparing request")
@@ -512,6 +593,16 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableResponder(resp *
// peeringName - the name of the peering.
// devicePath - the path of the device.
func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummary(ctx context.Context, resourceGroupName string, crossConnectionName string, peeringName string, devicePath string) (result ExpressRouteCrossConnectionsListRoutesTableSummaryFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.ListRoutesTableSummary")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListRoutesTableSummaryPreparer(ctx, resourceGroupName, crossConnectionName, peeringName, devicePath)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "ListRoutesTableSummary", nil, "Failure preparing request")
@@ -582,6 +673,16 @@ func (client ExpressRouteCrossConnectionsClient) ListRoutesTableSummaryResponder
// crossConnectionName - the name of the cross connection.
// crossConnectionParameters - parameters supplied to update express route cross connection tags.
func (client ExpressRouteCrossConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, crossConnectionName string, crossConnectionParameters TagsObject) (result ExpressRouteCrossConnectionsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, crossConnectionName, crossConnectionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteCrossConnectionsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go
index f233d24bfc2f..f5492fb52cd8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutegateways.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewExpressRouteGatewaysClientWithBaseURI(baseURI string, subscriptionID str
// expressRouteGatewayName - the name of the ExpressRoute gateway.
// putExpressRouteGatewayParameters - parameters required in an ExpressRoute gateway PUT operation.
func (client ExpressRouteGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRouteGatewayName string, putExpressRouteGatewayParameters ExpressRouteGateway) (result ExpressRouteGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: putExpressRouteGatewayParameters,
Constraints: []validation.Constraint{{Target: "putExpressRouteGatewayParameters.ExpressRouteGatewayProperties", Name: validation.Null, Rule: false,
@@ -123,6 +134,16 @@ func (client ExpressRouteGatewaysClient) CreateOrUpdateResponder(resp *http.Resp
// resourceGroupName - the name of the resource group.
// expressRouteGatewayName - the name of the ExpressRoute gateway.
func (client ExpressRouteGatewaysClient) Delete(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, expressRouteGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Delete", nil, "Failure preparing request")
@@ -189,6 +210,16 @@ func (client ExpressRouteGatewaysClient) DeleteResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// expressRouteGatewayName - the name of the ExpressRoute gateway.
func (client ExpressRouteGatewaysClient) Get(ctx context.Context, resourceGroupName string, expressRouteGatewayName string) (result ExpressRouteGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, expressRouteGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "Get", nil, "Failure preparing request")
@@ -255,6 +286,16 @@ func (client ExpressRouteGatewaysClient) GetResponder(resp *http.Response) (resu
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ExpressRouteGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRouteGatewayList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -318,6 +359,16 @@ func (client ExpressRouteGatewaysClient) ListByResourceGroupResponder(resp *http
// ListBySubscription lists ExpressRoute gateways under a given subscription.
func (client ExpressRouteGatewaysClient) ListBySubscription(ctx context.Context) (result ExpressRouteGatewayList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteGatewaysClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ExpressRouteGatewaysClient", "ListBySubscription", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go
new file mode 100644
index 000000000000..df653c765a8d
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressroutelinks.go
@@ -0,0 +1,235 @@
+package network
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ExpressRouteLinksClient is the network Client
+type ExpressRouteLinksClient struct {
+ BaseClient
+}
+
+// NewExpressRouteLinksClient creates an instance of the ExpressRouteLinksClient client.
+func NewExpressRouteLinksClient(subscriptionID string) ExpressRouteLinksClient {
+ return NewExpressRouteLinksClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRouteLinksClientWithBaseURI creates an instance of the ExpressRouteLinksClient client.
+func NewExpressRouteLinksClientWithBaseURI(baseURI string, subscriptionID string) ExpressRouteLinksClient {
+ return ExpressRouteLinksClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get retrieves the specified ExpressRouteLink resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of the ExpressRoutePort resource.
+// linkName - the name of the ExpressRouteLink resource.
+func (client ExpressRouteLinksClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (result ExpressRouteLink, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, expressRoutePortName, linkName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRouteLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, linkName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "linkName": autorest.Encode("path", linkName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRouteLinksClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteLinksClient) GetResponder(resp *http.Response) (result ExpressRouteLink, 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 retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of the ExpressRoutePort resource.
+func (client ExpressRouteLinksClient) List(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.List")
+ defer func() {
+ sc := -1
+ if result.erllr.Response.Response != nil {
+ sc = result.erllr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, expressRoutePortName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.erllr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.erllr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRouteLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links", 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 ExpressRouteLinksClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRouteLinksClient) ListResponder(resp *http.Response) (result ExpressRouteLinkListResult, 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 ExpressRouteLinksClient) listNextResults(ctx context.Context, lastResults ExpressRouteLinkListResult) (result ExpressRouteLinkListResult, err error) {
+ req, err := lastResults.expressRouteLinkListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "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, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRouteLinksClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRouteLinksClient) ListComplete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRouteLinkListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinksClient.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, resourceGroupName, expressRoutePortName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go
new file mode 100644
index 000000000000..675340534d34
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteports.go
@@ -0,0 +1,577 @@
+package network
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ExpressRoutePortsClient is the network Client
+type ExpressRoutePortsClient struct {
+ BaseClient
+}
+
+// NewExpressRoutePortsClient creates an instance of the ExpressRoutePortsClient client.
+func NewExpressRoutePortsClient(subscriptionID string) ExpressRoutePortsClient {
+ return NewExpressRoutePortsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRoutePortsClientWithBaseURI creates an instance of the ExpressRoutePortsClient client.
+func NewExpressRoutePortsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsClient {
+ return ExpressRoutePortsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates the specified ExpressRoutePort resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of the ExpressRoutePort resource.
+// parameters - parameters supplied to the create ExpressRoutePort operation.
+func (client ExpressRoutePortsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (result ExpressRoutePortsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, expressRoutePortName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client ExpressRoutePortsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters ExpressRoutePort) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsClient) CreateOrUpdateSender(req *http.Request) (future ExpressRoutePortsCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) CreateOrUpdateResponder(resp *http.Response) (result ExpressRoutePort, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the specified ExpressRoutePort resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of the ExpressRoutePort resource.
+func (client ExpressRoutePortsClient) Delete(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePortsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, expressRoutePortName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client ExpressRoutePortsClient) DeletePreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-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.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsClient) DeleteSender(req *http.Request) (future ExpressRoutePortsDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get retrieves the requested ExpressRoutePort resource.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of ExpressRoutePort.
+func (client ExpressRoutePortsClient) Get(ctx context.Context, resourceGroupName string, expressRoutePortName string) (result ExpressRoutePort, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, expressRoutePortName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRoutePortsClient) GetPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) GetResponder(resp *http.Response) (result ExpressRoutePort, 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 list all the ExpressRoutePort resources in the specified subscription
+func (client ExpressRoutePortsClient) List(ctx context.Context) (result ExpressRoutePortListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.List")
+ defer func() {
+ sc := -1
+ if result.erplr.Response.Response != nil {
+ sc = result.erplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.erplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.erplr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRoutePortsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts", 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 ExpressRoutePortsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) ListResponder(resp *http.Response) (result ExpressRoutePortListResult, 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 ExpressRoutePortsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) {
+ req, err := lastResults.expressRoutePortListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "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, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRoutePortsClient) ListComplete(ctx context.Context) (result ExpressRoutePortListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.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
+}
+
+// ListByResourceGroup list all the ExpressRoutePort resources in the specified resource group.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+func (client ExpressRoutePortsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.erplr.Response.Response != nil {
+ sc = result.erplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByResourceGroupNextResults
+ req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.erplr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure sending request")
+ return
+ }
+
+ result.erplr, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "ListByResourceGroup", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByResourceGroupPreparer prepares the ListByResourceGroup request.
+func (client ExpressRoutePortsClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) ListByResourceGroupResponder(resp *http.Response) (result ExpressRoutePortListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByResourceGroupNextResults retrieves the next set of results, if any.
+func (client ExpressRoutePortsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ExpressRoutePortListResult) (result ExpressRoutePortListResult, err error) {
+ req, err := lastResults.expressRoutePortListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByResourceGroupSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByResourceGroupResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRoutePortsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ExpressRoutePortListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
+ return
+}
+
+// UpdateTags update ExpressRoutePort tags
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// expressRoutePortName - the name of the ExpressRoutePort resource.
+// parameters - parameters supplied to update ExpressRoutePort resource tags.
+func (client ExpressRoutePortsClient) UpdateTags(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (result ExpressRoutePortsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, expressRoutePortName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.UpdateTagsSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsClient", "UpdateTags", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// UpdateTagsPreparer prepares the UpdateTags request.
+func (client ExpressRoutePortsClient) UpdateTagsPreparer(ctx context.Context, resourceGroupName string, expressRoutePortName string, parameters TagsObject) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "expressRoutePortName": autorest.Encode("path", expressRoutePortName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateTagsSender sends the UpdateTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsClient) UpdateTagsSender(req *http.Request) (future ExpressRoutePortsUpdateTagsFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// UpdateTagsResponder handles the response to the UpdateTags request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsClient) UpdateTagsResponder(resp *http.Response) (result ExpressRoutePort, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go
new file mode 100644
index 000000000000..92966baf7343
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteportslocations.go
@@ -0,0 +1,228 @@
+package network
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ExpressRoutePortsLocationsClient is the network Client
+type ExpressRoutePortsLocationsClient struct {
+ BaseClient
+}
+
+// NewExpressRoutePortsLocationsClient creates an instance of the ExpressRoutePortsLocationsClient client.
+func NewExpressRoutePortsLocationsClient(subscriptionID string) ExpressRoutePortsLocationsClient {
+ return NewExpressRoutePortsLocationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewExpressRoutePortsLocationsClientWithBaseURI creates an instance of the ExpressRoutePortsLocationsClient client.
+func NewExpressRoutePortsLocationsClientWithBaseURI(baseURI string, subscriptionID string) ExpressRoutePortsLocationsClient {
+ return ExpressRoutePortsLocationsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get retrieves a single ExpressRoutePort peering location, including the list of available bandwidths available at
+// said peering location.
+// Parameters:
+// locationName - name of the requested ExpressRoutePort peering location.
+func (client ExpressRoutePortsLocationsClient) Get(ctx context.Context, locationName string) (result ExpressRoutePortsLocation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, locationName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client ExpressRoutePortsLocationsClient) GetPreparer(ctx context.Context, locationName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "locationName": autorest.Encode("path", locationName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client ExpressRoutePortsLocationsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsLocationsClient) GetResponder(resp *http.Response) (result ExpressRoutePortsLocation, 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 retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each location.
+// Available bandwidths can only be obtained when retriving a specific peering location.
+func (client ExpressRoutePortsLocationsClient) List(ctx context.Context) (result ExpressRoutePortsLocationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.List")
+ defer func() {
+ sc := -1
+ if result.erpllr.Response.Response != nil {
+ sc = result.erpllr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.erpllr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.erpllr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client ExpressRoutePortsLocationsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations", 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 ExpressRoutePortsLocationsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client ExpressRoutePortsLocationsClient) ListResponder(resp *http.Response) (result ExpressRoutePortsLocationListResult, 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 ExpressRoutePortsLocationsClient) listNextResults(ctx context.Context, lastResults ExpressRoutePortsLocationListResult) (result ExpressRoutePortsLocationListResult, err error) {
+ req, err := lastResults.expressRoutePortsLocationListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "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, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsLocationsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ExpressRoutePortsLocationsClient) ListComplete(ctx context.Context) (result ExpressRoutePortsLocationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationsClient.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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go
index fa2e248b4e9c..a4b8d156eca0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/expressrouteserviceproviders.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewExpressRouteServiceProvidersClientWithBaseURI(baseURI string, subscripti
// List gets all the available express route service providers.
func (client ExpressRouteServiceProvidersClient) List(ctx context.Context) (result ExpressRouteServiceProviderListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.List")
+ defer func() {
+ sc := -1
+ if result.ersplr.Response.Response != nil {
+ sc = result.ersplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -104,8 +115,8 @@ func (client ExpressRouteServiceProvidersClient) ListResponder(resp *http.Respon
}
// listNextResults retrieves the next set of results, if any.
-func (client ExpressRouteServiceProvidersClient) listNextResults(lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) {
- req, err := lastResults.expressRouteServiceProviderListResultPreparer()
+func (client ExpressRouteServiceProvidersClient) listNextResults(ctx context.Context, lastResults ExpressRouteServiceProviderListResult) (result ExpressRouteServiceProviderListResult, err error) {
+ req, err := lastResults.expressRouteServiceProviderListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ExpressRouteServiceProvidersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -126,6 +137,16 @@ func (client ExpressRouteServiceProvidersClient) listNextResults(lastResults Exp
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExpressRouteServiceProvidersClient) ListComplete(ctx context.Context) (result ExpressRouteServiceProviderListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProvidersClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go
index b6ffddd6fbbc..e9fc40413a9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/hubvirtualnetworkconnections.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewHubVirtualNetworkConnectionsClientWithBaseURI(baseURI string, subscripti
// virtualHubName - the name of the VirtualHub.
// connectionName - the name of the vpn connection.
func (client HubVirtualNetworkConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string, connectionName string) (result HubVirtualNetworkConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "Get", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client HubVirtualNetworkConnectionsClient) GetResponder(resp *http.Respons
// resourceGroupName - the resource group name of the VirtualHub.
// virtualHubName - the name of the VirtualHub.
func (client HubVirtualNetworkConnectionsClient) List(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.lhvncr.Response.Response != nil {
+ sc = result.lhvncr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, virtualHubName)
if err != nil {
@@ -178,8 +199,8 @@ func (client HubVirtualNetworkConnectionsClient) ListResponder(resp *http.Respon
}
// listNextResults retrieves the next set of results, if any.
-func (client HubVirtualNetworkConnectionsClient) listNextResults(lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) {
- req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer()
+func (client HubVirtualNetworkConnectionsClient) listNextResults(ctx context.Context, lastResults ListHubVirtualNetworkConnectionsResult) (result ListHubVirtualNetworkConnectionsResult, err error) {
+ req, err := lastResults.listHubVirtualNetworkConnectionsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.HubVirtualNetworkConnectionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -200,6 +221,16 @@ func (client HubVirtualNetworkConnectionsClient) listNextResults(lastResults Lis
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client HubVirtualNetworkConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualHubName string) (result ListHubVirtualNetworkConnectionsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/HubVirtualNetworkConnectionsClient.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, resourceGroupName, virtualHubName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go
index 797f7bb70802..31a8870509dc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/inboundnatrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewInboundNatRulesClientWithBaseURI(baseURI string, subscriptionID string)
// inboundNatRuleName - the name of the inbound nat rule.
// inboundNatRuleParameters - parameters supplied to the create or update inbound nat rule operation.
func (client InboundNatRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, inboundNatRuleParameters InboundNatRule) (result InboundNatRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: inboundNatRuleParameters,
Constraints: []validation.Constraint{{Target: "inboundNatRuleParameters.InboundNatRulePropertiesFormat", Name: validation.Null, Rule: false,
@@ -137,6 +148,16 @@ func (client InboundNatRulesClient) CreateOrUpdateResponder(resp *http.Response)
// loadBalancerName - the name of the load balancer.
// inboundNatRuleName - the name of the inbound nat rule.
func (client InboundNatRulesClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string) (result InboundNatRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Delete", nil, "Failure preparing request")
@@ -206,6 +227,16 @@ func (client InboundNatRulesClient) DeleteResponder(resp *http.Response) (result
// inboundNatRuleName - the name of the inbound nat rule.
// expand - expands referenced resources.
func (client InboundNatRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, inboundNatRuleName string, expand string) (result InboundNatRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, inboundNatRuleName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "Get", nil, "Failure preparing request")
@@ -277,6 +308,16 @@ func (client InboundNatRulesClient) GetResponder(resp *http.Response) (result In
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client InboundNatRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.inrlr.Response.Response != nil {
+ sc = result.inrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -341,8 +382,8 @@ func (client InboundNatRulesClient) ListResponder(resp *http.Response) (result I
}
// listNextResults retrieves the next set of results, if any.
-func (client InboundNatRulesClient) listNextResults(lastResults InboundNatRuleListResult) (result InboundNatRuleListResult, err error) {
- req, err := lastResults.inboundNatRuleListResultPreparer()
+func (client InboundNatRulesClient) listNextResults(ctx context.Context, lastResults InboundNatRuleListResult) (result InboundNatRuleListResult, err error) {
+ req, err := lastResults.inboundNatRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InboundNatRulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -363,6 +404,16 @@ func (client InboundNatRulesClient) listNextResults(lastResults InboundNatRuleLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InboundNatRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InboundNatRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRulesClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go
index f3384ff8fe81..ade044220276 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceendpoints.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewInterfaceEndpointsClientWithBaseURI(baseURI string, subscriptionID strin
// interfaceEndpointName - the name of the interface endpoint.
// parameters - parameters supplied to the create or update interface endpoint operation
func (client InterfaceEndpointsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, interfaceEndpointName string, parameters InterfaceEndpoint) (result InterfaceEndpointsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, interfaceEndpointName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client InterfaceEndpointsClient) CreateOrUpdateResponder(resp *http.Respon
// resourceGroupName - the name of the resource group.
// interfaceEndpointName - the name of the interface endpoint.
func (client InterfaceEndpointsClient) Delete(ctx context.Context, resourceGroupName string, interfaceEndpointName string) (result InterfaceEndpointsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, interfaceEndpointName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client InterfaceEndpointsClient) DeleteResponder(resp *http.Response) (res
// interfaceEndpointName - the name of the interface endpoint.
// expand - expands referenced resources.
func (client InterfaceEndpointsClient) Get(ctx context.Context, resourceGroupName string, interfaceEndpointName string, expand string) (result InterfaceEndpoint, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, interfaceEndpointName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client InterfaceEndpointsClient) GetResponder(resp *http.Response) (result
// Parameters:
// resourceGroupName - the name of the resource group.
func (client InterfaceEndpointsClient) List(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.List")
+ defer func() {
+ sc := -1
+ if result.ielr.Response.Response != nil {
+ sc = result.ielr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client InterfaceEndpointsClient) ListResponder(resp *http.Response) (resul
}
// listNextResults retrieves the next set of results, if any.
-func (client InterfaceEndpointsClient) listNextResults(lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
- req, err := lastResults.interfaceEndpointListResultPreparer()
+func (client InterfaceEndpointsClient) listNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
+ req, err := lastResults.interfaceEndpointListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client InterfaceEndpointsClient) listNextResults(lastResults InterfaceEndp
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfaceEndpointsClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceEndpointListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.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, resourceGroupName)
return
}
// ListBySubscription gets all interface endpoints in a subscription.
func (client InterfaceEndpointsClient) ListBySubscription(ctx context.Context) (result InterfaceEndpointListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.ielr.Response.Response != nil {
+ sc = result.ielr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client InterfaceEndpointsClient) ListBySubscriptionResponder(resp *http.Re
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client InterfaceEndpointsClient) listBySubscriptionNextResults(lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
- req, err := lastResults.interfaceEndpointListResultPreparer()
+func (client InterfaceEndpointsClient) listBySubscriptionNextResults(ctx context.Context, lastResults InterfaceEndpointListResult) (result InterfaceEndpointListResult, err error) {
+ req, err := lastResults.interfaceEndpointListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfaceEndpointsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client InterfaceEndpointsClient) listBySubscriptionNextResults(lastResults
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfaceEndpointsClient) ListBySubscriptionComplete(ctx context.Context) (result InterfaceEndpointListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointsClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go
index 8a88026c68f1..5c0b62b0915c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceipconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewInterfaceIPConfigurationsClientWithBaseURI(baseURI string, subscriptionI
// networkInterfaceName - the name of the network interface.
// IPConfigurationName - the name of the ip configuration name.
func (client InterfaceIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, IPConfigurationName string) (result InterfaceIPConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkInterfaceName, IPConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client InterfaceIPConfigurationsClient) GetResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfaceIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.iiclr.Response.Response != nil {
+ sc = result.iiclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
@@ -177,8 +198,8 @@ func (client InterfaceIPConfigurationsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client InterfaceIPConfigurationsClient) listNextResults(lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) {
- req, err := lastResults.interfaceIPConfigurationListResultPreparer()
+func (client InterfaceIPConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) {
+ req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfaceIPConfigurationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -199,6 +220,16 @@ func (client InterfaceIPConfigurationsClient) listNextResults(lastResults Interf
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfaceIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceIPConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationsClient.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, resourceGroupName, networkInterfaceName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go
index ac001e53143c..a1f1d7831498 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaceloadbalancers.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewInterfaceLoadBalancersClientWithBaseURI(baseURI string, subscriptionID s
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfaceLoadBalancersClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.List")
+ defer func() {
+ sc := -1
+ if result.ilblr.Response.Response != nil {
+ sc = result.ilblr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
@@ -108,8 +119,8 @@ func (client InterfaceLoadBalancersClient) ListResponder(resp *http.Response) (r
}
// listNextResults retrieves the next set of results, if any.
-func (client InterfaceLoadBalancersClient) listNextResults(lastResults InterfaceLoadBalancerListResult) (result InterfaceLoadBalancerListResult, err error) {
- req, err := lastResults.interfaceLoadBalancerListResultPreparer()
+func (client InterfaceLoadBalancersClient) listNextResults(ctx context.Context, lastResults InterfaceLoadBalancerListResult) (result InterfaceLoadBalancerListResult, err error) {
+ req, err := lastResults.interfaceLoadBalancerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfaceLoadBalancersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -130,6 +141,16 @@ func (client InterfaceLoadBalancersClient) listNextResults(lastResults Interface
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfaceLoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceLoadBalancerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancersClient.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, resourceGroupName, networkInterfaceName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go
similarity index 89%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaces.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go
index 4790ef04a2cd..6123b59eb3cb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacesgroup.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewInterfacesClientWithBaseURI(baseURI string, subscriptionID string) Inter
// networkInterfaceName - the name of the network interface.
// parameters - parameters supplied to the create or update network interface operation.
func (client InterfacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters Interface) (result InterfacesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkInterfaceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client InterfacesClient) CreateOrUpdateResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfacesClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client InterfacesClient) DeleteResponder(resp *http.Response) (result auto
// networkInterfaceName - the name of the network interface.
// expand - expands referenced resources.
func (client InterfacesClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, expand string) (result Interface, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkInterfaceName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "Get", nil, "Failure preparing request")
@@ -251,6 +282,16 @@ func (client InterfacesClient) GetResponder(resp *http.Response) (result Interfa
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfacesClient) GetEffectiveRouteTable(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesGetEffectiveRouteTableFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetEffectiveRouteTable")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetEffectiveRouteTablePreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetEffectiveRouteTable", nil, "Failure preparing request")
@@ -323,6 +364,16 @@ func (client InterfacesClient) GetEffectiveRouteTableResponder(resp *http.Respon
// IPConfigurationName - the name of the ip configuration.
// expand - expands referenced resources.
func (client InterfacesClient) GetVirtualMachineScaleSetIPConfiguration(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, expand string) (result InterfaceIPConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetIPConfiguration")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetVirtualMachineScaleSetIPConfigurationPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetIPConfiguration", nil, "Failure preparing request")
@@ -399,6 +450,16 @@ func (client InterfacesClient) GetVirtualMachineScaleSetIPConfigurationResponder
// networkInterfaceName - the name of the network interface.
// expand - expands referenced resources.
func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterface(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result Interface, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.GetVirtualMachineScaleSetNetworkInterface")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetVirtualMachineScaleSetNetworkInterfacePreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "GetVirtualMachineScaleSetNetworkInterface", nil, "Failure preparing request")
@@ -470,6 +531,16 @@ func (client InterfacesClient) GetVirtualMachineScaleSetNetworkInterfaceResponde
// Parameters:
// resourceGroupName - the name of the resource group.
func (client InterfacesClient) List(ctx context.Context, resourceGroupName string) (result InterfaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.List")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -533,8 +604,8 @@ func (client InterfacesClient) ListResponder(resp *http.Response) (result Interf
}
// listNextResults retrieves the next set of results, if any.
-func (client InterfacesClient) listNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
- req, err := lastResults.interfaceListResultPreparer()
+func (client InterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -555,12 +626,32 @@ func (client InterfacesClient) listNextResults(lastResults InterfaceListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result InterfaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.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, resourceGroupName)
return
}
// ListAll gets all network interfaces in a subscription.
func (client InterfacesClient) ListAll(ctx context.Context) (result InterfaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -623,8 +714,8 @@ func (client InterfacesClient) ListAllResponder(resp *http.Response) (result Int
}
// listAllNextResults retrieves the next set of results, if any.
-func (client InterfacesClient) listAllNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
- req, err := lastResults.interfaceListResultPreparer()
+func (client InterfacesClient) listAllNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -645,6 +736,16 @@ func (client InterfacesClient) listAllNextResults(lastResults InterfaceListResul
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfacesClient) ListAllComplete(ctx context.Context) (result InterfaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -654,6 +755,16 @@ func (client InterfacesClient) ListAllComplete(ctx context.Context) (result Inte
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfacesClient) ListEffectiveNetworkSecurityGroups(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfacesListEffectiveNetworkSecurityGroupsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListEffectiveNetworkSecurityGroups")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListEffectiveNetworkSecurityGroupsPreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "ListEffectiveNetworkSecurityGroups", nil, "Failure preparing request")
@@ -725,6 +836,16 @@ func (client InterfacesClient) ListEffectiveNetworkSecurityGroupsResponder(resp
// networkInterfaceName - the name of the network interface.
// expand - expands referenced resources.
func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurations(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations")
+ defer func() {
+ sc := -1
+ if result.iiclr.Response.Response != nil {
+ sc = result.iiclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVirtualMachineScaleSetIPConfigurationsNextResults
req, err := client.ListVirtualMachineScaleSetIPConfigurationsPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
if err != nil {
@@ -794,8 +915,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsRespond
}
// listVirtualMachineScaleSetIPConfigurationsNextResults retrieves the next set of results, if any.
-func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextResults(lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) {
- req, err := lastResults.interfaceIPConfigurationListResultPreparer()
+func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextResults(ctx context.Context, lastResults InterfaceIPConfigurationListResult) (result InterfaceIPConfigurationListResult, err error) {
+ req, err := lastResults.interfaceIPConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetIPConfigurationsNextResults", nil, "Failure preparing next results request")
}
@@ -816,6 +937,16 @@ func (client InterfacesClient) listVirtualMachineScaleSetIPConfigurationsNextRes
// ListVirtualMachineScaleSetIPConfigurationsComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, expand string) (result InterfaceIPConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetIPConfigurations")
+ 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.ListVirtualMachineScaleSetIPConfigurations(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand)
return
}
@@ -825,6 +956,16 @@ func (client InterfacesClient) ListVirtualMachineScaleSetIPConfigurationsComplet
// resourceGroupName - the name of the resource group.
// virtualMachineScaleSetName - the name of the virtual machine scale set.
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVirtualMachineScaleSetNetworkInterfacesNextResults
req, err := client.ListVirtualMachineScaleSetNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName)
if err != nil {
@@ -889,8 +1030,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesRespon
}
// listVirtualMachineScaleSetNetworkInterfacesNextResults retrieves the next set of results, if any.
-func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
- req, err := lastResults.interfaceListResultPreparer()
+func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetNetworkInterfacesNextResults", nil, "Failure preparing next results request")
}
@@ -911,6 +1052,16 @@ func (client InterfacesClient) listVirtualMachineScaleSetNetworkInterfacesNextRe
// ListVirtualMachineScaleSetNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result InterfaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetNetworkInterfaces")
+ 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.ListVirtualMachineScaleSetNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName)
return
}
@@ -922,6 +1073,16 @@ func (client InterfacesClient) ListVirtualMachineScaleSetNetworkInterfacesComple
// virtualMachineScaleSetName - the name of the virtual machine scale set.
// virtualmachineIndex - the virtual machine index.
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfaces(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVirtualMachineScaleSetVMNetworkInterfacesNextResults
req, err := client.ListVirtualMachineScaleSetVMNetworkInterfacesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
if err != nil {
@@ -987,8 +1148,8 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesResp
}
// listVirtualMachineScaleSetVMNetworkInterfacesNextResults retrieves the next set of results, if any.
-func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
- req, err := lastResults.interfaceListResultPreparer()
+func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfacesClient", "listVirtualMachineScaleSetVMNetworkInterfacesNextResults", nil, "Failure preparing next results request")
}
@@ -1009,6 +1170,16 @@ func (client InterfacesClient) listVirtualMachineScaleSetVMNetworkInterfacesNext
// ListVirtualMachineScaleSetVMNetworkInterfacesComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string) (result InterfaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.ListVirtualMachineScaleSetVMNetworkInterfaces")
+ 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.ListVirtualMachineScaleSetVMNetworkInterfaces(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex)
return
}
@@ -1019,6 +1190,16 @@ func (client InterfacesClient) ListVirtualMachineScaleSetVMNetworkInterfacesComp
// networkInterfaceName - the name of the network interface.
// parameters - parameters supplied to update network interface tags.
func (client InterfacesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkInterfaceName string, parameters TagsObject) (result InterfacesUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfacesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkInterfaceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfacesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go
index 560af66a0178..0365ec46ce58 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/interfacetapconfigurations.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewInterfaceTapConfigurationsClientWithBaseURI(baseURI string, subscription
// tapConfigurationName - the name of the tap configuration.
// tapConfigurationParameters - parameters supplied to the create or update tap configuration operation.
func (client InterfaceTapConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string, tapConfigurationParameters InterfaceTapConfiguration) (result InterfaceTapConfigurationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: tapConfigurationParameters,
Constraints: []validation.Constraint{{Target: "tapConfigurationParameters.InterfaceTapConfigurationPropertiesFormat", Name: validation.Null, Rule: false,
@@ -153,6 +164,16 @@ func (client InterfaceTapConfigurationsClient) CreateOrUpdateResponder(resp *htt
// networkInterfaceName - the name of the network interface.
// tapConfigurationName - the name of the tap configuration.
func (client InterfaceTapConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfigurationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Delete", nil, "Failure preparing request")
@@ -221,6 +242,16 @@ func (client InterfaceTapConfigurationsClient) DeleteResponder(resp *http.Respon
// networkInterfaceName - the name of the network interface.
// tapConfigurationName - the name of the tap configuration.
func (client InterfaceTapConfigurationsClient) Get(ctx context.Context, resourceGroupName string, networkInterfaceName string, tapConfigurationName string) (result InterfaceTapConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkInterfaceName, tapConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -289,6 +320,16 @@ func (client InterfaceTapConfigurationsClient) GetResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// networkInterfaceName - the name of the network interface.
func (client InterfaceTapConfigurationsClient) List(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.itclr.Response.Response != nil {
+ sc = result.itclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, networkInterfaceName)
if err != nil {
@@ -353,8 +394,8 @@ func (client InterfaceTapConfigurationsClient) ListResponder(resp *http.Response
}
// listNextResults retrieves the next set of results, if any.
-func (client InterfaceTapConfigurationsClient) listNextResults(lastResults InterfaceTapConfigurationListResult) (result InterfaceTapConfigurationListResult, err error) {
- req, err := lastResults.interfaceTapConfigurationListResultPreparer()
+func (client InterfaceTapConfigurationsClient) listNextResults(ctx context.Context, lastResults InterfaceTapConfigurationListResult) (result InterfaceTapConfigurationListResult, err error) {
+ req, err := lastResults.interfaceTapConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.InterfaceTapConfigurationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -375,6 +416,16 @@ func (client InterfaceTapConfigurationsClient) listNextResults(lastResults Inter
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InterfaceTapConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, networkInterfaceName string) (result InterfaceTapConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationsClient.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, resourceGroupName, networkInterfaceName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go
index 9882d1b372f8..42ce49688a31 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerbackendaddresspools.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLoadBalancerBackendAddressPoolsClientWithBaseURI(baseURI string, subscri
// loadBalancerName - the name of the load balancer.
// backendAddressPoolName - the name of the backend address pool.
func (client LoadBalancerBackendAddressPoolsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, backendAddressPoolName string) (result BackendAddressPool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, backendAddressPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "Get", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client LoadBalancerBackendAddressPoolsClient) GetResponder(resp *http.Resp
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancerBackendAddressPoolsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.List")
+ defer func() {
+ sc := -1
+ if result.lbbaplr.Response.Response != nil {
+ sc = result.lbbaplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -178,8 +199,8 @@ func (client LoadBalancerBackendAddressPoolsClient) ListResponder(resp *http.Res
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancerBackendAddressPoolsClient) listNextResults(lastResults LoadBalancerBackendAddressPoolListResult) (result LoadBalancerBackendAddressPoolListResult, err error) {
- req, err := lastResults.loadBalancerBackendAddressPoolListResultPreparer()
+func (client LoadBalancerBackendAddressPoolsClient) listNextResults(ctx context.Context, lastResults LoadBalancerBackendAddressPoolListResult) (result LoadBalancerBackendAddressPoolListResult, err error) {
+ req, err := lastResults.loadBalancerBackendAddressPoolListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancerBackendAddressPoolsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -200,6 +221,16 @@ func (client LoadBalancerBackendAddressPoolsClient) listNextResults(lastResults
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancerBackendAddressPoolsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerBackendAddressPoolListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolsClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go
index 82b6f9489c40..159e1070cf42 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerfrontendipconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewLoadBalancerFrontendIPConfigurationsClientWithBaseURI(baseURI string, su
// loadBalancerName - the name of the load balancer.
// frontendIPConfigurationName - the name of the frontend IP configuration.
func (client LoadBalancerFrontendIPConfigurationsClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, frontendIPConfigurationName string) (result FrontendIPConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, frontendIPConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -115,6 +126,16 @@ func (client LoadBalancerFrontendIPConfigurationsClient) GetResponder(resp *http
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancerFrontendIPConfigurationsClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.List")
+ defer func() {
+ sc := -1
+ if result.lbficlr.Response.Response != nil {
+ sc = result.lbficlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -179,8 +200,8 @@ func (client LoadBalancerFrontendIPConfigurationsClient) ListResponder(resp *htt
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancerFrontendIPConfigurationsClient) listNextResults(lastResults LoadBalancerFrontendIPConfigurationListResult) (result LoadBalancerFrontendIPConfigurationListResult, err error) {
- req, err := lastResults.loadBalancerFrontendIPConfigurationListResultPreparer()
+func (client LoadBalancerFrontendIPConfigurationsClient) listNextResults(ctx context.Context, lastResults LoadBalancerFrontendIPConfigurationListResult) (result LoadBalancerFrontendIPConfigurationListResult, err error) {
+ req, err := lastResults.loadBalancerFrontendIPConfigurationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancerFrontendIPConfigurationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -201,6 +222,16 @@ func (client LoadBalancerFrontendIPConfigurationsClient) listNextResults(lastRes
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancerFrontendIPConfigurationsClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerFrontendIPConfigurationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationsClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go
index 60f954c6aa59..afb4354e5879 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerloadbalancingrules.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLoadBalancerLoadBalancingRulesClientWithBaseURI(baseURI string, subscrip
// loadBalancerName - the name of the load balancer.
// loadBalancingRuleName - the name of the load balancing rule.
func (client LoadBalancerLoadBalancingRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancingRuleName string) (result LoadBalancingRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, loadBalancingRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "Get", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client LoadBalancerLoadBalancingRulesClient) GetResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancerLoadBalancingRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.lblbrlr.Response.Response != nil {
+ sc = result.lblbrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -178,8 +199,8 @@ func (client LoadBalancerLoadBalancingRulesClient) ListResponder(resp *http.Resp
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancerLoadBalancingRulesClient) listNextResults(lastResults LoadBalancerLoadBalancingRuleListResult) (result LoadBalancerLoadBalancingRuleListResult, err error) {
- req, err := lastResults.loadBalancerLoadBalancingRuleListResultPreparer()
+func (client LoadBalancerLoadBalancingRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerLoadBalancingRuleListResult) (result LoadBalancerLoadBalancingRuleListResult, err error) {
+ req, err := lastResults.loadBalancerLoadBalancingRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancerLoadBalancingRulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -200,6 +221,16 @@ func (client LoadBalancerLoadBalancingRulesClient) listNextResults(lastResults L
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancerLoadBalancingRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerLoadBalancingRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRulesClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go
index 51cf06025450..90139360dd84 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancernetworkinterfaces.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLoadBalancerNetworkInterfacesClientWithBaseURI(baseURI string, subscript
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancerNetworkInterfacesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.List")
+ defer func() {
+ sc := -1
+ if result.ilr.Response.Response != nil {
+ sc = result.ilr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -109,8 +120,8 @@ func (client LoadBalancerNetworkInterfacesClient) ListResponder(resp *http.Respo
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancerNetworkInterfacesClient) listNextResults(lastResults InterfaceListResult) (result InterfaceListResult, err error) {
- req, err := lastResults.interfaceListResultPreparer()
+func (client LoadBalancerNetworkInterfacesClient) listNextResults(ctx context.Context, lastResults InterfaceListResult) (result InterfaceListResult, err error) {
+ req, err := lastResults.interfaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancerNetworkInterfacesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -131,6 +142,16 @@ func (client LoadBalancerNetworkInterfacesClient) listNextResults(lastResults In
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancerNetworkInterfacesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result InterfaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerNetworkInterfacesClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go
new file mode 100644
index 000000000000..a47627ecbbc9
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalanceroutboundrules.go
@@ -0,0 +1,235 @@
+package network
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// LoadBalancerOutboundRulesClient is the network Client
+type LoadBalancerOutboundRulesClient struct {
+ BaseClient
+}
+
+// NewLoadBalancerOutboundRulesClient creates an instance of the LoadBalancerOutboundRulesClient client.
+func NewLoadBalancerOutboundRulesClient(subscriptionID string) LoadBalancerOutboundRulesClient {
+ return NewLoadBalancerOutboundRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewLoadBalancerOutboundRulesClientWithBaseURI creates an instance of the LoadBalancerOutboundRulesClient client.
+func NewLoadBalancerOutboundRulesClientWithBaseURI(baseURI string, subscriptionID string) LoadBalancerOutboundRulesClient {
+ return LoadBalancerOutboundRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// Get gets the specified load balancer outbound rule.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+// outboundRuleName - the name of the outbound rule.
+func (client LoadBalancerOutboundRulesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (result OutboundRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, outboundRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client LoadBalancerOutboundRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string, outboundRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "loadBalancerName": autorest.Encode("path", loadBalancerName),
+ "outboundRuleName": autorest.Encode("path", outboundRuleName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client LoadBalancerOutboundRulesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client LoadBalancerOutboundRulesClient) GetResponder(resp *http.Response) (result OutboundRule, 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 gets all the outbound rules in a load balancer.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// loadBalancerName - the name of the load balancer.
+func (client LoadBalancerOutboundRulesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.lborlr.Response.Response != nil {
+ sc = result.lborlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.lborlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.lborlr, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client LoadBalancerOutboundRulesClient) ListPreparer(ctx context.Context, resourceGroupName string, loadBalancerName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "loadBalancerName": autorest.Encode("path", loadBalancerName),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-08-01"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules", 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 LoadBalancerOutboundRulesClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client LoadBalancerOutboundRulesClient) ListResponder(resp *http.Response) (result LoadBalancerOutboundRuleListResult, 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 LoadBalancerOutboundRulesClient) listNextResults(ctx context.Context, lastResults LoadBalancerOutboundRuleListResult) (result LoadBalancerOutboundRuleListResult, err error) {
+ req, err := lastResults.loadBalancerOutboundRuleListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "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, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.LoadBalancerOutboundRulesClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client LoadBalancerOutboundRulesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerOutboundRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRulesClient.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, resourceGroupName, loadBalancerName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go
index a41aaeb4fbd0..b1c03f0fb81f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancerprobes.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLoadBalancerProbesClientWithBaseURI(baseURI string, subscriptionID strin
// loadBalancerName - the name of the load balancer.
// probeName - the name of the probe.
func (client LoadBalancerProbesClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, probeName string) (result Probe, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, probeName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "Get", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client LoadBalancerProbesClient) GetResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancerProbesClient) List(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.List")
+ defer func() {
+ sc := -1
+ if result.lbplr.Response.Response != nil {
+ sc = result.lbplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
@@ -177,8 +198,8 @@ func (client LoadBalancerProbesClient) ListResponder(resp *http.Response) (resul
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancerProbesClient) listNextResults(lastResults LoadBalancerProbeListResult) (result LoadBalancerProbeListResult, err error) {
- req, err := lastResults.loadBalancerProbeListResultPreparer()
+func (client LoadBalancerProbesClient) listNextResults(ctx context.Context, lastResults LoadBalancerProbeListResult) (result LoadBalancerProbeListResult, err error) {
+ req, err := lastResults.loadBalancerProbeListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancerProbesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -199,6 +220,16 @@ func (client LoadBalancerProbesClient) listNextResults(lastResults LoadBalancerP
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancerProbesClient) ListComplete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancerProbeListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbesClient.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, resourceGroupName, loadBalancerName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go
index 9a956d92594e..aebed938b76c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/loadbalancers.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLoadBalancersClientWithBaseURI(baseURI string, subscriptionID string) Lo
// loadBalancerName - the name of the load balancer.
// parameters - parameters supplied to the create or update load balancer operation.
func (client LoadBalancersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters LoadBalancer) (result LoadBalancersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, loadBalancerName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client LoadBalancersClient) CreateOrUpdateResponder(resp *http.Response) (
// resourceGroupName - the name of the resource group.
// loadBalancerName - the name of the load balancer.
func (client LoadBalancersClient) Delete(ctx context.Context, resourceGroupName string, loadBalancerName string) (result LoadBalancersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, loadBalancerName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client LoadBalancersClient) DeleteResponder(resp *http.Response) (result a
// loadBalancerName - the name of the load balancer.
// expand - expands referenced resources.
func (client LoadBalancersClient) Get(ctx context.Context, resourceGroupName string, loadBalancerName string, expand string) (result LoadBalancer, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, loadBalancerName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client LoadBalancersClient) GetResponder(resp *http.Response) (result Load
// Parameters:
// resourceGroupName - the name of the resource group.
func (client LoadBalancersClient) List(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.List")
+ defer func() {
+ sc := -1
+ if result.lblr.Response.Response != nil {
+ sc = result.lblr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client LoadBalancersClient) ListResponder(resp *http.Response) (result Loa
}
// listNextResults retrieves the next set of results, if any.
-func (client LoadBalancersClient) listNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
- req, err := lastResults.loadBalancerListResultPreparer()
+func (client LoadBalancersClient) listNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
+ req, err := lastResults.loadBalancerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client LoadBalancersClient) listNextResults(lastResults LoadBalancerListRe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancersClient) ListComplete(ctx context.Context, resourceGroupName string) (result LoadBalancerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.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, resourceGroupName)
return
}
// ListAll gets all the load balancers in a subscription.
func (client LoadBalancersClient) ListAll(ctx context.Context) (result LoadBalancerListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.lblr.Response.Response != nil {
+ sc = result.lblr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client LoadBalancersClient) ListAllResponder(resp *http.Response) (result
}
// listAllNextResults retrieves the next set of results, if any.
-func (client LoadBalancersClient) listAllNextResults(lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
- req, err := lastResults.loadBalancerListResultPreparer()
+func (client LoadBalancersClient) listAllNextResults(ctx context.Context, lastResults LoadBalancerListResult) (result LoadBalancerListResult, err error) {
+ req, err := lastResults.loadBalancerListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LoadBalancersClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client LoadBalancersClient) listAllNextResults(lastResults LoadBalancerLis
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result LoadBalancerListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -435,6 +506,16 @@ func (client LoadBalancersClient) ListAllComplete(ctx context.Context) (result L
// loadBalancerName - the name of the load balancer.
// parameters - parameters supplied to update load balancer tags.
func (client LoadBalancersClient) UpdateTags(ctx context.Context, resourceGroupName string, loadBalancerName string, parameters TagsObject) (result LoadBalancersUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, loadBalancerName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go
index 7f13d0e4cf6f..7dc07769a519 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/localnetworkgateways.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLocalNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID str
// localNetworkGatewayName - the name of the local network gateway.
// parameters - parameters supplied to the create or update local network gateway operation.
func (client LocalNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters LocalNetworkGateway) (result LocalNetworkGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: localNetworkGatewayName,
Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
@@ -123,6 +134,16 @@ func (client LocalNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Resp
// resourceGroupName - the name of the resource group.
// localNetworkGatewayName - the name of the local network gateway.
func (client LocalNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: localNetworkGatewayName,
Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
@@ -195,6 +216,16 @@ func (client LocalNetworkGatewaysClient) DeleteResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// localNetworkGatewayName - the name of the local network gateway.
func (client LocalNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, localNetworkGatewayName string) (result LocalNetworkGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.Get")
+ 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: localNetworkGatewayName,
Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
@@ -267,6 +298,16 @@ func (client LocalNetworkGatewaysClient) GetResponder(resp *http.Response) (resu
// Parameters:
// resourceGroupName - the name of the resource group.
func (client LocalNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.List")
+ defer func() {
+ sc := -1
+ if result.lnglr.Response.Response != nil {
+ sc = result.lnglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -330,8 +371,8 @@ func (client LocalNetworkGatewaysClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client LocalNetworkGatewaysClient) listNextResults(lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) {
- req, err := lastResults.localNetworkGatewayListResultPreparer()
+func (client LocalNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults LocalNetworkGatewayListResult) (result LocalNetworkGatewayListResult, err error) {
+ req, err := lastResults.localNetworkGatewayListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.LocalNetworkGatewaysClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -352,6 +393,16 @@ func (client LocalNetworkGatewaysClient) listNextResults(lastResults LocalNetwor
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result LocalNetworkGatewayListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.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, resourceGroupName)
return
}
@@ -362,6 +413,16 @@ func (client LocalNetworkGatewaysClient) ListComplete(ctx context.Context, resou
// localNetworkGatewayName - the name of the local network gateway.
// parameters - parameters supplied to update local network gateway tags.
func (client LocalNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, localNetworkGatewayName string, parameters TagsObject) (result LocalNetworkGatewaysUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewaysClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: localNetworkGatewayName,
Constraints: []validation.Constraint{{Target: "localNetworkGatewayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go
index 87617dd9a8af..b7a226390532 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/models.go
@@ -18,14 +18,19 @@ package network
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network"
+
// Access enumerates the values for access.
type Access string
@@ -78,6 +83,22 @@ func PossibleApplicationGatewayCookieBasedAffinityValues() []ApplicationGatewayC
return []ApplicationGatewayCookieBasedAffinity{Disabled, Enabled}
}
+// ApplicationGatewayCustomErrorStatusCode enumerates the values for application gateway custom error status
+// code.
+type ApplicationGatewayCustomErrorStatusCode string
+
+const (
+ // HTTPStatus403 ...
+ HTTPStatus403 ApplicationGatewayCustomErrorStatusCode = "HttpStatus403"
+ // HTTPStatus502 ...
+ HTTPStatus502 ApplicationGatewayCustomErrorStatusCode = "HttpStatus502"
+)
+
+// PossibleApplicationGatewayCustomErrorStatusCodeValues returns an array of possible values for the ApplicationGatewayCustomErrorStatusCode const type.
+func PossibleApplicationGatewayCustomErrorStatusCodeValues() []ApplicationGatewayCustomErrorStatusCode {
+ return []ApplicationGatewayCustomErrorStatusCode{HTTPStatus403, HTTPStatus502}
+}
+
// ApplicationGatewayFirewallMode enumerates the values for application gateway firewall mode.
type ApplicationGatewayFirewallMode string
@@ -398,6 +419,8 @@ type AzureFirewallNetworkRuleProtocol string
const (
// Any ...
Any AzureFirewallNetworkRuleProtocol = "Any"
+ // ICMP ...
+ ICMP AzureFirewallNetworkRuleProtocol = "ICMP"
// TCP ...
TCP AzureFirewallNetworkRuleProtocol = "TCP"
// UDP ...
@@ -406,7 +429,7 @@ const (
// PossibleAzureFirewallNetworkRuleProtocolValues returns an array of possible values for the AzureFirewallNetworkRuleProtocol const type.
func PossibleAzureFirewallNetworkRuleProtocolValues() []AzureFirewallNetworkRuleProtocol {
- return []AzureFirewallNetworkRuleProtocol{Any, TCP, UDP}
+ return []AzureFirewallNetworkRuleProtocol{Any, ICMP, TCP, UDP}
}
// AzureFirewallRCActionType enumerates the values for azure firewall rc action type.
@@ -679,15 +702,47 @@ func PossibleExpressRouteCircuitSkuFamilyValues() []ExpressRouteCircuitSkuFamily
type ExpressRouteCircuitSkuTier string
const (
- // Premium ...
- Premium ExpressRouteCircuitSkuTier = "Premium"
- // Standard ...
- Standard ExpressRouteCircuitSkuTier = "Standard"
+ // ExpressRouteCircuitSkuTierBasic ...
+ ExpressRouteCircuitSkuTierBasic ExpressRouteCircuitSkuTier = "Basic"
+ // ExpressRouteCircuitSkuTierPremium ...
+ ExpressRouteCircuitSkuTierPremium ExpressRouteCircuitSkuTier = "Premium"
+ // ExpressRouteCircuitSkuTierStandard ...
+ ExpressRouteCircuitSkuTierStandard ExpressRouteCircuitSkuTier = "Standard"
)
// PossibleExpressRouteCircuitSkuTierValues returns an array of possible values for the ExpressRouteCircuitSkuTier const type.
func PossibleExpressRouteCircuitSkuTierValues() []ExpressRouteCircuitSkuTier {
- return []ExpressRouteCircuitSkuTier{Premium, Standard}
+ return []ExpressRouteCircuitSkuTier{ExpressRouteCircuitSkuTierBasic, ExpressRouteCircuitSkuTierPremium, ExpressRouteCircuitSkuTierStandard}
+}
+
+// ExpressRouteLinkAdminState enumerates the values for express route link admin state.
+type ExpressRouteLinkAdminState string
+
+const (
+ // ExpressRouteLinkAdminStateDisabled ...
+ ExpressRouteLinkAdminStateDisabled ExpressRouteLinkAdminState = "Disabled"
+ // ExpressRouteLinkAdminStateEnabled ...
+ ExpressRouteLinkAdminStateEnabled ExpressRouteLinkAdminState = "Enabled"
+)
+
+// PossibleExpressRouteLinkAdminStateValues returns an array of possible values for the ExpressRouteLinkAdminState const type.
+func PossibleExpressRouteLinkAdminStateValues() []ExpressRouteLinkAdminState {
+ return []ExpressRouteLinkAdminState{ExpressRouteLinkAdminStateDisabled, ExpressRouteLinkAdminStateEnabled}
+}
+
+// ExpressRouteLinkConnectorType enumerates the values for express route link connector type.
+type ExpressRouteLinkConnectorType string
+
+const (
+ // LC ...
+ LC ExpressRouteLinkConnectorType = "LC"
+ // SC ...
+ SC ExpressRouteLinkConnectorType = "SC"
+)
+
+// PossibleExpressRouteLinkConnectorTypeValues returns an array of possible values for the ExpressRouteLinkConnectorType const type.
+func PossibleExpressRouteLinkConnectorTypeValues() []ExpressRouteLinkConnectorType {
+ return []ExpressRouteLinkConnectorType{LC, SC}
}
// ExpressRoutePeeringState enumerates the values for express route peering state.
@@ -722,6 +777,21 @@ func PossibleExpressRoutePeeringTypeValues() []ExpressRoutePeeringType {
return []ExpressRoutePeeringType{AzurePrivatePeering, AzurePublicPeering, MicrosoftPeering}
}
+// ExpressRoutePortsEncapsulation enumerates the values for express route ports encapsulation.
+type ExpressRoutePortsEncapsulation string
+
+const (
+ // Dot1Q ...
+ Dot1Q ExpressRoutePortsEncapsulation = "Dot1Q"
+ // QinQ ...
+ QinQ ExpressRoutePortsEncapsulation = "QinQ"
+)
+
+// PossibleExpressRoutePortsEncapsulationValues returns an array of possible values for the ExpressRoutePortsEncapsulation const type.
+func PossibleExpressRoutePortsEncapsulationValues() []ExpressRoutePortsEncapsulation {
+ return []ExpressRoutePortsEncapsulation{Dot1Q, QinQ}
+}
+
// HTTPMethod enumerates the values for http method.
type HTTPMethod string
@@ -1230,13 +1300,13 @@ func PossiblePublicIPAddressSkuNameValues() []PublicIPAddressSkuName {
type PublicIPPrefixSkuName string
const (
- // PublicIPPrefixSkuNameStandard ...
- PublicIPPrefixSkuNameStandard PublicIPPrefixSkuName = "Standard"
+ // Standard ...
+ Standard PublicIPPrefixSkuName = "Standard"
)
// PossiblePublicIPPrefixSkuNameValues returns an array of possible values for the PublicIPPrefixSkuName const type.
func PossiblePublicIPPrefixSkuNameValues() []PublicIPPrefixSkuName {
- return []PublicIPPrefixSkuName{PublicIPPrefixSkuNameStandard}
+ return []PublicIPPrefixSkuName{Standard}
}
// RouteNextHopType enumerates the values for route next hop type.
@@ -1377,6 +1447,23 @@ func PossibleTunnelConnectionStatusValues() []TunnelConnectionStatus {
return []TunnelConnectionStatus{TunnelConnectionStatusConnected, TunnelConnectionStatusConnecting, TunnelConnectionStatusNotConnected, TunnelConnectionStatusUnknown}
}
+// VerbosityLevel enumerates the values for verbosity level.
+type VerbosityLevel string
+
+const (
+ // Full ...
+ Full VerbosityLevel = "Full"
+ // Minimum ...
+ Minimum VerbosityLevel = "Minimum"
+ // Normal ...
+ Normal VerbosityLevel = "Normal"
+)
+
+// PossibleVerbosityLevelValues returns an array of possible values for the VerbosityLevel const type.
+func PossibleVerbosityLevelValues() []VerbosityLevel {
+ return []VerbosityLevel{Full, Minimum, Normal}
+}
+
// VirtualNetworkGatewayConnectionProtocol enumerates the values for virtual network gateway connection
// protocol.
type VirtualNetworkGatewayConnectionProtocol string
@@ -1618,8 +1705,8 @@ func PossibleVpnTypeValues() []VpnType {
return []VpnType{PolicyBased, RouteBased}
}
-// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the virtual
-// network.
+// AddressSpace addressSpace contains an array of IP address ranges that can be used by subnets of the
+// virtual network.
type AddressSpace struct {
// AddressPrefixes - A list of address blocks reserved for this virtual network in CIDR notation.
AddressPrefixes *[]string `json:"addressPrefixes,omitempty"`
@@ -1871,7 +1958,8 @@ type ApplicationGatewayAutoscaleConfiguration struct {
MinCapacity *int32 `json:"minCapacity,omitempty"`
}
-// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service call.
+// ApplicationGatewayAvailableSslOptions response for ApplicationGatewayAvailableSslOptions API service
+// call.
type ApplicationGatewayAvailableSslOptions struct {
autorest.Response `json:"-"`
*ApplicationGatewayAvailableSslOptionsPropertiesFormat `json:"properties,omitempty"`
@@ -1980,7 +2068,8 @@ func (agaso *ApplicationGatewayAvailableSslOptions) UnmarshalJSON(body []byte) e
return nil
}
-// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of ApplicationGatewayAvailableSslOptions
+// ApplicationGatewayAvailableSslOptionsPropertiesFormat properties of
+// ApplicationGatewayAvailableSslOptions
type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
// PredefinedPolicies - List of available Ssl predefined policy.
PredefinedPolicies *[]SubResource `json:"predefinedPolicies,omitempty"`
@@ -1992,8 +2081,8 @@ type ApplicationGatewayAvailableSslOptionsPropertiesFormat struct {
AvailableProtocols *[]ApplicationGatewaySslProtocol `json:"availableProtocols,omitempty"`
}
-// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API service
-// call.
+// ApplicationGatewayAvailableSslPredefinedPolicies response for ApplicationGatewayAvailableSslOptions API
+// service call.
type ApplicationGatewayAvailableSslPredefinedPolicies struct {
autorest.Response `json:"-"`
// Value - List of available Ssl predefined policy.
@@ -2009,14 +2098,24 @@ type ApplicationGatewayAvailableSslPredefinedPoliciesIterator struct {
page ApplicationGatewayAvailableSslPredefinedPoliciesPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
+func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2025,6 +2124,13 @@ func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() err
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2044,6 +2150,11 @@ func (iter ApplicationGatewayAvailableSslPredefinedPoliciesIterator) Value() App
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesIterator type.
+func NewApplicationGatewayAvailableSslPredefinedPoliciesIterator(page ApplicationGatewayAvailableSslPredefinedPoliciesPage) ApplicationGatewayAvailableSslPredefinedPoliciesIterator {
+ return ApplicationGatewayAvailableSslPredefinedPoliciesIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
return agaspp.Value == nil || len(*agaspp.Value) == 0
@@ -2051,27 +2162,37 @@ func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) IsEmpty() bool {
// applicationGatewayAvailableSslPredefinedPoliciesPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer() (*http.Request, error) {
+func (agaspp ApplicationGatewayAvailableSslPredefinedPolicies) applicationGatewayAvailableSslPredefinedPoliciesPreparer(ctx context.Context) (*http.Request, error) {
if agaspp.NextLink == nil || len(to.String(agaspp.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(agaspp.NextLink)))
}
-// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of ApplicationGatewaySslPredefinedPolicy
-// values.
+// ApplicationGatewayAvailableSslPredefinedPoliciesPage contains a page of
+// ApplicationGatewaySslPredefinedPolicy values.
type ApplicationGatewayAvailableSslPredefinedPoliciesPage struct {
- fn func(ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
+ fn func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)
agaspp ApplicationGatewayAvailableSslPredefinedPolicies
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
- next, err := page.fn(page.agaspp)
+func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayAvailableSslPredefinedPoliciesPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.agaspp)
if err != nil {
return err
}
@@ -2079,6 +2200,13 @@ func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ApplicationGatewayAvailableSslPredefinedPoliciesPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) NotDone() bool {
return !page.agaspp.IsEmpty()
@@ -2097,8 +2225,13 @@ func (page ApplicationGatewayAvailableSslPredefinedPoliciesPage) Values() []Appl
return *page.agaspp.Value
}
-// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API service
-// call.
+// Creates a new instance of the ApplicationGatewayAvailableSslPredefinedPoliciesPage type.
+func NewApplicationGatewayAvailableSslPredefinedPoliciesPage(getNextPage func(context.Context, ApplicationGatewayAvailableSslPredefinedPolicies) (ApplicationGatewayAvailableSslPredefinedPolicies, error)) ApplicationGatewayAvailableSslPredefinedPoliciesPage {
+ return ApplicationGatewayAvailableSslPredefinedPoliciesPage{fn: getNextPage}
+}
+
+// ApplicationGatewayAvailableWafRuleSetsResult response for ApplicationGatewayAvailableWafRuleSets API
+// service call.
type ApplicationGatewayAvailableWafRuleSetsResult struct {
autorest.Response `json:"-"`
// Value - The list of application gateway rule sets.
@@ -2207,8 +2340,8 @@ func (agbap *ApplicationGatewayBackendAddressPool) UnmarshalJSON(body []byte) er
return nil
}
-// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an application
-// gateway.
+// ApplicationGatewayBackendAddressPoolPropertiesFormat properties of Backend Address Pool of an
+// application gateway.
type ApplicationGatewayBackendAddressPoolPropertiesFormat struct {
// BackendIPConfigurations - Collection of references to IPs defined in network interfaces.
BackendIPConfigurations *[]InterfaceIPConfiguration `json:"backendIPConfigurations,omitempty"`
@@ -2377,8 +2510,8 @@ type ApplicationGatewayBackendHTTPSettingsPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to be
-// active for a specified time after the backend server got removed from the configuration.
+// ApplicationGatewayConnectionDraining connection draining allows open connections to a backend server to
+// be active for a specified time after the backend server got removed from the configuration.
type ApplicationGatewayConnectionDraining struct {
// Enabled - Whether connection draining is enabled or not.
Enabled *bool `json:"enabled,omitempty"`
@@ -2386,7 +2519,16 @@ type ApplicationGatewayConnectionDraining struct {
DrainTimeoutInSec *int32 `json:"drainTimeoutInSec,omitempty"`
}
-// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire rule group.
+// ApplicationGatewayCustomError customer error of an application gateway.
+type ApplicationGatewayCustomError struct {
+ // StatusCode - Status code of the application gateway customer error. Possible values include: 'HTTPStatus403', 'HTTPStatus502'
+ StatusCode ApplicationGatewayCustomErrorStatusCode `json:"statusCode,omitempty"`
+ // CustomErrorPageURL - Error page URL of the application gateway customer error.
+ CustomErrorPageURL *string `json:"customErrorPageUrl,omitempty"`
+}
+
+// ApplicationGatewayFirewallDisabledRuleGroup allows to disable rules within a rule group or an entire
+// rule group.
type ApplicationGatewayFirewallDisabledRuleGroup struct {
// RuleGroupName - The name of the rule group that will be disabled.
RuleGroupName *string `json:"ruleGroupName,omitempty"`
@@ -2394,6 +2536,17 @@ type ApplicationGatewayFirewallDisabledRuleGroup struct {
Rules *[]int32 `json:"rules,omitempty"`
}
+// ApplicationGatewayFirewallExclusion allow to exclude some variable satisfy the condition for the WAF
+// check
+type ApplicationGatewayFirewallExclusion struct {
+ // MatchVariable - The variable to be excluded.
+ MatchVariable *string `json:"matchVariable,omitempty"`
+ // SelectorMatchOperator - When matchVariable is a collection, operate on the selector to specify which elements in the collection this exclusion applies to.
+ SelectorMatchOperator *string `json:"selectorMatchOperator,omitempty"`
+ // Selector - When matchVariable is a collection, operator used to specify which elements in the collection this exclusion applies to.
+ Selector *string `json:"selector,omitempty"`
+}
+
// ApplicationGatewayFirewallRule a web application firewall rule.
type ApplicationGatewayFirewallRule struct {
// RuleID - The identifier of the web application firewall rule.
@@ -2853,10 +3006,12 @@ type ApplicationGatewayHTTPListenerPropertiesFormat struct {
RequireServerNameIndication *bool `json:"requireServerNameIndication,omitempty"`
// ProvisioningState - Provisioning state of the HTTP listener resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
ProvisioningState *string `json:"provisioningState,omitempty"`
+ // CustomErrorConfigurations - Custom error configurations of the HTTP listener.
+ CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
}
-// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1 private
-// IP configuration is allowed.
+// ApplicationGatewayIPConfiguration IP configuration of an application gateway. Currently 1 public and 1
+// private IP configuration is allowed.
type ApplicationGatewayIPConfiguration struct {
*ApplicationGatewayIPConfigurationPropertiesFormat `json:"properties,omitempty"`
// Name - Name of the IP configuration that is unique within an Application Gateway.
@@ -2950,7 +3105,8 @@ func (agic *ApplicationGatewayIPConfiguration) UnmarshalJSON(body []byte) error
return nil
}
-// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application gateway.
+// ApplicationGatewayIPConfigurationPropertiesFormat properties of IP configuration of an application
+// gateway.
type ApplicationGatewayIPConfigurationPropertiesFormat struct {
// Subnet - Reference of the subnet resource. A subnet from where application gateway gets its private address.
Subnet *SubResource `json:"subnet,omitempty"`
@@ -2973,14 +3129,24 @@ type ApplicationGatewayListResultIterator struct {
page ApplicationGatewayListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ApplicationGatewayListResultIterator) Next() error {
+func (iter *ApplicationGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2989,6 +3155,13 @@ func (iter *ApplicationGatewayListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ApplicationGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationGatewayListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3008,6 +3181,11 @@ func (iter ApplicationGatewayListResultIterator) Value() ApplicationGateway {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ApplicationGatewayListResultIterator type.
+func NewApplicationGatewayListResultIterator(page ApplicationGatewayListResultPage) ApplicationGatewayListResultIterator {
+ return ApplicationGatewayListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (aglr ApplicationGatewayListResult) IsEmpty() bool {
return aglr.Value == nil || len(*aglr.Value) == 0
@@ -3015,11 +3193,11 @@ func (aglr ApplicationGatewayListResult) IsEmpty() bool {
// applicationGatewayListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer() (*http.Request, error) {
+func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
if aglr.NextLink == nil || len(to.String(aglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(aglr.NextLink)))
@@ -3027,14 +3205,24 @@ func (aglr ApplicationGatewayListResult) applicationGatewayListResultPreparer()
// ApplicationGatewayListResultPage contains a page of ApplicationGateway values.
type ApplicationGatewayListResultPage struct {
- fn func(ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
+ fn func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)
aglr ApplicationGatewayListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ApplicationGatewayListResultPage) Next() error {
- next, err := page.fn(page.aglr)
+func (page *ApplicationGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationGatewayListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.aglr)
if err != nil {
return err
}
@@ -3042,6 +3230,13 @@ func (page *ApplicationGatewayListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ApplicationGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationGatewayListResultPage) NotDone() bool {
return !page.aglr.IsEmpty()
@@ -3060,6 +3255,11 @@ func (page ApplicationGatewayListResultPage) Values() []ApplicationGateway {
return *page.aglr.Value
}
+// Creates a new instance of the ApplicationGatewayListResultPage type.
+func NewApplicationGatewayListResultPage(getNextPage func(context.Context, ApplicationGatewayListResult) (ApplicationGatewayListResult, error)) ApplicationGatewayListResultPage {
+ return ApplicationGatewayListResultPage{fn: getNextPage}
+}
+
// ApplicationGatewayPathRule path rule of URL path map of an application gateway.
type ApplicationGatewayPathRule struct {
*ApplicationGatewayPathRulePropertiesFormat `json:"properties,omitempty"`
@@ -3340,6 +3540,8 @@ type ApplicationGatewayPropertiesFormat struct {
ResourceGUID *string `json:"resourceGuid,omitempty"`
// ProvisioningState - Provisioning state of the application gateway resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
ProvisioningState *string `json:"provisioningState,omitempty"`
+ // CustomErrorConfigurations - Custom error configurations of the application gateway resource.
+ CustomErrorConfigurations *[]ApplicationGatewayCustomError `json:"customErrorConfigurations,omitempty"`
}
// ApplicationGatewayRedirectConfiguration redirect configuration of an application gateway.
@@ -3436,8 +3638,8 @@ func (agrc *ApplicationGatewayRedirectConfiguration) UnmarshalJSON(body []byte)
return nil
}
-// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the application
-// gateway.
+// ApplicationGatewayRedirectConfigurationPropertiesFormat properties of redirect configuration of the
+// application gateway.
type ApplicationGatewayRedirectConfigurationPropertiesFormat struct {
// RedirectType - Supported http redirection types - Permanent, Temporary, Found, SeeOther. Possible values include: 'Permanent', 'Found', 'SeeOther', 'Temporary'
RedirectType ApplicationGatewayRedirectType `json:"redirectType,omitempty"`
@@ -3551,8 +3753,8 @@ func (agrrr *ApplicationGatewayRequestRoutingRule) UnmarshalJSON(body []byte) er
return nil
}
-// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the application
-// gateway.
+// ApplicationGatewayRequestRoutingRulePropertiesFormat properties of request routing rule of the
+// application gateway.
type ApplicationGatewayRequestRoutingRulePropertiesFormat struct {
// RuleType - Rule type. Possible values include: 'Basic', 'PathBasedRouting'
RuleType ApplicationGatewayRequestRoutingRuleType `json:"ruleType,omitempty"`
@@ -3628,8 +3830,8 @@ func (future *ApplicationGatewaysCreateOrUpdateFuture) Result(client Application
return
}
-// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ApplicationGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ApplicationGatewaysDeleteFuture struct {
azure.Future
}
@@ -3755,7 +3957,8 @@ func (agsc *ApplicationGatewaySslCertificate) UnmarshalJSON(body []byte) error {
return nil
}
-// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application gateway.
+// ApplicationGatewaySslCertificatePropertiesFormat properties of SSL certificates of an application
+// gateway.
type ApplicationGatewaySslCertificatePropertiesFormat struct {
// Data - Base-64 encoded pfx certificate. Only applicable in PUT Request.
Data *string `json:"data,omitempty"`
@@ -3848,7 +4051,8 @@ func (agspp *ApplicationGatewaySslPredefinedPolicy) UnmarshalJSON(body []byte) e
return nil
}
-// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of ApplicationGatewaySslPredefinedPolicy
+// ApplicationGatewaySslPredefinedPolicyPropertiesFormat properties of
+// ApplicationGatewaySslPredefinedPolicy
type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
// CipherSuites - Ssl cipher suites to be enabled in the specified order for application gateway.
CipherSuites *[]ApplicationGatewaySslCipherSuite `json:"cipherSuites,omitempty"`
@@ -3856,8 +4060,8 @@ type ApplicationGatewaySslPredefinedPolicyPropertiesFormat struct {
MinProtocolVersion ApplicationGatewaySslProtocol `json:"minProtocolVersion,omitempty"`
}
-// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ApplicationGatewaysStartFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ApplicationGatewaysStartFuture struct {
azure.Future
}
@@ -3902,8 +4106,8 @@ func (future *ApplicationGatewaysStopFuture) Result(client ApplicationGatewaysCl
return
}
-// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ApplicationGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ApplicationGatewaysUpdateTagsFuture struct {
azure.Future
}
@@ -4025,8 +4229,8 @@ func (agtrc *ApplicationGatewayTrustedRootCertificate) UnmarshalJSON(body []byte
return nil
}
-// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an application
-// gateway.
+// ApplicationGatewayTrustedRootCertificatePropertiesFormat trusted Root certificates properties of an
+// application gateway.
type ApplicationGatewayTrustedRootCertificatePropertiesFormat struct {
// Data - Certificate public data.
Data *string `json:"data,omitempty"`
@@ -4162,6 +4366,12 @@ type ApplicationGatewayWebApplicationFirewallConfiguration struct {
RequestBodyCheck *bool `json:"requestBodyCheck,omitempty"`
// MaxRequestBodySize - Maxium request body size for WAF.
MaxRequestBodySize *int32 `json:"maxRequestBodySize,omitempty"`
+ // MaxRequestBodySizeInKb - Maxium request body size in Kb for WAF.
+ MaxRequestBodySizeInKb *int32 `json:"maxRequestBodySizeInKb,omitempty"`
+ // FileUploadLimitInMb - Maxium file upload size in Mb for WAF.
+ FileUploadLimitInMb *int32 `json:"fileUploadLimitInMb,omitempty"`
+ // Exclusions - The exclusion list.
+ Exclusions *[]ApplicationGatewayFirewallExclusion `json:"exclusions,omitempty"`
}
// ApplicationSecurityGroup an application security group in a resource group.
@@ -4297,21 +4507,31 @@ type ApplicationSecurityGroupListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ApplicationSecurityGroupListResultIterator provides access to a complete listing of ApplicationSecurityGroup
-// values.
+// ApplicationSecurityGroupListResultIterator provides access to a complete listing of
+// ApplicationSecurityGroup values.
type ApplicationSecurityGroupListResultIterator struct {
i int
page ApplicationSecurityGroupListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
+func (iter *ApplicationSecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4320,6 +4540,13 @@ func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ApplicationSecurityGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ApplicationSecurityGroupListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4339,6 +4566,11 @@ func (iter ApplicationSecurityGroupListResultIterator) Value() ApplicationSecuri
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ApplicationSecurityGroupListResultIterator type.
+func NewApplicationSecurityGroupListResultIterator(page ApplicationSecurityGroupListResultPage) ApplicationSecurityGroupListResultIterator {
+ return ApplicationSecurityGroupListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
return asglr.Value == nil || len(*asglr.Value) == 0
@@ -4346,11 +4578,11 @@ func (asglr ApplicationSecurityGroupListResult) IsEmpty() bool {
// applicationSecurityGroupListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer() (*http.Request, error) {
+func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
if asglr.NextLink == nil || len(to.String(asglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(asglr.NextLink)))
@@ -4358,14 +4590,24 @@ func (asglr ApplicationSecurityGroupListResult) applicationSecurityGroupListResu
// ApplicationSecurityGroupListResultPage contains a page of ApplicationSecurityGroup values.
type ApplicationSecurityGroupListResultPage struct {
- fn func(ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
+ fn func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)
asglr ApplicationSecurityGroupListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ApplicationSecurityGroupListResultPage) Next() error {
- next, err := page.fn(page.asglr)
+func (page *ApplicationSecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ApplicationSecurityGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.asglr)
if err != nil {
return err
}
@@ -4373,6 +4615,13 @@ func (page *ApplicationSecurityGroupListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ApplicationSecurityGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ApplicationSecurityGroupListResultPage) NotDone() bool {
return !page.asglr.IsEmpty()
@@ -4391,6 +4640,11 @@ func (page ApplicationSecurityGroupListResultPage) Values() []ApplicationSecurit
return *page.asglr.Value
}
+// Creates a new instance of the ApplicationSecurityGroupListResultPage type.
+func NewApplicationSecurityGroupListResultPage(getNextPage func(context.Context, ApplicationSecurityGroupListResult) (ApplicationSecurityGroupListResult, error)) ApplicationSecurityGroupListResultPage {
+ return ApplicationSecurityGroupListResultPage{fn: getNextPage}
+}
+
// ApplicationSecurityGroupPropertiesFormat application security group properties.
type ApplicationSecurityGroupPropertiesFormat struct {
// ResourceGUID - The resource GUID property of the application security group resource. It uniquely identifies a resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
@@ -4399,8 +4653,8 @@ type ApplicationSecurityGroupPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ApplicationSecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ApplicationSecurityGroupsCreateOrUpdateFuture struct {
azure.Future
}
@@ -4428,8 +4682,8 @@ func (future *ApplicationSecurityGroupsCreateOrUpdateFuture) Result(client Appli
return
}
-// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ApplicationSecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ApplicationSecurityGroupsDeleteFuture struct {
azure.Future
}
@@ -4451,8 +4705,8 @@ func (future *ApplicationSecurityGroupsDeleteFuture) Result(client ApplicationSe
return
}
-// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations that
-// belongs to an ExpressRouteCircuit.
+// AuthorizationListResult response for ListAuthorizations API service call retrieves all authorizations
+// that belongs to an ExpressRouteCircuit.
type AuthorizationListResult struct {
autorest.Response `json:"-"`
// Value - The authorizations in an ExpressRoute Circuit.
@@ -4461,21 +4715,31 @@ type AuthorizationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// AuthorizationListResultIterator provides access to a complete listing of ExpressRouteCircuitAuthorization
-// values.
+// AuthorizationListResultIterator provides access to a complete listing of
+// ExpressRouteCircuitAuthorization values.
type AuthorizationListResultIterator struct {
i int
page AuthorizationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AuthorizationListResultIterator) Next() error {
+func (iter *AuthorizationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4484,6 +4748,13 @@ func (iter *AuthorizationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AuthorizationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AuthorizationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4503,6 +4774,11 @@ func (iter AuthorizationListResultIterator) Value() ExpressRouteCircuitAuthoriza
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AuthorizationListResultIterator type.
+func NewAuthorizationListResultIterator(page AuthorizationListResultPage) AuthorizationListResultIterator {
+ return AuthorizationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (alr AuthorizationListResult) IsEmpty() bool {
return alr.Value == nil || len(*alr.Value) == 0
@@ -4510,11 +4786,11 @@ func (alr AuthorizationListResult) IsEmpty() bool {
// authorizationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Request, error) {
+func (alr AuthorizationListResult) authorizationListResultPreparer(ctx context.Context) (*http.Request, error) {
if alr.NextLink == nil || len(to.String(alr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(alr.NextLink)))
@@ -4522,14 +4798,24 @@ func (alr AuthorizationListResult) authorizationListResultPreparer() (*http.Requ
// AuthorizationListResultPage contains a page of ExpressRouteCircuitAuthorization values.
type AuthorizationListResultPage struct {
- fn func(AuthorizationListResult) (AuthorizationListResult, error)
+ fn func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)
alr AuthorizationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AuthorizationListResultPage) Next() error {
- next, err := page.fn(page.alr)
+func (page *AuthorizationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.alr)
if err != nil {
return err
}
@@ -4537,6 +4823,13 @@ func (page *AuthorizationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AuthorizationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AuthorizationListResultPage) NotDone() bool {
return !page.alr.IsEmpty()
@@ -4555,6 +4848,11 @@ func (page AuthorizationListResultPage) Values() []ExpressRouteCircuitAuthorizat
return *page.alr.Value
}
+// Creates a new instance of the AuthorizationListResultPage type.
+func NewAuthorizationListResultPage(getNextPage func(context.Context, AuthorizationListResult) (AuthorizationListResult, error)) AuthorizationListResultPage {
+ return AuthorizationListResultPage{fn: getNextPage}
+}
+
// AuthorizationPropertiesFormat ...
type AuthorizationPropertiesFormat struct {
// AuthorizationKey - The authorization key.
@@ -4575,7 +4873,8 @@ type Availability struct {
BlobDuration *string `json:"blobDuration,omitempty"`
}
-// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a subnet.
+// AvailableDelegation the serviceName of an AvailableDelegation indicates a possible delegation for a
+// subnet.
type AvailableDelegation struct {
// Name - The name of the AvailableDelegation resource.
Name *string `json:"name,omitempty"`
@@ -4604,14 +4903,24 @@ type AvailableDelegationsResultIterator struct {
page AvailableDelegationsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AvailableDelegationsResultIterator) Next() error {
+func (iter *AvailableDelegationsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4620,6 +4929,13 @@ func (iter *AvailableDelegationsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AvailableDelegationsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AvailableDelegationsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4639,6 +4955,11 @@ func (iter AvailableDelegationsResultIterator) Value() AvailableDelegation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AvailableDelegationsResultIterator type.
+func NewAvailableDelegationsResultIterator(page AvailableDelegationsResultPage) AvailableDelegationsResultIterator {
+ return AvailableDelegationsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (adr AvailableDelegationsResult) IsEmpty() bool {
return adr.Value == nil || len(*adr.Value) == 0
@@ -4646,11 +4967,11 @@ func (adr AvailableDelegationsResult) IsEmpty() bool {
// availableDelegationsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (adr AvailableDelegationsResult) availableDelegationsResultPreparer() (*http.Request, error) {
+func (adr AvailableDelegationsResult) availableDelegationsResultPreparer(ctx context.Context) (*http.Request, error) {
if adr.NextLink == nil || len(to.String(adr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(adr.NextLink)))
@@ -4658,14 +4979,24 @@ func (adr AvailableDelegationsResult) availableDelegationsResultPreparer() (*htt
// AvailableDelegationsResultPage contains a page of AvailableDelegation values.
type AvailableDelegationsResultPage struct {
- fn func(AvailableDelegationsResult) (AvailableDelegationsResult, error)
+ fn func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)
adr AvailableDelegationsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AvailableDelegationsResultPage) Next() error {
- next, err := page.fn(page.adr)
+func (page *AvailableDelegationsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AvailableDelegationsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.adr)
if err != nil {
return err
}
@@ -4673,6 +5004,13 @@ func (page *AvailableDelegationsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AvailableDelegationsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AvailableDelegationsResultPage) NotDone() bool {
return !page.adr.IsEmpty()
@@ -4691,6 +5029,11 @@ func (page AvailableDelegationsResultPage) Values() []AvailableDelegation {
return *page.adr.Value
}
+// Creates a new instance of the AvailableDelegationsResultPage type.
+func NewAvailableDelegationsResultPage(getNextPage func(context.Context, AvailableDelegationsResult) (AvailableDelegationsResult, error)) AvailableDelegationsResultPage {
+ return AvailableDelegationsResultPage{fn: getNextPage}
+}
+
// AvailableProvidersList list of available countries with details.
type AvailableProvidersList struct {
autorest.Response `json:"-"`
@@ -4716,7 +5059,8 @@ type AvailableProvidersListCountry struct {
States *[]AvailableProvidersListState `json:"states,omitempty"`
}
-// AvailableProvidersListParameters constraints that determine the list of available Internet service providers.
+// AvailableProvidersListParameters constraints that determine the list of available Internet service
+// providers.
type AvailableProvidersListParameters struct {
// AzureLocations - A list of Azure regions.
AzureLocations *[]string `json:"azureLocations,omitempty"`
@@ -4739,11 +5083,11 @@ type AvailableProvidersListState struct {
}
// AzureAsyncOperationResult the response body contains the status of the specified asynchronous operation,
-// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the
-// HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation
-// succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous
-// operation failed, the response body includes the HTTP status code for the failed request and error information
-// regarding the failure.
+// indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct
+// from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous
+// operation succeeded, the response body includes the HTTP status code for the successful request. If the
+// asynchronous operation failed, the response body includes the HTTP status code for the failed request
+// and error information regarding the failure.
type AzureAsyncOperationResult struct {
// Status - Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. Possible values include: 'OperationStatusInProgress', 'OperationStatusSucceeded', 'OperationStatusFailed'
Status OperationStatus `json:"status,omitempty"`
@@ -5120,20 +5464,31 @@ type AzureFirewallFqdnTagListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag values.
+// AzureFirewallFqdnTagListResultIterator provides access to a complete listing of AzureFirewallFqdnTag
+// values.
type AzureFirewallFqdnTagListResultIterator struct {
i int
page AzureFirewallFqdnTagListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
+func (iter *AzureFirewallFqdnTagListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5142,6 +5497,13 @@ func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AzureFirewallFqdnTagListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AzureFirewallFqdnTagListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5161,6 +5523,11 @@ func (iter AzureFirewallFqdnTagListResultIterator) Value() AzureFirewallFqdnTag
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AzureFirewallFqdnTagListResultIterator type.
+func NewAzureFirewallFqdnTagListResultIterator(page AzureFirewallFqdnTagListResultPage) AzureFirewallFqdnTagListResultIterator {
+ return AzureFirewallFqdnTagListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
return afftlr.Value == nil || len(*afftlr.Value) == 0
@@ -5168,11 +5535,11 @@ func (afftlr AzureFirewallFqdnTagListResult) IsEmpty() bool {
// azureFirewallFqdnTagListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer() (*http.Request, error) {
+func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPreparer(ctx context.Context) (*http.Request, error) {
if afftlr.NextLink == nil || len(to.String(afftlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(afftlr.NextLink)))
@@ -5180,14 +5547,24 @@ func (afftlr AzureFirewallFqdnTagListResult) azureFirewallFqdnTagListResultPrepa
// AzureFirewallFqdnTagListResultPage contains a page of AzureFirewallFqdnTag values.
type AzureFirewallFqdnTagListResultPage struct {
- fn func(AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
+ fn func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)
afftlr AzureFirewallFqdnTagListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AzureFirewallFqdnTagListResultPage) Next() error {
- next, err := page.fn(page.afftlr)
+func (page *AzureFirewallFqdnTagListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallFqdnTagListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.afftlr)
if err != nil {
return err
}
@@ -5195,6 +5572,13 @@ func (page *AzureFirewallFqdnTagListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AzureFirewallFqdnTagListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AzureFirewallFqdnTagListResultPage) NotDone() bool {
return !page.afftlr.IsEmpty()
@@ -5213,6 +5597,11 @@ func (page AzureFirewallFqdnTagListResultPage) Values() []AzureFirewallFqdnTag {
return *page.afftlr.Value
}
+// Creates a new instance of the AzureFirewallFqdnTagListResultPage type.
+func NewAzureFirewallFqdnTagListResultPage(getNextPage func(context.Context, AzureFirewallFqdnTagListResult) (AzureFirewallFqdnTagListResult, error)) AzureFirewallFqdnTagListResultPage {
+ return AzureFirewallFqdnTagListResultPage{fn: getNextPage}
+}
+
// AzureFirewallFqdnTagPropertiesFormat azure Firewall FQDN Tag Properties
type AzureFirewallFqdnTagPropertiesFormat struct {
// ProvisioningState - The provisioning state of the resource.
@@ -5328,14 +5717,24 @@ type AzureFirewallListResultIterator struct {
page AzureFirewallListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AzureFirewallListResultIterator) Next() error {
+func (iter *AzureFirewallListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5344,6 +5743,13 @@ func (iter *AzureFirewallListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AzureFirewallListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AzureFirewallListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5363,6 +5769,11 @@ func (iter AzureFirewallListResultIterator) Value() AzureFirewall {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AzureFirewallListResultIterator type.
+func NewAzureFirewallListResultIterator(page AzureFirewallListResultPage) AzureFirewallListResultIterator {
+ return AzureFirewallListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (aflr AzureFirewallListResult) IsEmpty() bool {
return aflr.Value == nil || len(*aflr.Value) == 0
@@ -5370,11 +5781,11 @@ func (aflr AzureFirewallListResult) IsEmpty() bool {
// azureFirewallListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (aflr AzureFirewallListResult) azureFirewallListResultPreparer() (*http.Request, error) {
+func (aflr AzureFirewallListResult) azureFirewallListResultPreparer(ctx context.Context) (*http.Request, error) {
if aflr.NextLink == nil || len(to.String(aflr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(aflr.NextLink)))
@@ -5382,14 +5793,24 @@ func (aflr AzureFirewallListResult) azureFirewallListResultPreparer() (*http.Req
// AzureFirewallListResultPage contains a page of AzureFirewall values.
type AzureFirewallListResultPage struct {
- fn func(AzureFirewallListResult) (AzureFirewallListResult, error)
+ fn func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)
aflr AzureFirewallListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AzureFirewallListResultPage) Next() error {
- next, err := page.fn(page.aflr)
+func (page *AzureFirewallListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AzureFirewallListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.aflr)
if err != nil {
return err
}
@@ -5397,6 +5818,13 @@ func (page *AzureFirewallListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AzureFirewallListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AzureFirewallListResultPage) NotDone() bool {
return !page.aflr.IsEmpty()
@@ -5415,6 +5843,11 @@ func (page AzureFirewallListResultPage) Values() []AzureFirewall {
return *page.aflr.Value
}
+// Creates a new instance of the AzureFirewallListResultPage type.
+func NewAzureFirewallListResultPage(getNextPage func(context.Context, AzureFirewallListResult) (AzureFirewallListResult, error)) AzureFirewallListResultPage {
+ return AzureFirewallListResultPage{fn: getNextPage}
+}
+
// AzureFirewallNatRCAction azureFirewall NAT Rule Collection Action.
type AzureFirewallNatRCAction struct {
// Type - The type of action. Possible values include: 'Snat', 'Dnat'
@@ -5661,8 +6094,8 @@ type AzureFirewallRCAction struct {
Type AzureFirewallRCActionType `json:"type,omitempty"`
}
-// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// AzureFirewallsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type AzureFirewallsCreateOrUpdateFuture struct {
azure.Future
}
@@ -5690,7 +6123,8 @@ func (future *AzureFirewallsCreateOrUpdateFuture) Result(client AzureFirewallsCl
return
}
-// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// AzureFirewallsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type AzureFirewallsDeleteFuture struct {
azure.Future
}
@@ -6017,20 +6451,31 @@ type BgpServiceCommunityListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity values.
+// BgpServiceCommunityListResultIterator provides access to a complete listing of BgpServiceCommunity
+// values.
type BgpServiceCommunityListResultIterator struct {
i int
page BgpServiceCommunityListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *BgpServiceCommunityListResultIterator) Next() error {
+func (iter *BgpServiceCommunityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6039,6 +6484,13 @@ func (iter *BgpServiceCommunityListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *BgpServiceCommunityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter BgpServiceCommunityListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6058,6 +6510,11 @@ func (iter BgpServiceCommunityListResultIterator) Value() BgpServiceCommunity {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the BgpServiceCommunityListResultIterator type.
+func NewBgpServiceCommunityListResultIterator(page BgpServiceCommunityListResultPage) BgpServiceCommunityListResultIterator {
+ return BgpServiceCommunityListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
return bsclr.Value == nil || len(*bsclr.Value) == 0
@@ -6065,11 +6522,11 @@ func (bsclr BgpServiceCommunityListResult) IsEmpty() bool {
// bgpServiceCommunityListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer() (*http.Request, error) {
+func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer(ctx context.Context) (*http.Request, error) {
if bsclr.NextLink == nil || len(to.String(bsclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(bsclr.NextLink)))
@@ -6077,14 +6534,24 @@ func (bsclr BgpServiceCommunityListResult) bgpServiceCommunityListResultPreparer
// BgpServiceCommunityListResultPage contains a page of BgpServiceCommunity values.
type BgpServiceCommunityListResultPage struct {
- fn func(BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
+ fn func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)
bsclr BgpServiceCommunityListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *BgpServiceCommunityListResultPage) Next() error {
- next, err := page.fn(page.bsclr)
+func (page *BgpServiceCommunityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BgpServiceCommunityListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.bsclr)
if err != nil {
return err
}
@@ -6092,6 +6559,13 @@ func (page *BgpServiceCommunityListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *BgpServiceCommunityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page BgpServiceCommunityListResultPage) NotDone() bool {
return !page.bsclr.IsEmpty()
@@ -6110,6 +6584,11 @@ func (page BgpServiceCommunityListResultPage) Values() []BgpServiceCommunity {
return *page.bsclr.Value
}
+// Creates a new instance of the BgpServiceCommunityListResultPage type.
+func NewBgpServiceCommunityListResultPage(getNextPage func(context.Context, BgpServiceCommunityListResult) (BgpServiceCommunityListResult, error)) BgpServiceCommunityListResultPage {
+ return BgpServiceCommunityListResultPage{fn: getNextPage}
+}
+
// BgpServiceCommunityPropertiesFormat properties of Service Community.
type BgpServiceCommunityPropertiesFormat struct {
// ServiceName - The name of the bgp community. e.g. Skype.
@@ -6132,24 +6611,41 @@ type BgpSettings struct {
type ConfigurationDiagnosticParameters struct {
// TargetResourceID - The ID of the target resource to perform network configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and Application Gateway.
TargetResourceID *string `json:"targetResourceId,omitempty"`
- // Queries - List of traffic queries.
- Queries *[]TrafficQuery `json:"queries,omitempty"`
-}
-
-// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
-type ConfigurationDiagnosticResponse struct {
- autorest.Response `json:"-"`
- // Results - List of network configuration diagnostic results.
- Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
+ // VerbosityLevel - Verbosity level. Accepted values are 'Normal', 'Minimum', 'Full'. Possible values include: 'Normal', 'Minimum', 'Full'
+ VerbosityLevel VerbosityLevel `json:"verbosityLevel,omitempty"`
+ // Profiles - List of network configuration diagnostic profiles.
+ Profiles *[]ConfigurationDiagnosticProfile `json:"profiles,omitempty"`
}
-// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic query.
-type ConfigurationDiagnosticResult struct {
- TrafficQuery *TrafficQuery `json:"trafficQuery,omitempty"`
- NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
-}
-
-// ConnectionMonitor parameters that define the operation to create a connection monitor.
+// ConfigurationDiagnosticProfile parameters to compare with network configuration.
+type ConfigurationDiagnosticProfile struct {
+ // Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
+ Direction Direction `json:"direction,omitempty"`
+ // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
+ Protocol *string `json:"protocol,omitempty"`
+ // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
+ Source *string `json:"source,omitempty"`
+ // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
+ Destination *string `json:"destination,omitempty"`
+ // DestinationPort - Traffice destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
+ DestinationPort *string `json:"destinationPort,omitempty"`
+}
+
+// ConfigurationDiagnosticResponse results of network configuration diagnostic on the target resource.
+type ConfigurationDiagnosticResponse struct {
+ autorest.Response `json:"-"`
+ // Results - List of network configuration diagnostic results.
+ Results *[]ConfigurationDiagnosticResult `json:"results,omitempty"`
+}
+
+// ConfigurationDiagnosticResult network configuration diagnostic result corresponded to provided traffic
+// query.
+type ConfigurationDiagnosticResult struct {
+ Profile *ConfigurationDiagnosticProfile `json:"profile,omitempty"`
+ NetworkSecurityGroupResult *SecurityGroupResult `json:"networkSecurityGroupResult,omitempty"`
+}
+
+// ConnectionMonitor parameters that define the operation to create a connection monitor.
type ConnectionMonitor struct {
// Location - Connection monitor location.
Location *string `json:"location,omitempty"`
@@ -6418,8 +6914,8 @@ func (future *ConnectionMonitorsCreateOrUpdateFuture) Result(client ConnectionMo
return
}
-// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ConnectionMonitorsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ConnectionMonitorsDeleteFuture struct {
azure.Future
}
@@ -6834,7 +7330,8 @@ func (cnic *ContainerNetworkInterfaceConfiguration) UnmarshalJSON(body []byte) e
return nil
}
-// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration properties.
+// ContainerNetworkInterfaceConfigurationPropertiesFormat container network interface configuration
+// properties.
type ContainerNetworkInterfaceConfigurationPropertiesFormat struct {
// IPConfigurations - A list of ip configurations of the container network interface configuration.
IPConfigurations *[]IPConfigurationProfile `json:"ipConfigurations,omitempty"`
@@ -6925,8 +7422,8 @@ func (cniic *ContainerNetworkInterfaceIPConfiguration) UnmarshalJSON(body []byte
return nil
}
-// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface IP
-// configuration.
+// ContainerNetworkInterfaceIPConfigurationPropertiesFormat properties of the container network interface
+// IP configuration.
type ContainerNetworkInterfaceIPConfigurationPropertiesFormat struct {
// ProvisioningState - The provisioning state of the resource.
ProvisioningState *string `json:"provisioningState,omitempty"`
@@ -7083,14 +7580,24 @@ type DdosProtectionPlanListResultIterator struct {
page DdosProtectionPlanListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DdosProtectionPlanListResultIterator) Next() error {
+func (iter *DdosProtectionPlanListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7099,6 +7606,13 @@ func (iter *DdosProtectionPlanListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DdosProtectionPlanListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DdosProtectionPlanListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7118,6 +7632,11 @@ func (iter DdosProtectionPlanListResultIterator) Value() DdosProtectionPlan {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DdosProtectionPlanListResultIterator type.
+func NewDdosProtectionPlanListResultIterator(page DdosProtectionPlanListResultPage) DdosProtectionPlanListResultIterator {
+ return DdosProtectionPlanListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
return dpplr.Value == nil || len(*dpplr.Value) == 0
@@ -7125,11 +7644,11 @@ func (dpplr DdosProtectionPlanListResult) IsEmpty() bool {
// ddosProtectionPlanListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer() (*http.Request, error) {
+func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer(ctx context.Context) (*http.Request, error) {
if dpplr.NextLink == nil || len(to.String(dpplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dpplr.NextLink)))
@@ -7137,14 +7656,24 @@ func (dpplr DdosProtectionPlanListResult) ddosProtectionPlanListResultPreparer()
// DdosProtectionPlanListResultPage contains a page of DdosProtectionPlan values.
type DdosProtectionPlanListResultPage struct {
- fn func(DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
+ fn func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)
dpplr DdosProtectionPlanListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DdosProtectionPlanListResultPage) Next() error {
- next, err := page.fn(page.dpplr)
+func (page *DdosProtectionPlanListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DdosProtectionPlanListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dpplr)
if err != nil {
return err
}
@@ -7152,6 +7681,13 @@ func (page *DdosProtectionPlanListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DdosProtectionPlanListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DdosProtectionPlanListResultPage) NotDone() bool {
return !page.dpplr.IsEmpty()
@@ -7170,6 +7706,11 @@ func (page DdosProtectionPlanListResultPage) Values() []DdosProtectionPlan {
return *page.dpplr.Value
}
+// Creates a new instance of the DdosProtectionPlanListResultPage type.
+func NewDdosProtectionPlanListResultPage(getNextPage func(context.Context, DdosProtectionPlanListResult) (DdosProtectionPlanListResult, error)) DdosProtectionPlanListResultPage {
+ return DdosProtectionPlanListResultPage{fn: getNextPage}
+}
+
// DdosProtectionPlanPropertiesFormat dDoS protection plan properties.
type DdosProtectionPlanPropertiesFormat struct {
// ResourceGUID - The resource GUID property of the DDoS protection plan resource. It uniquely identifies the resource, even if the user changes its name or migrate the resource across subscriptions or resource groups.
@@ -7209,8 +7750,8 @@ func (future *DdosProtectionPlansCreateOrUpdateFuture) Result(client DdosProtect
return
}
-// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// DdosProtectionPlansDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type DdosProtectionPlansDeleteFuture struct {
azure.Future
}
@@ -7323,8 +7864,8 @@ type DeviceProperties struct {
LinkSpeedInMbps *int32 `json:"linkSpeedInMbps,omitempty"`
}
-// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network.
-// Standard DHCP option for a subnet overrides VNET DHCP options.
+// DhcpOptions dhcpOptions contains an array of DNS servers available to VMs deployed in the virtual
+// network. Standard DHCP option for a subnet overrides VNET DHCP options.
type DhcpOptions struct {
// DNSServers - The list of DNS servers IP addresses.
DNSServers *[]string `json:"dnsServers,omitempty"`
@@ -7385,7 +7926,8 @@ type EffectiveNetworkSecurityGroupAssociation struct {
NetworkInterface *SubResource `json:"networkInterface,omitempty"`
}
-// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service call.
+// EffectiveNetworkSecurityGroupListResult response for list effective network security groups API service
+// call.
type EffectiveNetworkSecurityGroupListResult struct {
autorest.Response `json:"-"`
// Value - A list of effective network security groups.
@@ -7478,20 +8020,31 @@ type EndpointServicesListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult values.
+// EndpointServicesListResultIterator provides access to a complete listing of EndpointServiceResult
+// values.
type EndpointServicesListResultIterator struct {
i int
page EndpointServicesListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EndpointServicesListResultIterator) Next() error {
+func (iter *EndpointServicesListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7500,6 +8053,13 @@ func (iter *EndpointServicesListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EndpointServicesListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EndpointServicesListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7519,6 +8079,11 @@ func (iter EndpointServicesListResultIterator) Value() EndpointServiceResult {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EndpointServicesListResultIterator type.
+func NewEndpointServicesListResultIterator(page EndpointServicesListResultPage) EndpointServicesListResultIterator {
+ return EndpointServicesListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (eslr EndpointServicesListResult) IsEmpty() bool {
return eslr.Value == nil || len(*eslr.Value) == 0
@@ -7526,11 +8091,11 @@ func (eslr EndpointServicesListResult) IsEmpty() bool {
// endpointServicesListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*http.Request, error) {
+func (eslr EndpointServicesListResult) endpointServicesListResultPreparer(ctx context.Context) (*http.Request, error) {
if eslr.NextLink == nil || len(to.String(eslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(eslr.NextLink)))
@@ -7538,14 +8103,24 @@ func (eslr EndpointServicesListResult) endpointServicesListResultPreparer() (*ht
// EndpointServicesListResultPage contains a page of EndpointServiceResult values.
type EndpointServicesListResultPage struct {
- fn func(EndpointServicesListResult) (EndpointServicesListResult, error)
+ fn func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)
eslr EndpointServicesListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EndpointServicesListResultPage) Next() error {
- next, err := page.fn(page.eslr)
+func (page *EndpointServicesListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EndpointServicesListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.eslr)
if err != nil {
return err
}
@@ -7553,6 +8128,13 @@ func (page *EndpointServicesListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EndpointServicesListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EndpointServicesListResultPage) NotDone() bool {
return !page.eslr.IsEmpty()
@@ -7571,6 +8153,11 @@ func (page EndpointServicesListResultPage) Values() []EndpointServiceResult {
return *page.eslr.Value
}
+// Creates a new instance of the EndpointServicesListResultPage type.
+func NewEndpointServicesListResultPage(getNextPage func(context.Context, EndpointServicesListResult) (EndpointServicesListResult, error)) EndpointServicesListResultPage {
+ return EndpointServicesListResultPage{fn: getNextPage}
+}
+
// Error ...
type Error struct {
Code *string `json:"code,omitempty"`
@@ -7595,8 +8182,10 @@ type ErrorResponse struct {
// EvaluatedNetworkSecurityGroup results of network security group evaluation.
type EvaluatedNetworkSecurityGroup struct {
// NetworkSecurityGroupID - Network security group ID.
- NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
- MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
+ NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty"`
+ // AppliedTo - Resource ID of nic or subnet to which network security group is applied.
+ AppliedTo *string `json:"appliedTo,omitempty"`
+ MatchedRule *MatchedRule `json:"matchedRule,omitempty"`
// RulesEvaluationResult - List of network security rules evaluation results.
RulesEvaluationResult *[]SecurityRulesEvaluationResult `json:"rulesEvaluationResult,omitempty"`
}
@@ -7831,8 +8420,8 @@ func (erca *ExpressRouteCircuitAuthorization) UnmarshalJSON(body []byte) error {
return nil
}
-// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -7860,8 +8449,8 @@ func (future *ExpressRouteCircuitAuthorizationsCreateOrUpdateFuture) Result(clie
return
}
-// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCircuitAuthorizationsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ExpressRouteCircuitAuthorizationsDeleteFuture struct {
azure.Future
}
@@ -7883,7 +8472,8 @@ func (future *ExpressRouteCircuitAuthorizationsDeleteFuture) Result(client Expre
return
}
-// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering resource.
+// ExpressRouteCircuitConnection express Route Circuit Connection in an ExpressRouteCircuitPeering
+// resource.
type ExpressRouteCircuitConnection struct {
autorest.Response `json:"-"`
*ExpressRouteCircuitConnectionPropertiesFormat `json:"properties,omitempty"`
@@ -7976,12 +8566,12 @@ type ExpressRouteCircuitConnectionPropertiesFormat struct {
AuthorizationKey *string `json:"authorizationKey,omitempty"`
// CircuitConnectionStatus - Express Route Circuit Connection State. Possible values are: 'Connected' and 'Disconnected'. Possible values include: 'Connected', 'Connecting', 'Disconnected'
CircuitConnectionStatus CircuitConnectionStatus `json:"circuitConnectionStatus,omitempty"`
- // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeded', 'Updating', 'Deleting', and 'Failed'.
+ // ProvisioningState - Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCircuitConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCircuitConnectionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -8041,20 +8631,31 @@ type ExpressRouteCircuitListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit values.
+// ExpressRouteCircuitListResultIterator provides access to a complete listing of ExpressRouteCircuit
+// values.
type ExpressRouteCircuitListResultIterator struct {
i int
page ExpressRouteCircuitListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExpressRouteCircuitListResultIterator) Next() error {
+func (iter *ExpressRouteCircuitListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -8063,6 +8664,13 @@ func (iter *ExpressRouteCircuitListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteCircuitListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExpressRouteCircuitListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -8082,6 +8690,11 @@ func (iter ExpressRouteCircuitListResultIterator) Value() ExpressRouteCircuit {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExpressRouteCircuitListResultIterator type.
+func NewExpressRouteCircuitListResultIterator(page ExpressRouteCircuitListResultPage) ExpressRouteCircuitListResultIterator {
+ return ExpressRouteCircuitListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
return erclr.Value == nil || len(*erclr.Value) == 0
@@ -8089,11 +8702,11 @@ func (erclr ExpressRouteCircuitListResult) IsEmpty() bool {
// expressRouteCircuitListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer() (*http.Request, error) {
+func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer(ctx context.Context) (*http.Request, error) {
if erclr.NextLink == nil || len(to.String(erclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(erclr.NextLink)))
@@ -8101,14 +8714,24 @@ func (erclr ExpressRouteCircuitListResult) expressRouteCircuitListResultPreparer
// ExpressRouteCircuitListResultPage contains a page of ExpressRouteCircuit values.
type ExpressRouteCircuitListResultPage struct {
- fn func(ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
+ fn func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)
erclr ExpressRouteCircuitListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExpressRouteCircuitListResultPage) Next() error {
- next, err := page.fn(page.erclr)
+func (page *ExpressRouteCircuitListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.erclr)
if err != nil {
return err
}
@@ -8116,6 +8739,13 @@ func (page *ExpressRouteCircuitListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteCircuitListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExpressRouteCircuitListResultPage) NotDone() bool {
return !page.erclr.IsEmpty()
@@ -8134,6 +8764,11 @@ func (page ExpressRouteCircuitListResultPage) Values() []ExpressRouteCircuit {
return *page.erclr.Value
}
+// Creates a new instance of the ExpressRouteCircuitListResultPage type.
+func NewExpressRouteCircuitListResultPage(getNextPage func(context.Context, ExpressRouteCircuitListResult) (ExpressRouteCircuitListResult, error)) ExpressRouteCircuitListResultPage {
+ return ExpressRouteCircuitListResultPage{fn: getNextPage}
+}
+
// ExpressRouteCircuitPeering peering in an ExpressRouteCircuit resource.
type ExpressRouteCircuitPeering struct {
autorest.Response `json:"-"`
@@ -8219,7 +8854,7 @@ func (ercp *ExpressRouteCircuitPeering) UnmarshalJSON(body []byte) error {
type ExpressRouteCircuitPeeringConfig struct {
// AdvertisedPublicPrefixes - The reference of AdvertisedPublicPrefixes.
AdvertisedPublicPrefixes *[]string `json:"advertisedPublicPrefixes,omitempty"`
- // AdvertisedCommunities - The communities of bgp peering. Spepcified for microsoft peering
+ // AdvertisedCommunities - The communities of bgp peering. Specified for microsoft peering
AdvertisedCommunities *[]string `json:"advertisedCommunities,omitempty"`
// AdvertisedPublicPrefixesState - AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. Possible values include: 'NotConfigured', 'Configuring', 'Configured', 'ValidationNeeded'
AdvertisedPublicPrefixesState ExpressRouteCircuitPeeringAdvertisedPublicPrefixState `json:"advertisedPublicPrefixesState,omitempty"`
@@ -8237,8 +8872,8 @@ type ExpressRouteCircuitPeeringID struct {
ID *string `json:"id,omitempty"`
}
-// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings that
-// belong to an ExpressRouteCircuit.
+// ExpressRouteCircuitPeeringListResult response for ListPeering API service call retrieves all peerings
+// that belong to an ExpressRouteCircuit.
type ExpressRouteCircuitPeeringListResult struct {
autorest.Response `json:"-"`
// Value - The peerings in an express route circuit.
@@ -8247,21 +8882,31 @@ type ExpressRouteCircuitPeeringListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of ExpressRouteCircuitPeering
-// values.
+// ExpressRouteCircuitPeeringListResultIterator provides access to a complete listing of
+// ExpressRouteCircuitPeering values.
type ExpressRouteCircuitPeeringListResultIterator struct {
i int
page ExpressRouteCircuitPeeringListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
+func (iter *ExpressRouteCircuitPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -8270,6 +8915,13 @@ func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteCircuitPeeringListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExpressRouteCircuitPeeringListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -8289,6 +8941,11 @@ func (iter ExpressRouteCircuitPeeringListResultIterator) Value() ExpressRouteCir
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExpressRouteCircuitPeeringListResultIterator type.
+func NewExpressRouteCircuitPeeringListResultIterator(page ExpressRouteCircuitPeeringListResultPage) ExpressRouteCircuitPeeringListResultIterator {
+ return ExpressRouteCircuitPeeringListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
return ercplr.Value == nil || len(*ercplr.Value) == 0
@@ -8296,11 +8953,11 @@ func (ercplr ExpressRouteCircuitPeeringListResult) IsEmpty() bool {
// expressRouteCircuitPeeringListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer() (*http.Request, error) {
+func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
if ercplr.NextLink == nil || len(to.String(ercplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ercplr.NextLink)))
@@ -8308,14 +8965,24 @@ func (ercplr ExpressRouteCircuitPeeringListResult) expressRouteCircuitPeeringLis
// ExpressRouteCircuitPeeringListResultPage contains a page of ExpressRouteCircuitPeering values.
type ExpressRouteCircuitPeeringListResultPage struct {
- fn func(ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
+ fn func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)
ercplr ExpressRouteCircuitPeeringListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
- next, err := page.fn(page.ercplr)
+func (page *ExpressRouteCircuitPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCircuitPeeringListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ercplr)
if err != nil {
return err
}
@@ -8323,6 +8990,13 @@ func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteCircuitPeeringListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExpressRouteCircuitPeeringListResultPage) NotDone() bool {
return !page.ercplr.IsEmpty()
@@ -8341,6 +9015,11 @@ func (page ExpressRouteCircuitPeeringListResultPage) Values() []ExpressRouteCirc
return *page.ercplr.Value
}
+// Creates a new instance of the ExpressRouteCircuitPeeringListResultPage type.
+func NewExpressRouteCircuitPeeringListResultPage(getNextPage func(context.Context, ExpressRouteCircuitPeeringListResult) (ExpressRouteCircuitPeeringListResult, error)) ExpressRouteCircuitPeeringListResultPage {
+ return ExpressRouteCircuitPeeringListResultPage{fn: getNextPage}
+}
+
// ExpressRouteCircuitPeeringPropertiesFormat ...
type ExpressRouteCircuitPeeringPropertiesFormat struct {
// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
@@ -8383,8 +9062,8 @@ type ExpressRouteCircuitPeeringPropertiesFormat struct {
Connections *[]ExpressRouteCircuitConnection `json:"connections,omitempty"`
}
-// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCircuitPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ExpressRouteCircuitPeeringsCreateOrUpdateFuture struct {
azure.Future
}
@@ -8453,6 +9132,12 @@ type ExpressRouteCircuitPropertiesFormat struct {
ServiceProviderNotes *string `json:"serviceProviderNotes,omitempty"`
// ServiceProviderProperties - The ServiceProviderProperties.
ServiceProviderProperties *ExpressRouteCircuitServiceProviderProperties `json:"serviceProviderProperties,omitempty"`
+ // ExpressRoutePort - The reference to the ExpressRoutePort resource when the circuit is provisioned on an ExpressRoutePort resource.
+ ExpressRoutePort *SubResource `json:"expressRoutePort,omitempty"`
+ // BandwidthInGbps - The bandwidth of the circuit when the circuit is provisioned on an ExpressRoutePort resource.
+ BandwidthInGbps *float64 `json:"bandwidthInGbps,omitempty"`
+ // Stag - The identifier of the circuit traffic. Outer tag for QinQ encapsulation.
+ Stag *int32 `json:"stag,omitempty"`
// ProvisioningState - Gets the provisioning state of the public IP resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
ProvisioningState *string `json:"provisioningState,omitempty"`
// GatewayManagerEtag - The GatewayManager Etag.
@@ -8495,7 +9180,8 @@ type ExpressRouteCircuitRoutesTableSummary struct {
StatePfxRcd *string `json:"statePfxRcd,omitempty"`
}
-// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route Circuits API.
+// ExpressRouteCircuitsArpTableListResult response for ListArpTable associated with the Express Route
+// Circuits API.
type ExpressRouteCircuitsArpTableListResult struct {
autorest.Response `json:"-"`
// Value - Gets list of the ARP table.
@@ -8533,8 +9219,8 @@ func (future *ExpressRouteCircuitsCreateOrUpdateFuture) Result(client ExpressRou
return
}
-// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ExpressRouteCircuitsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ExpressRouteCircuitsDeleteFuture struct {
azure.Future
}
@@ -8556,7 +9242,8 @@ func (future *ExpressRouteCircuitsDeleteFuture) Result(client ExpressRouteCircui
return
}
-// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an ExpressRouteCircuit.
+// ExpressRouteCircuitServiceProviderProperties contains ServiceProviderProperties in an
+// ExpressRouteCircuit.
type ExpressRouteCircuitServiceProviderProperties struct {
// ServiceProviderName - The serviceProviderName.
ServiceProviderName *string `json:"serviceProviderName,omitempty"`
@@ -8570,7 +9257,7 @@ type ExpressRouteCircuitServiceProviderProperties struct {
type ExpressRouteCircuitSku struct {
// Name - The name of the SKU.
Name *string `json:"name,omitempty"`
- // Tier - The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium'
+ // Tier - The tier of the SKU. Possible values are 'Standard', 'Premium' or 'Basic'. Possible values include: 'ExpressRouteCircuitSkuTierStandard', 'ExpressRouteCircuitSkuTierPremium', 'ExpressRouteCircuitSkuTierBasic'
Tier ExpressRouteCircuitSkuTier `json:"tier,omitempty"`
// Family - The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. Possible values include: 'UnlimitedData', 'MeteredData'
Family ExpressRouteCircuitSkuFamily `json:"family,omitempty"`
@@ -8634,8 +9321,8 @@ func (future *ExpressRouteCircuitsListRoutesTableFuture) Result(client ExpressRo
return
}
-// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCircuitsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCircuitsListRoutesTableSummaryFuture struct {
azure.Future
}
@@ -8673,8 +9360,8 @@ type ExpressRouteCircuitsRoutesTableListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the Express Route
-// Circuits API.
+// ExpressRouteCircuitsRoutesTableSummaryListResult response for ListRoutesTable associated with the
+// Express Route Circuits API.
type ExpressRouteCircuitsRoutesTableSummaryListResult struct {
autorest.Response `json:"-"`
// Value - A list of the routes table.
@@ -8696,8 +9383,8 @@ type ExpressRouteCircuitStats struct {
SecondarybytesOut *int64 `json:"secondarybytesOut,omitempty"`
}
-// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ExpressRouteCircuitsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ExpressRouteCircuitsUpdateTagsFuture struct {
azure.Future
}
@@ -8817,8 +9504,8 @@ type ExpressRouteConnectionProperties struct {
RoutingWeight *int32 `json:"routingWeight,omitempty"`
}
-// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type ExpressRouteConnectionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -8846,8 +9533,8 @@ func (future *ExpressRouteConnectionsCreateOrUpdateFuture) Result(client Express
return
}
-// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ExpressRouteConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ExpressRouteConnectionsDeleteFuture struct {
azure.Future
}
@@ -9008,14 +9695,24 @@ type ExpressRouteCrossConnectionListResultIterator struct {
page ExpressRouteCrossConnectionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
+func (iter *ExpressRouteCrossConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9024,6 +9721,13 @@ func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteCrossConnectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExpressRouteCrossConnectionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9043,6 +9747,11 @@ func (iter ExpressRouteCrossConnectionListResultIterator) Value() ExpressRouteCr
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExpressRouteCrossConnectionListResultIterator type.
+func NewExpressRouteCrossConnectionListResultIterator(page ExpressRouteCrossConnectionListResultPage) ExpressRouteCrossConnectionListResultIterator {
+ return ExpressRouteCrossConnectionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
return ercclr.Value == nil || len(*ercclr.Value) == 0
@@ -9050,11 +9759,11 @@ func (ercclr ExpressRouteCrossConnectionListResult) IsEmpty() bool {
// expressRouteCrossConnectionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer() (*http.Request, error) {
+func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
if ercclr.NextLink == nil || len(to.String(ercclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ercclr.NextLink)))
@@ -9062,14 +9771,24 @@ func (ercclr ExpressRouteCrossConnectionListResult) expressRouteCrossConnectionL
// ExpressRouteCrossConnectionListResultPage contains a page of ExpressRouteCrossConnection values.
type ExpressRouteCrossConnectionListResultPage struct {
- fn func(ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
+ fn func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)
ercclr ExpressRouteCrossConnectionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
- next, err := page.fn(page.ercclr)
+func (page *ExpressRouteCrossConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ercclr)
if err != nil {
return err
}
@@ -9077,6 +9796,13 @@ func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteCrossConnectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExpressRouteCrossConnectionListResultPage) NotDone() bool {
return !page.ercclr.IsEmpty()
@@ -9095,6 +9821,11 @@ func (page ExpressRouteCrossConnectionListResultPage) Values() []ExpressRouteCro
return *page.ercclr.Value
}
+// Creates a new instance of the ExpressRouteCrossConnectionListResultPage type.
+func NewExpressRouteCrossConnectionListResultPage(getNextPage func(context.Context, ExpressRouteCrossConnectionListResult) (ExpressRouteCrossConnectionListResult, error)) ExpressRouteCrossConnectionListResultPage {
+ return ExpressRouteCrossConnectionListResultPage{fn: getNextPage}
+}
+
// ExpressRouteCrossConnectionPeering peering in an ExpressRoute Cross Connection resource.
type ExpressRouteCrossConnectionPeering struct {
autorest.Response `json:"-"`
@@ -9176,8 +9907,8 @@ func (erccp *ExpressRouteCrossConnectionPeering) UnmarshalJSON(body []byte) erro
return nil
}
-// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings that
-// belong to an ExpressRouteCrossConnection.
+// ExpressRouteCrossConnectionPeeringList response for ListPeering API service call retrieves all peerings
+// that belong to an ExpressRouteCrossConnection.
type ExpressRouteCrossConnectionPeeringList struct {
autorest.Response `json:"-"`
// Value - The peerings in an express route cross connection.
@@ -9193,14 +9924,24 @@ type ExpressRouteCrossConnectionPeeringListIterator struct {
page ExpressRouteCrossConnectionPeeringListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
+func (iter *ExpressRouteCrossConnectionPeeringListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9209,6 +9950,13 @@ func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteCrossConnectionPeeringListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExpressRouteCrossConnectionPeeringListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9228,6 +9976,11 @@ func (iter ExpressRouteCrossConnectionPeeringListIterator) Value() ExpressRouteC
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExpressRouteCrossConnectionPeeringListIterator type.
+func NewExpressRouteCrossConnectionPeeringListIterator(page ExpressRouteCrossConnectionPeeringListPage) ExpressRouteCrossConnectionPeeringListIterator {
+ return ExpressRouteCrossConnectionPeeringListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
return erccpl.Value == nil || len(*erccpl.Value) == 0
@@ -9235,11 +9988,11 @@ func (erccpl ExpressRouteCrossConnectionPeeringList) IsEmpty() bool {
// expressRouteCrossConnectionPeeringListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer() (*http.Request, error) {
+func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnectionPeeringListPreparer(ctx context.Context) (*http.Request, error) {
if erccpl.NextLink == nil || len(to.String(erccpl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(erccpl.NextLink)))
@@ -9247,14 +10000,24 @@ func (erccpl ExpressRouteCrossConnectionPeeringList) expressRouteCrossConnection
// ExpressRouteCrossConnectionPeeringListPage contains a page of ExpressRouteCrossConnectionPeering values.
type ExpressRouteCrossConnectionPeeringListPage struct {
- fn func(ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
+ fn func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)
erccpl ExpressRouteCrossConnectionPeeringList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
- next, err := page.fn(page.erccpl)
+func (page *ExpressRouteCrossConnectionPeeringListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteCrossConnectionPeeringListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.erccpl)
if err != nil {
return err
}
@@ -9262,6 +10025,13 @@ func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteCrossConnectionPeeringListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExpressRouteCrossConnectionPeeringListPage) NotDone() bool {
return !page.erccpl.IsEmpty()
@@ -9280,6 +10050,11 @@ func (page ExpressRouteCrossConnectionPeeringListPage) Values() []ExpressRouteCr
return *page.erccpl.Value
}
+// Creates a new instance of the ExpressRouteCrossConnectionPeeringListPage type.
+func NewExpressRouteCrossConnectionPeeringListPage(getNextPage func(context.Context, ExpressRouteCrossConnectionPeeringList) (ExpressRouteCrossConnectionPeeringList, error)) ExpressRouteCrossConnectionPeeringListPage {
+ return ExpressRouteCrossConnectionPeeringListPage{fn: getNextPage}
+}
+
// ExpressRouteCrossConnectionPeeringProperties ...
type ExpressRouteCrossConnectionPeeringProperties struct {
// PeeringType - The peering type. Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering'
@@ -9314,8 +10089,8 @@ type ExpressRouteCrossConnectionPeeringProperties struct {
Ipv6PeeringConfig *Ipv6ExpressRouteCircuitPeeringConfig `json:"ipv6PeeringConfig,omitempty"`
}
-// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture struct {
azure.Future
}
@@ -9343,8 +10118,8 @@ func (future *ExpressRouteCrossConnectionPeeringsCreateOrUpdateFuture) Result(cl
return
}
-// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCrossConnectionPeeringsDeleteFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ExpressRouteCrossConnectionPeeringsDeleteFuture struct {
azure.Future
}
@@ -9402,8 +10177,8 @@ type ExpressRouteCrossConnectionRoutesTableSummary struct {
StateOrPrefixesReceived *string `json:"stateOrPrefixesReceived,omitempty"`
}
-// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCrossConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCrossConnectionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -9431,8 +10206,8 @@ func (future *ExpressRouteCrossConnectionsCreateOrUpdateFuture) Result(client Ex
return
}
-// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCrossConnectionsListArpTableFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ExpressRouteCrossConnectionsListArpTableFuture struct {
azure.Future
}
@@ -9460,8 +10235,8 @@ func (future *ExpressRouteCrossConnectionsListArpTableFuture) Result(client Expr
return
}
-// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCrossConnectionsListRoutesTableFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableFuture struct {
azure.Future
}
@@ -9489,8 +10264,8 @@ func (future *ExpressRouteCrossConnectionsListRoutesTableFuture) Result(client E
return
}
-// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving the
-// results of a long-running operation.
+// ExpressRouteCrossConnectionsListRoutesTableSummaryFuture an abstraction for monitoring and retrieving
+// the results of a long-running operation.
type ExpressRouteCrossConnectionsListRoutesTableSummaryFuture struct {
azure.Future
}
@@ -9518,8 +10293,8 @@ func (future *ExpressRouteCrossConnectionsListRoutesTableSummaryFuture) Result(c
return
}
-// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with the
-// Express Route Cross Connections.
+// ExpressRouteCrossConnectionsRoutesTableSummaryListResult response for ListRoutesTable associated with
+// the Express Route Cross Connections.
type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
autorest.Response `json:"-"`
// Value - A list of the routes table.
@@ -9528,8 +10303,8 @@ type ExpressRouteCrossConnectionsRoutesTableSummaryListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ExpressRouteCrossConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type ExpressRouteCrossConnectionsUpdateTagsFuture struct {
azure.Future
}
@@ -9705,7 +10480,8 @@ type ExpressRouteGatewayPropertiesAutoScaleConfiguration struct {
Bounds *ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds `json:"bounds,omitempty"`
}
-// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to deploy.
+// ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds minimum and maximum number of scale units to
+// deploy.
type ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds struct {
// Min - Minimum number of scale units deployed for ExpressRoute gateway.
Min *int32 `json:"min,omitempty"`
@@ -9742,8 +10518,8 @@ func (future *ExpressRouteGatewaysCreateOrUpdateFuture) Result(client ExpressRou
return
}
-// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ExpressRouteGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ExpressRouteGatewaysDeleteFuture struct {
azure.Future
}
@@ -9765,47 +10541,39 @@ func (future *ExpressRouteGatewaysDeleteFuture) Result(client ExpressRouteGatewa
return
}
-// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
-type ExpressRouteServiceProvider struct {
- *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
+// ExpressRouteLink expressRouteLink child resource definition.
+type ExpressRouteLink struct {
+ autorest.Response `json:"-"`
+ // ExpressRouteLinkPropertiesFormat - ExpressRouteLink properties
+ *ExpressRouteLinkPropertiesFormat `json:"properties,omitempty"`
+ // Name - Name of child port resource that is unique among child port resources of the parent.
+ Name *string `json:"name,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
// ID - Resource ID.
ID *string `json:"id,omitempty"`
- // Name - Resource name.
- Name *string `json:"name,omitempty"`
- // Type - Resource type.
- Type *string `json:"type,omitempty"`
- // Location - Resource location.
- Location *string `json:"location,omitempty"`
- // Tags - Resource tags.
- Tags map[string]*string `json:"tags"`
}
-// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
-func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
+// MarshalJSON is the custom marshaler for ExpressRouteLink.
+func (erl ExpressRouteLink) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
- objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
- }
- if ersp.ID != nil {
- objectMap["id"] = ersp.ID
- }
- if ersp.Name != nil {
- objectMap["name"] = ersp.Name
+ if erl.ExpressRouteLinkPropertiesFormat != nil {
+ objectMap["properties"] = erl.ExpressRouteLinkPropertiesFormat
}
- if ersp.Type != nil {
- objectMap["type"] = ersp.Type
+ if erl.Name != nil {
+ objectMap["name"] = erl.Name
}
- if ersp.Location != nil {
- objectMap["location"] = ersp.Location
+ if erl.Etag != nil {
+ objectMap["etag"] = erl.Etag
}
- if ersp.Tags != nil {
- objectMap["tags"] = ersp.Tags
+ if erl.ID != nil {
+ objectMap["id"] = erl.ID
}
return json.Marshal(objectMap)
}
-// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
-func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteLink struct.
+func (erl *ExpressRouteLink) UnmarshalJSON(body []byte) error {
var m map[string]*json.RawMessage
err := json.Unmarshal(body, &m)
if err != nil {
@@ -9815,39 +10583,948 @@ func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
switch k {
case "properties":
if v != nil {
- var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
- err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
+ var expressRouteLinkPropertiesFormat ExpressRouteLinkPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteLinkPropertiesFormat)
if err != nil {
return err
}
- ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
+ erl.ExpressRouteLinkPropertiesFormat = &expressRouteLinkPropertiesFormat
}
- case "id":
+ case "name":
if v != nil {
- var ID string
- err = json.Unmarshal(*v, &ID)
+ var name string
+ err = json.Unmarshal(*v, &name)
if err != nil {
return err
}
- ersp.ID = &ID
+ erl.Name = &name
}
- case "name":
+ case "etag":
if v != nil {
- var name string
- err = json.Unmarshal(*v, &name)
+ var etag string
+ err = json.Unmarshal(*v, &etag)
if err != nil {
return err
}
- ersp.Name = &name
+ erl.Etag = &etag
}
- case "type":
+ case "id":
if v != nil {
- var typeVar string
- err = json.Unmarshal(*v, &typeVar)
+ var ID string
+ err = json.Unmarshal(*v, &ID)
if err != nil {
return err
}
- ersp.Type = &typeVar
+ erl.ID = &ID
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRouteLinkListResult response for ListExpressRouteLinks API service call.
+type ExpressRouteLinkListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of ExpressRouteLink sub-resources.
+ Value *[]ExpressRouteLink `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRouteLinkListResultIterator provides access to a complete listing of ExpressRouteLink values.
+type ExpressRouteLinkListResultIterator struct {
+ i int
+ page ExpressRouteLinkListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRouteLinkListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteLinkListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRouteLinkListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRouteLinkListResultIterator) Response() ExpressRouteLinkListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRouteLinkListResultIterator) Value() ExpressRouteLink {
+ if !iter.page.NotDone() {
+ return ExpressRouteLink{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRouteLinkListResultIterator type.
+func NewExpressRouteLinkListResultIterator(page ExpressRouteLinkListResultPage) ExpressRouteLinkListResultIterator {
+ return ExpressRouteLinkListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erllr ExpressRouteLinkListResult) IsEmpty() bool {
+ return erllr.Value == nil || len(*erllr.Value) == 0
+}
+
+// expressRouteLinkListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erllr ExpressRouteLinkListResult) expressRouteLinkListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if erllr.NextLink == nil || len(to.String(erllr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erllr.NextLink)))
+}
+
+// ExpressRouteLinkListResultPage contains a page of ExpressRouteLink values.
+type ExpressRouteLinkListResultPage struct {
+ fn func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)
+ erllr ExpressRouteLinkListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRouteLinkListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteLinkListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.erllr)
+ if err != nil {
+ return err
+ }
+ page.erllr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteLinkListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRouteLinkListResultPage) NotDone() bool {
+ return !page.erllr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRouteLinkListResultPage) Response() ExpressRouteLinkListResult {
+ return page.erllr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRouteLinkListResultPage) Values() []ExpressRouteLink {
+ if page.erllr.IsEmpty() {
+ return nil
+ }
+ return *page.erllr.Value
+}
+
+// Creates a new instance of the ExpressRouteLinkListResultPage type.
+func NewExpressRouteLinkListResultPage(getNextPage func(context.Context, ExpressRouteLinkListResult) (ExpressRouteLinkListResult, error)) ExpressRouteLinkListResultPage {
+ return ExpressRouteLinkListResultPage{fn: getNextPage}
+}
+
+// ExpressRouteLinkPropertiesFormat properties specific to ExpressRouteLink resources.
+type ExpressRouteLinkPropertiesFormat struct {
+ // RouterName - Name of Azure router associated with physical port.
+ RouterName *string `json:"routerName,omitempty"`
+ // InterfaceName - Name of Azure router interface.
+ InterfaceName *string `json:"interfaceName,omitempty"`
+ // PatchPanelID - Mapping between physical port to patch panel port.
+ PatchPanelID *string `json:"patchPanelId,omitempty"`
+ // RackID - Mapping of physical patch panel to rack.
+ RackID *string `json:"rackId,omitempty"`
+ // ConnectorType - Physical fiber port type. Possible values include: 'LC', 'SC'
+ ConnectorType ExpressRouteLinkConnectorType `json:"connectorType,omitempty"`
+ // AdminState - Administrative state of the physical port. Possible values include: 'ExpressRouteLinkAdminStateEnabled', 'ExpressRouteLinkAdminStateDisabled'
+ AdminState ExpressRouteLinkAdminState `json:"adminState,omitempty"`
+ // ProvisioningState - The provisioning state of the ExpressRouteLink resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ExpressRoutePort expressRoutePort resource definition.
+type ExpressRoutePort struct {
+ autorest.Response `json:"-"`
+ // ExpressRoutePortPropertiesFormat - ExpressRoutePort properties
+ *ExpressRoutePortPropertiesFormat `json:"properties,omitempty"`
+ // Etag - A unique read-only string that changes whenever the resource is updated.
+ Etag *string `json:"etag,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRoutePort.
+func (erp ExpressRoutePort) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erp.ExpressRoutePortPropertiesFormat != nil {
+ objectMap["properties"] = erp.ExpressRoutePortPropertiesFormat
+ }
+ if erp.Etag != nil {
+ objectMap["etag"] = erp.Etag
+ }
+ if erp.ID != nil {
+ objectMap["id"] = erp.ID
+ }
+ if erp.Name != nil {
+ objectMap["name"] = erp.Name
+ }
+ if erp.Type != nil {
+ objectMap["type"] = erp.Type
+ }
+ if erp.Location != nil {
+ objectMap["location"] = erp.Location
+ }
+ if erp.Tags != nil {
+ objectMap["tags"] = erp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRoutePort struct.
+func (erp *ExpressRoutePort) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRoutePortPropertiesFormat ExpressRoutePortPropertiesFormat
+ err = json.Unmarshal(*v, &expressRoutePortPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erp.ExpressRoutePortPropertiesFormat = &expressRoutePortPropertiesFormat
+ }
+ case "etag":
+ if v != nil {
+ var etag string
+ err = json.Unmarshal(*v, &etag)
+ if err != nil {
+ return err
+ }
+ erp.Etag = &etag
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ erp.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ erp.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ erp.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRoutePortListResult response for ListExpressRoutePorts API service call.
+type ExpressRoutePortListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of ExpressRoutePort resources.
+ Value *[]ExpressRoutePort `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRoutePortListResultIterator provides access to a complete listing of ExpressRoutePort values.
+type ExpressRoutePortListResultIterator struct {
+ i int
+ page ExpressRoutePortListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRoutePortListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRoutePortListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRoutePortListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRoutePortListResultIterator) Response() ExpressRoutePortListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRoutePortListResultIterator) Value() ExpressRoutePort {
+ if !iter.page.NotDone() {
+ return ExpressRoutePort{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRoutePortListResultIterator type.
+func NewExpressRoutePortListResultIterator(page ExpressRoutePortListResultPage) ExpressRoutePortListResultIterator {
+ return ExpressRoutePortListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erplr ExpressRoutePortListResult) IsEmpty() bool {
+ return erplr.Value == nil || len(*erplr.Value) == 0
+}
+
+// expressRoutePortListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erplr ExpressRoutePortListResult) expressRoutePortListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if erplr.NextLink == nil || len(to.String(erplr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erplr.NextLink)))
+}
+
+// ExpressRoutePortListResultPage contains a page of ExpressRoutePort values.
+type ExpressRoutePortListResultPage struct {
+ fn func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)
+ erplr ExpressRoutePortListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRoutePortListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.erplr)
+ if err != nil {
+ return err
+ }
+ page.erplr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRoutePortListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRoutePortListResultPage) NotDone() bool {
+ return !page.erplr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRoutePortListResultPage) Response() ExpressRoutePortListResult {
+ return page.erplr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRoutePortListResultPage) Values() []ExpressRoutePort {
+ if page.erplr.IsEmpty() {
+ return nil
+ }
+ return *page.erplr.Value
+}
+
+// Creates a new instance of the ExpressRoutePortListResultPage type.
+func NewExpressRoutePortListResultPage(getNextPage func(context.Context, ExpressRoutePortListResult) (ExpressRoutePortListResult, error)) ExpressRoutePortListResultPage {
+ return ExpressRoutePortListResultPage{fn: getNextPage}
+}
+
+// ExpressRoutePortPropertiesFormat properties specific to ExpressRoutePort resources.
+type ExpressRoutePortPropertiesFormat struct {
+ // PeeringLocation - The name of the peering location that the ExpressRoutePort is mapped to physically.
+ PeeringLocation *string `json:"peeringLocation,omitempty"`
+ // BandwidthInGbps - Bandwidth of procured ports in Gbps
+ BandwidthInGbps *int32 `json:"bandwidthInGbps,omitempty"`
+ // ProvisionedBandwidthInGbps - Aggregate Gbps of associated circuit bandwidths.
+ ProvisionedBandwidthInGbps *float64 `json:"provisionedBandwidthInGbps,omitempty"`
+ // Mtu - Maximum transmission unit of the physical port pair(s)
+ Mtu *string `json:"mtu,omitempty"`
+ // Encapsulation - Encapsulation method on physical ports. Possible values include: 'Dot1Q', 'QinQ'
+ Encapsulation ExpressRoutePortsEncapsulation `json:"encapsulation,omitempty"`
+ // EtherType - Ethertype of the physical port.
+ EtherType *string `json:"etherType,omitempty"`
+ // AllocationDate - Date of the physical port allocation to be used in Letter of Authorization.
+ AllocationDate *string `json:"allocationDate,omitempty"`
+ // Links - The set of physical links of the ExpressRoutePort resource
+ Links *[]ExpressRouteLink `json:"links,omitempty"`
+ // Circuits - Reference the ExpressRoute circuit(s) that are provisioned on this ExpressRoutePort resource.
+ Circuits *[]SubResource `json:"circuits,omitempty"`
+ // ProvisioningState - The provisioning state of the ExpressRoutePort resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+ // ResourceGUID - The resource GUID property of the ExpressRoutePort resource.
+ ResourceGUID *string `json:"resourceGuid,omitempty"`
+}
+
+// ExpressRoutePortsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRoutePortsCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRoutePortsCreateOrUpdateFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
+ erp, err = client.CreateOrUpdateResponder(erp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsCreateOrUpdateFuture", "Result", erp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRoutePortsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
+type ExpressRoutePortsDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRoutePortsDeleteFuture) Result(client ExpressRoutePortsClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
+
+// ExpressRoutePortsLocation definition of the ExpressRoutePorts peering location resource.
+type ExpressRoutePortsLocation struct {
+ autorest.Response `json:"-"`
+ // ExpressRoutePortsLocationPropertiesFormat - ExpressRoutePort peering location properties
+ *ExpressRoutePortsLocationPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRoutePortsLocation.
+func (erpl ExpressRoutePortsLocation) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if erpl.ExpressRoutePortsLocationPropertiesFormat != nil {
+ objectMap["properties"] = erpl.ExpressRoutePortsLocationPropertiesFormat
+ }
+ if erpl.ID != nil {
+ objectMap["id"] = erpl.ID
+ }
+ if erpl.Name != nil {
+ objectMap["name"] = erpl.Name
+ }
+ if erpl.Type != nil {
+ objectMap["type"] = erpl.Type
+ }
+ if erpl.Location != nil {
+ objectMap["location"] = erpl.Location
+ }
+ if erpl.Tags != nil {
+ objectMap["tags"] = erpl.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRoutePortsLocation struct.
+func (erpl *ExpressRoutePortsLocation) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRoutePortsLocationPropertiesFormat ExpressRoutePortsLocationPropertiesFormat
+ err = json.Unmarshal(*v, &expressRoutePortsLocationPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ erpl.ExpressRoutePortsLocationPropertiesFormat = &expressRoutePortsLocationPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ erpl.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ erpl.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ erpl.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ erpl.Location = &location
+ }
+ case "tags":
+ if v != nil {
+ var tags map[string]*string
+ err = json.Unmarshal(*v, &tags)
+ if err != nil {
+ return err
+ }
+ erpl.Tags = tags
+ }
+ }
+ }
+
+ return nil
+}
+
+// ExpressRoutePortsLocationBandwidths real-time inventory of available ExpressRoute port bandwidths.
+type ExpressRoutePortsLocationBandwidths struct {
+ // OfferName - Bandwidth descriptive name
+ OfferName *string `json:"offerName,omitempty"`
+ // ValueInGbps - Bandwidth value in Gbps
+ ValueInGbps *int32 `json:"valueInGbps,omitempty"`
+}
+
+// ExpressRoutePortsLocationListResult response for ListExpressRoutePortsLocations API service call.
+type ExpressRoutePortsLocationListResult struct {
+ autorest.Response `json:"-"`
+ // Value - The list of all ExpressRoutePort peering locations.
+ Value *[]ExpressRoutePortsLocation `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ExpressRoutePortsLocationListResultIterator provides access to a complete listing of
+// ExpressRoutePortsLocation values.
+type ExpressRoutePortsLocationListResultIterator struct {
+ i int
+ page ExpressRoutePortsLocationListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ExpressRoutePortsLocationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRoutePortsLocationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ExpressRoutePortsLocationListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ExpressRoutePortsLocationListResultIterator) Response() ExpressRoutePortsLocationListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ExpressRoutePortsLocationListResultIterator) Value() ExpressRoutePortsLocation {
+ if !iter.page.NotDone() {
+ return ExpressRoutePortsLocation{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ExpressRoutePortsLocationListResultIterator type.
+func NewExpressRoutePortsLocationListResultIterator(page ExpressRoutePortsLocationListResultPage) ExpressRoutePortsLocationListResultIterator {
+ return ExpressRoutePortsLocationListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (erpllr ExpressRoutePortsLocationListResult) IsEmpty() bool {
+ return erpllr.Value == nil || len(*erpllr.Value) == 0
+}
+
+// expressRoutePortsLocationListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (erpllr ExpressRoutePortsLocationListResult) expressRoutePortsLocationListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if erpllr.NextLink == nil || len(to.String(erpllr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(erpllr.NextLink)))
+}
+
+// ExpressRoutePortsLocationListResultPage contains a page of ExpressRoutePortsLocation values.
+type ExpressRoutePortsLocationListResultPage struct {
+ fn func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)
+ erpllr ExpressRoutePortsLocationListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ExpressRoutePortsLocationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRoutePortsLocationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.erpllr)
+ if err != nil {
+ return err
+ }
+ page.erpllr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRoutePortsLocationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ExpressRoutePortsLocationListResultPage) NotDone() bool {
+ return !page.erpllr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page ExpressRoutePortsLocationListResultPage) Response() ExpressRoutePortsLocationListResult {
+ return page.erpllr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ExpressRoutePortsLocationListResultPage) Values() []ExpressRoutePortsLocation {
+ if page.erpllr.IsEmpty() {
+ return nil
+ }
+ return *page.erpllr.Value
+}
+
+// Creates a new instance of the ExpressRoutePortsLocationListResultPage type.
+func NewExpressRoutePortsLocationListResultPage(getNextPage func(context.Context, ExpressRoutePortsLocationListResult) (ExpressRoutePortsLocationListResult, error)) ExpressRoutePortsLocationListResultPage {
+ return ExpressRoutePortsLocationListResultPage{fn: getNextPage}
+}
+
+// ExpressRoutePortsLocationPropertiesFormat properties specific to ExpressRoutePorts peering location
+// resources.
+type ExpressRoutePortsLocationPropertiesFormat struct {
+ // Address - Address of peering location.
+ Address *string `json:"address,omitempty"`
+ // Contact - Contact details of peering locations.
+ Contact *string `json:"contact,omitempty"`
+ // AvailableBandwidths - The inventory of available ExpressRoutePort bandwidths.
+ AvailableBandwidths *[]ExpressRoutePortsLocationBandwidths `json:"availableBandwidths,omitempty"`
+ // ProvisioningState - The provisioning state of the ExpressRoutePortLocation resource. Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'.
+ ProvisioningState *string `json:"provisioningState,omitempty"`
+}
+
+// ExpressRoutePortsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type ExpressRoutePortsUpdateTagsFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *ExpressRoutePortsUpdateTagsFuture) Result(client ExpressRoutePortsClient) (erp ExpressRoutePort, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("network.ExpressRoutePortsUpdateTagsFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if erp.Response.Response, err = future.GetResult(sender); err == nil && erp.Response.Response.StatusCode != http.StatusNoContent {
+ erp, err = client.UpdateTagsResponder(erp.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "network.ExpressRoutePortsUpdateTagsFuture", "Result", erp.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// ExpressRouteServiceProvider a ExpressRouteResourceProvider object.
+type ExpressRouteServiceProvider struct {
+ *ExpressRouteServiceProviderPropertiesFormat `json:"properties,omitempty"`
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+ // Location - Resource location.
+ Location *string `json:"location,omitempty"`
+ // Tags - Resource tags.
+ Tags map[string]*string `json:"tags"`
+}
+
+// MarshalJSON is the custom marshaler for ExpressRouteServiceProvider.
+func (ersp ExpressRouteServiceProvider) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if ersp.ExpressRouteServiceProviderPropertiesFormat != nil {
+ objectMap["properties"] = ersp.ExpressRouteServiceProviderPropertiesFormat
+ }
+ if ersp.ID != nil {
+ objectMap["id"] = ersp.ID
+ }
+ if ersp.Name != nil {
+ objectMap["name"] = ersp.Name
+ }
+ if ersp.Type != nil {
+ objectMap["type"] = ersp.Type
+ }
+ if ersp.Location != nil {
+ objectMap["location"] = ersp.Location
+ }
+ if ersp.Tags != nil {
+ objectMap["tags"] = ersp.Tags
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for ExpressRouteServiceProvider struct.
+func (ersp *ExpressRouteServiceProvider) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var expressRouteServiceProviderPropertiesFormat ExpressRouteServiceProviderPropertiesFormat
+ err = json.Unmarshal(*v, &expressRouteServiceProviderPropertiesFormat)
+ if err != nil {
+ return err
+ }
+ ersp.ExpressRouteServiceProviderPropertiesFormat = &expressRouteServiceProviderPropertiesFormat
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ ersp.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ ersp.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ ersp.Type = &typeVar
}
case "location":
if v != nil {
@@ -9898,14 +11575,24 @@ type ExpressRouteServiceProviderListResultIterator struct {
page ExpressRouteServiceProviderListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
+func (iter *ExpressRouteServiceProviderListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9914,6 +11601,13 @@ func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExpressRouteServiceProviderListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExpressRouteServiceProviderListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9933,6 +11627,11 @@ func (iter ExpressRouteServiceProviderListResultIterator) Value() ExpressRouteSe
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExpressRouteServiceProviderListResultIterator type.
+func NewExpressRouteServiceProviderListResultIterator(page ExpressRouteServiceProviderListResultPage) ExpressRouteServiceProviderListResultIterator {
+ return ExpressRouteServiceProviderListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
return ersplr.Value == nil || len(*ersplr.Value) == 0
@@ -9940,11 +11639,11 @@ func (ersplr ExpressRouteServiceProviderListResult) IsEmpty() bool {
// expressRouteServiceProviderListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer() (*http.Request, error) {
+func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderListResultPreparer(ctx context.Context) (*http.Request, error) {
if ersplr.NextLink == nil || len(to.String(ersplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ersplr.NextLink)))
@@ -9952,14 +11651,24 @@ func (ersplr ExpressRouteServiceProviderListResult) expressRouteServiceProviderL
// ExpressRouteServiceProviderListResultPage contains a page of ExpressRouteServiceProvider values.
type ExpressRouteServiceProviderListResultPage struct {
- fn func(ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
+ fn func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)
ersplr ExpressRouteServiceProviderListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExpressRouteServiceProviderListResultPage) Next() error {
- next, err := page.fn(page.ersplr)
+func (page *ExpressRouteServiceProviderListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExpressRouteServiceProviderListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ersplr)
if err != nil {
return err
}
@@ -9967,6 +11676,13 @@ func (page *ExpressRouteServiceProviderListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExpressRouteServiceProviderListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExpressRouteServiceProviderListResultPage) NotDone() bool {
return !page.ersplr.IsEmpty()
@@ -9985,6 +11701,11 @@ func (page ExpressRouteServiceProviderListResultPage) Values() []ExpressRouteSer
return *page.ersplr.Value
}
+// Creates a new instance of the ExpressRouteServiceProviderListResultPage type.
+func NewExpressRouteServiceProviderListResultPage(getNextPage func(context.Context, ExpressRouteServiceProviderListResult) (ExpressRouteServiceProviderListResult, error)) ExpressRouteServiceProviderListResultPage {
+ return ExpressRouteServiceProviderListResultPage{fn: getNextPage}
+}
+
// ExpressRouteServiceProviderPropertiesFormat properties of ExpressRouteServiceProvider.
type ExpressRouteServiceProviderPropertiesFormat struct {
// PeeringLocations - Get a list of peering locations.
@@ -10070,8 +11791,8 @@ type FlowLogProperties struct {
RetentionPolicy *RetentionPolicyParameters `json:"retentionPolicy,omitempty"`
}
-// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics (optional)
-// status.
+// FlowLogStatusParameters parameters that define a resource to query flow log and traffic analytics
+// (optional) status.
type FlowLogStatusParameters struct {
// TargetResourceID - The target resource where getting the flow log and traffic analytics (optional) status.
TargetResourceID *string `json:"targetResourceId,omitempty"`
@@ -10543,14 +12264,24 @@ type InboundNatRuleListResultIterator struct {
page InboundNatRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InboundNatRuleListResultIterator) Next() error {
+func (iter *InboundNatRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -10559,6 +12290,13 @@ func (iter *InboundNatRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InboundNatRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InboundNatRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -10578,6 +12316,11 @@ func (iter InboundNatRuleListResultIterator) Value() InboundNatRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InboundNatRuleListResultIterator type.
+func NewInboundNatRuleListResultIterator(page InboundNatRuleListResultPage) InboundNatRuleListResultIterator {
+ return InboundNatRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (inrlr InboundNatRuleListResult) IsEmpty() bool {
return inrlr.Value == nil || len(*inrlr.Value) == 0
@@ -10585,11 +12328,11 @@ func (inrlr InboundNatRuleListResult) IsEmpty() bool {
// inboundNatRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.Request, error) {
+func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if inrlr.NextLink == nil || len(to.String(inrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(inrlr.NextLink)))
@@ -10597,14 +12340,24 @@ func (inrlr InboundNatRuleListResult) inboundNatRuleListResultPreparer() (*http.
// InboundNatRuleListResultPage contains a page of InboundNatRule values.
type InboundNatRuleListResultPage struct {
- fn func(InboundNatRuleListResult) (InboundNatRuleListResult, error)
+ fn func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)
inrlr InboundNatRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InboundNatRuleListResultPage) Next() error {
- next, err := page.fn(page.inrlr)
+func (page *InboundNatRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InboundNatRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.inrlr)
if err != nil {
return err
}
@@ -10612,6 +12365,13 @@ func (page *InboundNatRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InboundNatRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InboundNatRuleListResultPage) NotDone() bool {
return !page.inrlr.IsEmpty()
@@ -10630,6 +12390,11 @@ func (page InboundNatRuleListResultPage) Values() []InboundNatRule {
return *page.inrlr.Value
}
+// Creates a new instance of the InboundNatRuleListResultPage type.
+func NewInboundNatRuleListResultPage(getNextPage func(context.Context, InboundNatRuleListResult) (InboundNatRuleListResult, error)) InboundNatRuleListResultPage {
+ return InboundNatRuleListResultPage{fn: getNextPage}
+}
+
// InboundNatRulePropertiesFormat properties of the inbound NAT rule.
type InboundNatRulePropertiesFormat struct {
// FrontendIPConfiguration - A reference to frontend IP addresses.
@@ -10652,8 +12417,8 @@ type InboundNatRulePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// InboundNatRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type InboundNatRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -10989,14 +12754,24 @@ type InterfaceEndpointListResultIterator struct {
page InterfaceEndpointListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InterfaceEndpointListResultIterator) Next() error {
+func (iter *InterfaceEndpointListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -11005,6 +12780,13 @@ func (iter *InterfaceEndpointListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InterfaceEndpointListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InterfaceEndpointListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -11024,6 +12806,11 @@ func (iter InterfaceEndpointListResultIterator) Value() InterfaceEndpoint {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InterfaceEndpointListResultIterator type.
+func NewInterfaceEndpointListResultIterator(page InterfaceEndpointListResultPage) InterfaceEndpointListResultIterator {
+ return InterfaceEndpointListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ielr InterfaceEndpointListResult) IsEmpty() bool {
return ielr.Value == nil || len(*ielr.Value) == 0
@@ -11031,11 +12818,11 @@ func (ielr InterfaceEndpointListResult) IsEmpty() bool {
// interfaceEndpointListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer() (*http.Request, error) {
+func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer(ctx context.Context) (*http.Request, error) {
if ielr.NextLink == nil || len(to.String(ielr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ielr.NextLink)))
@@ -11043,14 +12830,24 @@ func (ielr InterfaceEndpointListResult) interfaceEndpointListResultPreparer() (*
// InterfaceEndpointListResultPage contains a page of InterfaceEndpoint values.
type InterfaceEndpointListResultPage struct {
- fn func(InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
+ fn func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)
ielr InterfaceEndpointListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InterfaceEndpointListResultPage) Next() error {
- next, err := page.fn(page.ielr)
+func (page *InterfaceEndpointListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceEndpointListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ielr)
if err != nil {
return err
}
@@ -11058,6 +12855,13 @@ func (page *InterfaceEndpointListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InterfaceEndpointListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InterfaceEndpointListResultPage) NotDone() bool {
return !page.ielr.IsEmpty()
@@ -11076,6 +12880,11 @@ func (page InterfaceEndpointListResultPage) Values() []InterfaceEndpoint {
return *page.ielr.Value
}
+// Creates a new instance of the InterfaceEndpointListResultPage type.
+func NewInterfaceEndpointListResultPage(getNextPage func(context.Context, InterfaceEndpointListResult) (InterfaceEndpointListResult, error)) InterfaceEndpointListResultPage {
+ return InterfaceEndpointListResultPage{fn: getNextPage}
+}
+
// InterfaceEndpointProperties properties of the interface endpoint.
type InterfaceEndpointProperties struct {
// Fqdn - A first-party service's FQDN that is mapped to the private IP allocated via this interface endpoint.
@@ -11121,8 +12930,8 @@ func (future *InterfaceEndpointsCreateOrUpdateFuture) Result(client InterfaceEnd
return
}
-// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// InterfaceEndpointsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type InterfaceEndpointsDeleteFuture struct {
azure.Future
}
@@ -11235,21 +13044,31 @@ type InterfaceIPConfigurationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// InterfaceIPConfigurationListResultIterator provides access to a complete listing of InterfaceIPConfiguration
-// values.
+// InterfaceIPConfigurationListResultIterator provides access to a complete listing of
+// InterfaceIPConfiguration values.
type InterfaceIPConfigurationListResultIterator struct {
i int
page InterfaceIPConfigurationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
+func (iter *InterfaceIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -11258,6 +13077,13 @@ func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InterfaceIPConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InterfaceIPConfigurationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -11277,6 +13103,11 @@ func (iter InterfaceIPConfigurationListResultIterator) Value() InterfaceIPConfig
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InterfaceIPConfigurationListResultIterator type.
+func NewInterfaceIPConfigurationListResultIterator(page InterfaceIPConfigurationListResultPage) InterfaceIPConfigurationListResultIterator {
+ return InterfaceIPConfigurationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
return iiclr.Value == nil || len(*iiclr.Value) == 0
@@ -11284,11 +13115,11 @@ func (iiclr InterfaceIPConfigurationListResult) IsEmpty() bool {
// interfaceIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer() (*http.Request, error) {
+func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
if iiclr.NextLink == nil || len(to.String(iiclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iiclr.NextLink)))
@@ -11296,14 +13127,24 @@ func (iiclr InterfaceIPConfigurationListResult) interfaceIPConfigurationListResu
// InterfaceIPConfigurationListResultPage contains a page of InterfaceIPConfiguration values.
type InterfaceIPConfigurationListResultPage struct {
- fn func(InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
+ fn func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)
iiclr InterfaceIPConfigurationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InterfaceIPConfigurationListResultPage) Next() error {
- next, err := page.fn(page.iiclr)
+func (page *InterfaceIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceIPConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iiclr)
if err != nil {
return err
}
@@ -11311,6 +13152,13 @@ func (page *InterfaceIPConfigurationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InterfaceIPConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InterfaceIPConfigurationListResultPage) NotDone() bool {
return !page.iiclr.IsEmpty()
@@ -11329,6 +13177,11 @@ func (page InterfaceIPConfigurationListResultPage) Values() []InterfaceIPConfigu
return *page.iiclr.Value
}
+// Creates a new instance of the InterfaceIPConfigurationListResultPage type.
+func NewInterfaceIPConfigurationListResultPage(getNextPage func(context.Context, InterfaceIPConfigurationListResult) (InterfaceIPConfigurationListResult, error)) InterfaceIPConfigurationListResultPage {
+ return InterfaceIPConfigurationListResultPage{fn: getNextPage}
+}
+
// InterfaceIPConfigurationPropertiesFormat properties of IP configuration.
type InterfaceIPConfigurationPropertiesFormat struct {
// VirtualNetworkTaps - The reference to Virtual Network Taps.
@@ -11372,14 +13225,24 @@ type InterfaceListResultIterator struct {
page InterfaceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InterfaceListResultIterator) Next() error {
+func (iter *InterfaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -11388,6 +13251,13 @@ func (iter *InterfaceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InterfaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InterfaceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -11407,6 +13277,11 @@ func (iter InterfaceListResultIterator) Value() Interface {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InterfaceListResultIterator type.
+func NewInterfaceListResultIterator(page InterfaceListResultPage) InterfaceListResultIterator {
+ return InterfaceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ilr InterfaceListResult) IsEmpty() bool {
return ilr.Value == nil || len(*ilr.Value) == 0
@@ -11414,11 +13289,11 @@ func (ilr InterfaceListResult) IsEmpty() bool {
// interfaceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, error) {
+func (ilr InterfaceListResult) interfaceListResultPreparer(ctx context.Context) (*http.Request, error) {
if ilr.NextLink == nil || len(to.String(ilr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ilr.NextLink)))
@@ -11426,14 +13301,24 @@ func (ilr InterfaceListResult) interfaceListResultPreparer() (*http.Request, err
// InterfaceListResultPage contains a page of Interface values.
type InterfaceListResultPage struct {
- fn func(InterfaceListResult) (InterfaceListResult, error)
+ fn func(context.Context, InterfaceListResult) (InterfaceListResult, error)
ilr InterfaceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InterfaceListResultPage) Next() error {
- next, err := page.fn(page.ilr)
+func (page *InterfaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ilr)
if err != nil {
return err
}
@@ -11441,6 +13326,13 @@ func (page *InterfaceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InterfaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InterfaceListResultPage) NotDone() bool {
return !page.ilr.IsEmpty()
@@ -11459,6 +13351,11 @@ func (page InterfaceListResultPage) Values() []Interface {
return *page.ilr.Value
}
+// Creates a new instance of the InterfaceListResultPage type.
+func NewInterfaceListResultPage(getNextPage func(context.Context, InterfaceListResult) (InterfaceListResult, error)) InterfaceListResultPage {
+ return InterfaceListResultPage{fn: getNextPage}
+}
+
// InterfaceLoadBalancerListResult response for list ip configurations API service call.
type InterfaceLoadBalancerListResult struct {
autorest.Response `json:"-"`
@@ -11474,14 +13371,24 @@ type InterfaceLoadBalancerListResultIterator struct {
page InterfaceLoadBalancerListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
+func (iter *InterfaceLoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -11490,6 +13397,13 @@ func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InterfaceLoadBalancerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InterfaceLoadBalancerListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -11509,6 +13423,11 @@ func (iter InterfaceLoadBalancerListResultIterator) Value() LoadBalancer {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InterfaceLoadBalancerListResultIterator type.
+func NewInterfaceLoadBalancerListResultIterator(page InterfaceLoadBalancerListResultPage) InterfaceLoadBalancerListResultIterator {
+ return InterfaceLoadBalancerListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
return ilblr.Value == nil || len(*ilblr.Value) == 0
@@ -11516,11 +13435,11 @@ func (ilblr InterfaceLoadBalancerListResult) IsEmpty() bool {
// interfaceLoadBalancerListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer() (*http.Request, error) {
+func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
if ilblr.NextLink == nil || len(to.String(ilblr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ilblr.NextLink)))
@@ -11528,14 +13447,24 @@ func (ilblr InterfaceLoadBalancerListResult) interfaceLoadBalancerListResultPrep
// InterfaceLoadBalancerListResultPage contains a page of LoadBalancer values.
type InterfaceLoadBalancerListResultPage struct {
- fn func(InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
+ fn func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)
ilblr InterfaceLoadBalancerListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InterfaceLoadBalancerListResultPage) Next() error {
- next, err := page.fn(page.ilblr)
+func (page *InterfaceLoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceLoadBalancerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ilblr)
if err != nil {
return err
}
@@ -11543,6 +13472,13 @@ func (page *InterfaceLoadBalancerListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InterfaceLoadBalancerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InterfaceLoadBalancerListResultPage) NotDone() bool {
return !page.ilblr.IsEmpty()
@@ -11561,6 +13497,11 @@ func (page InterfaceLoadBalancerListResultPage) Values() []LoadBalancer {
return *page.ilblr.Value
}
+// Creates a new instance of the InterfaceLoadBalancerListResultPage type.
+func NewInterfaceLoadBalancerListResultPage(getNextPage func(context.Context, InterfaceLoadBalancerListResult) (InterfaceLoadBalancerListResult, error)) InterfaceLoadBalancerListResultPage {
+ return InterfaceLoadBalancerListResultPage{fn: getNextPage}
+}
+
// InterfacePropertiesFormat networkInterface properties.
type InterfacePropertiesFormat struct {
// VirtualMachine - The reference of a virtual machine.
@@ -11591,8 +13532,8 @@ type InterfacePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// InterfacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type InterfacesCreateOrUpdateFuture struct {
azure.Future
}
@@ -11620,7 +13561,8 @@ func (future *InterfacesCreateOrUpdateFuture) Result(client InterfacesClient) (i
return
}
-// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// InterfacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type InterfacesDeleteFuture struct {
azure.Future
}
@@ -11671,8 +13613,8 @@ func (future *InterfacesGetEffectiveRouteTableFuture) Result(client InterfacesCl
return
}
-// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// InterfacesListEffectiveNetworkSecurityGroupsFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type InterfacesListEffectiveNetworkSecurityGroupsFuture struct {
azure.Future
}
@@ -11700,7 +13642,8 @@ func (future *InterfacesListEffectiveNetworkSecurityGroupsFuture) Result(client
return
}
-// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// InterfacesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type InterfacesUpdateTagsFuture struct {
azure.Future
}
@@ -11833,21 +13776,31 @@ type InterfaceTapConfigurationListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// InterfaceTapConfigurationListResultIterator provides access to a complete listing of InterfaceTapConfiguration
-// values.
+// InterfaceTapConfigurationListResultIterator provides access to a complete listing of
+// InterfaceTapConfiguration values.
type InterfaceTapConfigurationListResultIterator struct {
i int
page InterfaceTapConfigurationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
+func (iter *InterfaceTapConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -11856,6 +13809,13 @@ func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InterfaceTapConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InterfaceTapConfigurationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -11875,6 +13835,11 @@ func (iter InterfaceTapConfigurationListResultIterator) Value() InterfaceTapConf
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InterfaceTapConfigurationListResultIterator type.
+func NewInterfaceTapConfigurationListResultIterator(page InterfaceTapConfigurationListResultPage) InterfaceTapConfigurationListResultIterator {
+ return InterfaceTapConfigurationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
return itclr.Value == nil || len(*itclr.Value) == 0
@@ -11882,11 +13847,11 @@ func (itclr InterfaceTapConfigurationListResult) IsEmpty() bool {
// interfaceTapConfigurationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer() (*http.Request, error) {
+func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
if itclr.NextLink == nil || len(to.String(itclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(itclr.NextLink)))
@@ -11894,14 +13859,24 @@ func (itclr InterfaceTapConfigurationListResult) interfaceTapConfigurationListRe
// InterfaceTapConfigurationListResultPage contains a page of InterfaceTapConfiguration values.
type InterfaceTapConfigurationListResultPage struct {
- fn func(InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
+ fn func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)
itclr InterfaceTapConfigurationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InterfaceTapConfigurationListResultPage) Next() error {
- next, err := page.fn(page.itclr)
+func (page *InterfaceTapConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InterfaceTapConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.itclr)
if err != nil {
return err
}
@@ -11909,6 +13884,13 @@ func (page *InterfaceTapConfigurationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InterfaceTapConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InterfaceTapConfigurationListResultPage) NotDone() bool {
return !page.itclr.IsEmpty()
@@ -11927,6 +13909,11 @@ func (page InterfaceTapConfigurationListResultPage) Values() []InterfaceTapConfi
return *page.itclr.Value
}
+// Creates a new instance of the InterfaceTapConfigurationListResultPage type.
+func NewInterfaceTapConfigurationListResultPage(getNextPage func(context.Context, InterfaceTapConfigurationListResult) (InterfaceTapConfigurationListResult, error)) InterfaceTapConfigurationListResultPage {
+ return InterfaceTapConfigurationListResultPage{fn: getNextPage}
+}
+
// InterfaceTapConfigurationPropertiesFormat properties of Virtual Network Tap configuration.
type InterfaceTapConfigurationPropertiesFormat struct {
// VirtualNetworkTap - The reference of the Virtual Network Tap resource.
@@ -11935,8 +13922,8 @@ type InterfaceTapConfigurationPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// InterfaceTapConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type InterfaceTapConfigurationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -12236,8 +14223,8 @@ type Ipv6ExpressRouteCircuitPeeringConfig struct {
State ExpressRouteCircuitPeeringState `json:"state,omitempty"`
}
-// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get the next
-// set of results.
+// ListHubVirtualNetworkConnectionsResult list of HubVirtualNetworkConnections and a URL nextLink to get
+// the next set of results.
type ListHubVirtualNetworkConnectionsResult struct {
autorest.Response `json:"-"`
// Value - List of HubVirtualNetworkConnections.
@@ -12253,14 +14240,24 @@ type ListHubVirtualNetworkConnectionsResultIterator struct {
page ListHubVirtualNetworkConnectionsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
+func (iter *ListHubVirtualNetworkConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12269,6 +14266,13 @@ func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListHubVirtualNetworkConnectionsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListHubVirtualNetworkConnectionsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12288,6 +14292,11 @@ func (iter ListHubVirtualNetworkConnectionsResultIterator) Value() HubVirtualNet
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListHubVirtualNetworkConnectionsResultIterator type.
+func NewListHubVirtualNetworkConnectionsResultIterator(page ListHubVirtualNetworkConnectionsResultPage) ListHubVirtualNetworkConnectionsResultIterator {
+ return ListHubVirtualNetworkConnectionsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
return lhvncr.Value == nil || len(*lhvncr.Value) == 0
@@ -12295,11 +14304,11 @@ func (lhvncr ListHubVirtualNetworkConnectionsResult) IsEmpty() bool {
// listHubVirtualNetworkConnectionsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer() (*http.Request, error) {
+func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
if lhvncr.NextLink == nil || len(to.String(lhvncr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lhvncr.NextLink)))
@@ -12307,14 +14316,24 @@ func (lhvncr ListHubVirtualNetworkConnectionsResult) listHubVirtualNetworkConnec
// ListHubVirtualNetworkConnectionsResultPage contains a page of HubVirtualNetworkConnection values.
type ListHubVirtualNetworkConnectionsResultPage struct {
- fn func(ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
+ fn func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)
lhvncr ListHubVirtualNetworkConnectionsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
- next, err := page.fn(page.lhvncr)
+func (page *ListHubVirtualNetworkConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListHubVirtualNetworkConnectionsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lhvncr)
if err != nil {
return err
}
@@ -12322,6 +14341,13 @@ func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListHubVirtualNetworkConnectionsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListHubVirtualNetworkConnectionsResultPage) NotDone() bool {
return !page.lhvncr.IsEmpty()
@@ -12340,8 +14366,13 @@ func (page ListHubVirtualNetworkConnectionsResultPage) Values() []HubVirtualNetw
return *page.lhvncr.Value
}
-// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and
-// a URL nextLink to get the next set of results.
+// Creates a new instance of the ListHubVirtualNetworkConnectionsResultPage type.
+func NewListHubVirtualNetworkConnectionsResultPage(getNextPage func(context.Context, ListHubVirtualNetworkConnectionsResult) (ListHubVirtualNetworkConnectionsResult, error)) ListHubVirtualNetworkConnectionsResultPage {
+ return ListHubVirtualNetworkConnectionsResultPage{fn: getNextPage}
+}
+
+// ListP2SVpnGatewaysResult result of the request to list P2SVpnGateways. It contains a list of
+// P2SVpnGateways and a URL nextLink to get the next set of results.
type ListP2SVpnGatewaysResult struct {
autorest.Response `json:"-"`
// Value - List of P2SVpnGateways.
@@ -12356,14 +14387,24 @@ type ListP2SVpnGatewaysResultIterator struct {
page ListP2SVpnGatewaysResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
+func (iter *ListP2SVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12372,6 +14413,13 @@ func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListP2SVpnGatewaysResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListP2SVpnGatewaysResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12391,6 +14439,11 @@ func (iter ListP2SVpnGatewaysResultIterator) Value() P2SVpnGateway {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListP2SVpnGatewaysResultIterator type.
+func NewListP2SVpnGatewaysResultIterator(page ListP2SVpnGatewaysResultPage) ListP2SVpnGatewaysResultIterator {
+ return ListP2SVpnGatewaysResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
return lpvgr.Value == nil || len(*lpvgr.Value) == 0
@@ -12398,11 +14451,11 @@ func (lpvgr ListP2SVpnGatewaysResult) IsEmpty() bool {
// listP2SVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer() (*http.Request, error) {
+func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
if lpvgr.NextLink == nil || len(to.String(lpvgr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lpvgr.NextLink)))
@@ -12410,14 +14463,24 @@ func (lpvgr ListP2SVpnGatewaysResult) listP2SVpnGatewaysResultPreparer() (*http.
// ListP2SVpnGatewaysResultPage contains a page of P2SVpnGateway values.
type ListP2SVpnGatewaysResultPage struct {
- fn func(ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
+ fn func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)
lpvgr ListP2SVpnGatewaysResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListP2SVpnGatewaysResultPage) Next() error {
- next, err := page.fn(page.lpvgr)
+func (page *ListP2SVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnGatewaysResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lpvgr)
if err != nil {
return err
}
@@ -12425,6 +14488,13 @@ func (page *ListP2SVpnGatewaysResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListP2SVpnGatewaysResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListP2SVpnGatewaysResultPage) NotDone() bool {
return !page.lpvgr.IsEmpty()
@@ -12443,9 +14513,14 @@ func (page ListP2SVpnGatewaysResultPage) Values() []P2SVpnGateway {
return *page.lpvgr.Value
}
-// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations associated to
-// a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get the next set of
-// results.
+// Creates a new instance of the ListP2SVpnGatewaysResultPage type.
+func NewListP2SVpnGatewaysResultPage(getNextPage func(context.Context, ListP2SVpnGatewaysResult) (ListP2SVpnGatewaysResult, error)) ListP2SVpnGatewaysResultPage {
+ return ListP2SVpnGatewaysResultPage{fn: getNextPage}
+}
+
+// ListP2SVpnServerConfigurationsResult result of the request to list all P2SVpnServerConfigurations
+// associated to a VirtualWan. It contains a list of P2SVpnServerConfigurations and a URL nextLink to get
+// the next set of results.
type ListP2SVpnServerConfigurationsResult struct {
autorest.Response `json:"-"`
// Value - List of P2SVpnServerConfigurations.
@@ -12454,21 +14529,31 @@ type ListP2SVpnServerConfigurationsResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of P2SVpnServerConfiguration
-// values.
+// ListP2SVpnServerConfigurationsResultIterator provides access to a complete listing of
+// P2SVpnServerConfiguration values.
type ListP2SVpnServerConfigurationsResultIterator struct {
i int
page ListP2SVpnServerConfigurationsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
+func (iter *ListP2SVpnServerConfigurationsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12477,6 +14562,13 @@ func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListP2SVpnServerConfigurationsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListP2SVpnServerConfigurationsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12496,6 +14588,11 @@ func (iter ListP2SVpnServerConfigurationsResultIterator) Value() P2SVpnServerCon
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListP2SVpnServerConfigurationsResultIterator type.
+func NewListP2SVpnServerConfigurationsResultIterator(page ListP2SVpnServerConfigurationsResultPage) ListP2SVpnServerConfigurationsResultIterator {
+ return ListP2SVpnServerConfigurationsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
return lpvscr.Value == nil || len(*lpvscr.Value) == 0
@@ -12503,11 +14600,11 @@ func (lpvscr ListP2SVpnServerConfigurationsResult) IsEmpty() bool {
// listP2SVpnServerConfigurationsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer() (*http.Request, error) {
+func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfigurationsResultPreparer(ctx context.Context) (*http.Request, error) {
if lpvscr.NextLink == nil || len(to.String(lpvscr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lpvscr.NextLink)))
@@ -12515,14 +14612,24 @@ func (lpvscr ListP2SVpnServerConfigurationsResult) listP2SVpnServerConfiguration
// ListP2SVpnServerConfigurationsResultPage contains a page of P2SVpnServerConfiguration values.
type ListP2SVpnServerConfigurationsResultPage struct {
- fn func(ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
+ fn func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)
lpvscr ListP2SVpnServerConfigurationsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
- next, err := page.fn(page.lpvscr)
+func (page *ListP2SVpnServerConfigurationsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListP2SVpnServerConfigurationsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lpvscr)
if err != nil {
return err
}
@@ -12530,6 +14637,13 @@ func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListP2SVpnServerConfigurationsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListP2SVpnServerConfigurationsResultPage) NotDone() bool {
return !page.lpvscr.IsEmpty()
@@ -12548,8 +14662,13 @@ func (page ListP2SVpnServerConfigurationsResultPage) Values() []P2SVpnServerConf
return *page.lpvscr.Value
}
-// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL
-// nextLink to get the next set of results.
+// Creates a new instance of the ListP2SVpnServerConfigurationsResultPage type.
+func NewListP2SVpnServerConfigurationsResultPage(getNextPage func(context.Context, ListP2SVpnServerConfigurationsResult) (ListP2SVpnServerConfigurationsResult, error)) ListP2SVpnServerConfigurationsResultPage {
+ return ListP2SVpnServerConfigurationsResultPage{fn: getNextPage}
+}
+
+// ListVirtualHubsResult result of the request to list VirtualHubs. It contains a list of VirtualHubs and a
+// URL nextLink to get the next set of results.
type ListVirtualHubsResult struct {
autorest.Response `json:"-"`
// Value - List of VirtualHubs.
@@ -12564,14 +14683,24 @@ type ListVirtualHubsResultIterator struct {
page ListVirtualHubsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListVirtualHubsResultIterator) Next() error {
+func (iter *ListVirtualHubsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12580,6 +14709,13 @@ func (iter *ListVirtualHubsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListVirtualHubsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListVirtualHubsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12599,6 +14735,11 @@ func (iter ListVirtualHubsResultIterator) Value() VirtualHub {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListVirtualHubsResultIterator type.
+func NewListVirtualHubsResultIterator(page ListVirtualHubsResultPage) ListVirtualHubsResultIterator {
+ return ListVirtualHubsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lvhr ListVirtualHubsResult) IsEmpty() bool {
return lvhr.Value == nil || len(*lvhr.Value) == 0
@@ -12606,11 +14747,11 @@ func (lvhr ListVirtualHubsResult) IsEmpty() bool {
// listVirtualHubsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer() (*http.Request, error) {
+func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer(ctx context.Context) (*http.Request, error) {
if lvhr.NextLink == nil || len(to.String(lvhr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lvhr.NextLink)))
@@ -12618,14 +14759,24 @@ func (lvhr ListVirtualHubsResult) listVirtualHubsResultPreparer() (*http.Request
// ListVirtualHubsResultPage contains a page of VirtualHub values.
type ListVirtualHubsResultPage struct {
- fn func(ListVirtualHubsResult) (ListVirtualHubsResult, error)
+ fn func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)
lvhr ListVirtualHubsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListVirtualHubsResultPage) Next() error {
- next, err := page.fn(page.lvhr)
+func (page *ListVirtualHubsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualHubsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lvhr)
if err != nil {
return err
}
@@ -12633,6 +14784,13 @@ func (page *ListVirtualHubsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListVirtualHubsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListVirtualHubsResultPage) NotDone() bool {
return !page.lvhr.IsEmpty()
@@ -12651,8 +14809,13 @@ func (page ListVirtualHubsResultPage) Values() []VirtualHub {
return *page.lvhr.Value
}
-// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL
-// nextLink to get the next set of results.
+// Creates a new instance of the ListVirtualHubsResultPage type.
+func NewListVirtualHubsResultPage(getNextPage func(context.Context, ListVirtualHubsResult) (ListVirtualHubsResult, error)) ListVirtualHubsResultPage {
+ return ListVirtualHubsResultPage{fn: getNextPage}
+}
+
+// ListVirtualWANsResult result of the request to list VirtualWANs. It contains a list of VirtualWANs and a
+// URL nextLink to get the next set of results.
type ListVirtualWANsResult struct {
autorest.Response `json:"-"`
// Value - List of VirtualWANs.
@@ -12667,14 +14830,24 @@ type ListVirtualWANsResultIterator struct {
page ListVirtualWANsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListVirtualWANsResultIterator) Next() error {
+func (iter *ListVirtualWANsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12683,6 +14856,13 @@ func (iter *ListVirtualWANsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListVirtualWANsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListVirtualWANsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12702,6 +14882,11 @@ func (iter ListVirtualWANsResultIterator) Value() VirtualWAN {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListVirtualWANsResultIterator type.
+func NewListVirtualWANsResultIterator(page ListVirtualWANsResultPage) ListVirtualWANsResultIterator {
+ return ListVirtualWANsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
return lvwnr.Value == nil || len(*lvwnr.Value) == 0
@@ -12709,11 +14894,11 @@ func (lvwnr ListVirtualWANsResult) IsEmpty() bool {
// listVirtualWANsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer() (*http.Request, error) {
+func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer(ctx context.Context) (*http.Request, error) {
if lvwnr.NextLink == nil || len(to.String(lvwnr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lvwnr.NextLink)))
@@ -12721,14 +14906,24 @@ func (lvwnr ListVirtualWANsResult) listVirtualWANsResultPreparer() (*http.Reques
// ListVirtualWANsResultPage contains a page of VirtualWAN values.
type ListVirtualWANsResultPage struct {
- fn func(ListVirtualWANsResult) (ListVirtualWANsResult, error)
+ fn func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)
lvwnr ListVirtualWANsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListVirtualWANsResultPage) Next() error {
- next, err := page.fn(page.lvwnr)
+func (page *ListVirtualWANsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVirtualWANsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lvwnr)
if err != nil {
return err
}
@@ -12736,6 +14931,13 @@ func (page *ListVirtualWANsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListVirtualWANsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListVirtualWANsResultPage) NotDone() bool {
return !page.lvwnr.IsEmpty()
@@ -12754,8 +14956,13 @@ func (page ListVirtualWANsResultPage) Values() []VirtualWAN {
return *page.lvwnr.Value
}
-// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway. It
-// contains a list of Vpn Connections and a URL nextLink to get the next set of results.
+// Creates a new instance of the ListVirtualWANsResultPage type.
+func NewListVirtualWANsResultPage(getNextPage func(context.Context, ListVirtualWANsResult) (ListVirtualWANsResult, error)) ListVirtualWANsResultPage {
+ return ListVirtualWANsResultPage{fn: getNextPage}
+}
+
+// ListVpnConnectionsResult result of the request to list all vpn connections to a virtual wan vpn gateway.
+// It contains a list of Vpn Connections and a URL nextLink to get the next set of results.
type ListVpnConnectionsResult struct {
autorest.Response `json:"-"`
// Value - List of Vpn Connections.
@@ -12770,14 +14977,24 @@ type ListVpnConnectionsResultIterator struct {
page ListVpnConnectionsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListVpnConnectionsResultIterator) Next() error {
+func (iter *ListVpnConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12786,6 +15003,13 @@ func (iter *ListVpnConnectionsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListVpnConnectionsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListVpnConnectionsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12805,6 +15029,11 @@ func (iter ListVpnConnectionsResultIterator) Value() VpnConnection {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListVpnConnectionsResultIterator type.
+func NewListVpnConnectionsResultIterator(page ListVpnConnectionsResultPage) ListVpnConnectionsResultIterator {
+ return ListVpnConnectionsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
return lvcr.Value == nil || len(*lvcr.Value) == 0
@@ -12812,11 +15041,11 @@ func (lvcr ListVpnConnectionsResult) IsEmpty() bool {
// listVpnConnectionsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer() (*http.Request, error) {
+func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
if lvcr.NextLink == nil || len(to.String(lvcr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lvcr.NextLink)))
@@ -12824,14 +15053,24 @@ func (lvcr ListVpnConnectionsResult) listVpnConnectionsResultPreparer() (*http.R
// ListVpnConnectionsResultPage contains a page of VpnConnection values.
type ListVpnConnectionsResultPage struct {
- fn func(ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
+ fn func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)
lvcr ListVpnConnectionsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListVpnConnectionsResultPage) Next() error {
- next, err := page.fn(page.lvcr)
+func (page *ListVpnConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnConnectionsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lvcr)
if err != nil {
return err
}
@@ -12839,6 +15078,13 @@ func (page *ListVpnConnectionsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListVpnConnectionsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListVpnConnectionsResultPage) NotDone() bool {
return !page.lvcr.IsEmpty()
@@ -12857,8 +15103,13 @@ func (page ListVpnConnectionsResultPage) Values() []VpnConnection {
return *page.lvcr.Value
}
-// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a URL
-// nextLink to get the next set of results.
+// Creates a new instance of the ListVpnConnectionsResultPage type.
+func NewListVpnConnectionsResultPage(getNextPage func(context.Context, ListVpnConnectionsResult) (ListVpnConnectionsResult, error)) ListVpnConnectionsResultPage {
+ return ListVpnConnectionsResultPage{fn: getNextPage}
+}
+
+// ListVpnGatewaysResult result of the request to list VpnGateways. It contains a list of VpnGateways and a
+// URL nextLink to get the next set of results.
type ListVpnGatewaysResult struct {
autorest.Response `json:"-"`
// Value - List of VpnGateways.
@@ -12873,14 +15124,24 @@ type ListVpnGatewaysResultIterator struct {
page ListVpnGatewaysResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListVpnGatewaysResultIterator) Next() error {
+func (iter *ListVpnGatewaysResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12889,6 +15150,13 @@ func (iter *ListVpnGatewaysResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListVpnGatewaysResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListVpnGatewaysResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -12908,6 +15176,11 @@ func (iter ListVpnGatewaysResultIterator) Value() VpnGateway {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListVpnGatewaysResultIterator type.
+func NewListVpnGatewaysResultIterator(page ListVpnGatewaysResultPage) ListVpnGatewaysResultIterator {
+ return ListVpnGatewaysResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
return lvgr.Value == nil || len(*lvgr.Value) == 0
@@ -12915,11 +15188,11 @@ func (lvgr ListVpnGatewaysResult) IsEmpty() bool {
// listVpnGatewaysResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer() (*http.Request, error) {
+func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer(ctx context.Context) (*http.Request, error) {
if lvgr.NextLink == nil || len(to.String(lvgr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lvgr.NextLink)))
@@ -12927,14 +15200,24 @@ func (lvgr ListVpnGatewaysResult) listVpnGatewaysResultPreparer() (*http.Request
// ListVpnGatewaysResultPage contains a page of VpnGateway values.
type ListVpnGatewaysResultPage struct {
- fn func(ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
+ fn func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)
lvgr ListVpnGatewaysResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListVpnGatewaysResultPage) Next() error {
- next, err := page.fn(page.lvgr)
+func (page *ListVpnGatewaysResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnGatewaysResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lvgr)
if err != nil {
return err
}
@@ -12942,6 +15225,13 @@ func (page *ListVpnGatewaysResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListVpnGatewaysResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListVpnGatewaysResultPage) NotDone() bool {
return !page.lvgr.IsEmpty()
@@ -12960,8 +15250,13 @@ func (page ListVpnGatewaysResultPage) Values() []VpnGateway {
return *page.lvgr.Value
}
-// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to
-// get the next set of results.
+// Creates a new instance of the ListVpnGatewaysResultPage type.
+func NewListVpnGatewaysResultPage(getNextPage func(context.Context, ListVpnGatewaysResult) (ListVpnGatewaysResult, error)) ListVpnGatewaysResultPage {
+ return ListVpnGatewaysResultPage{fn: getNextPage}
+}
+
+// ListVpnSitesResult result of the request to list VpnSites. It contains a list of VpnSites and a URL
+// nextLink to get the next set of results.
type ListVpnSitesResult struct {
autorest.Response `json:"-"`
// Value - List of VpnSites.
@@ -12976,14 +15271,24 @@ type ListVpnSitesResultIterator struct {
page ListVpnSitesResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListVpnSitesResultIterator) Next() error {
+func (iter *ListVpnSitesResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -12992,6 +15297,13 @@ func (iter *ListVpnSitesResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListVpnSitesResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListVpnSitesResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -13011,6 +15323,11 @@ func (iter ListVpnSitesResultIterator) Value() VpnSite {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListVpnSitesResultIterator type.
+func NewListVpnSitesResultIterator(page ListVpnSitesResultPage) ListVpnSitesResultIterator {
+ return ListVpnSitesResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lvsr ListVpnSitesResult) IsEmpty() bool {
return lvsr.Value == nil || len(*lvsr.Value) == 0
@@ -13018,11 +15335,11 @@ func (lvsr ListVpnSitesResult) IsEmpty() bool {
// listVpnSitesResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer() (*http.Request, error) {
+func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer(ctx context.Context) (*http.Request, error) {
if lvsr.NextLink == nil || len(to.String(lvsr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lvsr.NextLink)))
@@ -13030,14 +15347,24 @@ func (lvsr ListVpnSitesResult) listVpnSitesResultPreparer() (*http.Request, erro
// ListVpnSitesResultPage contains a page of VpnSite values.
type ListVpnSitesResultPage struct {
- fn func(ListVpnSitesResult) (ListVpnSitesResult, error)
+ fn func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)
lvsr ListVpnSitesResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListVpnSitesResultPage) Next() error {
- next, err := page.fn(page.lvsr)
+func (page *ListVpnSitesResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListVpnSitesResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lvsr)
if err != nil {
return err
}
@@ -13045,6 +15372,13 @@ func (page *ListVpnSitesResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListVpnSitesResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListVpnSitesResultPage) NotDone() bool {
return !page.lvsr.IsEmpty()
@@ -13063,6 +15397,11 @@ func (page ListVpnSitesResultPage) Values() []VpnSite {
return *page.lvsr.Value
}
+// Creates a new instance of the ListVpnSitesResultPage type.
+func NewListVpnSitesResultPage(getNextPage func(context.Context, ListVpnSitesResult) (ListVpnSitesResult, error)) ListVpnSitesResultPage {
+ return ListVpnSitesResultPage{fn: getNextPage}
+}
+
// LoadBalancer loadBalancer resource
type LoadBalancer struct {
autorest.Response `json:"-"`
@@ -13210,21 +15549,31 @@ type LoadBalancerBackendAddressPoolListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of BackendAddressPool
-// values.
+// LoadBalancerBackendAddressPoolListResultIterator provides access to a complete listing of
+// BackendAddressPool values.
type LoadBalancerBackendAddressPoolListResultIterator struct {
i int
page LoadBalancerBackendAddressPoolListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
+func (iter *LoadBalancerBackendAddressPoolListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -13233,6 +15582,13 @@ func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerBackendAddressPoolListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LoadBalancerBackendAddressPoolListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -13252,6 +15608,11 @@ func (iter LoadBalancerBackendAddressPoolListResultIterator) Value() BackendAddr
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoadBalancerBackendAddressPoolListResultIterator type.
+func NewLoadBalancerBackendAddressPoolListResultIterator(page LoadBalancerBackendAddressPoolListResultPage) LoadBalancerBackendAddressPoolListResultIterator {
+ return LoadBalancerBackendAddressPoolListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
return lbbaplr.Value == nil || len(*lbbaplr.Value) == 0
@@ -13259,11 +15620,11 @@ func (lbbaplr LoadBalancerBackendAddressPoolListResult) IsEmpty() bool {
// loadBalancerBackendAddressPoolListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer() (*http.Request, error) {
+func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddressPoolListResultPreparer(ctx context.Context) (*http.Request, error) {
if lbbaplr.NextLink == nil || len(to.String(lbbaplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lbbaplr.NextLink)))
@@ -13271,14 +15632,24 @@ func (lbbaplr LoadBalancerBackendAddressPoolListResult) loadBalancerBackendAddre
// LoadBalancerBackendAddressPoolListResultPage contains a page of BackendAddressPool values.
type LoadBalancerBackendAddressPoolListResultPage struct {
- fn func(LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
+ fn func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)
lbbaplr LoadBalancerBackendAddressPoolListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
- next, err := page.fn(page.lbbaplr)
+func (page *LoadBalancerBackendAddressPoolListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerBackendAddressPoolListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lbbaplr)
if err != nil {
return err
}
@@ -13286,6 +15657,13 @@ func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerBackendAddressPoolListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LoadBalancerBackendAddressPoolListResultPage) NotDone() bool {
return !page.lbbaplr.IsEmpty()
@@ -13304,6 +15682,11 @@ func (page LoadBalancerBackendAddressPoolListResultPage) Values() []BackendAddre
return *page.lbbaplr.Value
}
+// Creates a new instance of the LoadBalancerBackendAddressPoolListResultPage type.
+func NewLoadBalancerBackendAddressPoolListResultPage(getNextPage func(context.Context, LoadBalancerBackendAddressPoolListResult) (LoadBalancerBackendAddressPoolListResult, error)) LoadBalancerBackendAddressPoolListResultPage {
+ return LoadBalancerBackendAddressPoolListResultPage{fn: getNextPage}
+}
+
// LoadBalancerFrontendIPConfigurationListResult response for ListFrontendIPConfiguration API service call.
type LoadBalancerFrontendIPConfigurationListResult struct {
autorest.Response `json:"-"`
@@ -13320,14 +15703,24 @@ type LoadBalancerFrontendIPConfigurationListResultIterator struct {
page LoadBalancerFrontendIPConfigurationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
+func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -13336,6 +15729,13 @@ func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerFrontendIPConfigurationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LoadBalancerFrontendIPConfigurationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -13355,6 +15755,11 @@ func (iter LoadBalancerFrontendIPConfigurationListResultIterator) Value() Fronte
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultIterator type.
+func NewLoadBalancerFrontendIPConfigurationListResultIterator(page LoadBalancerFrontendIPConfigurationListResultPage) LoadBalancerFrontendIPConfigurationListResultIterator {
+ return LoadBalancerFrontendIPConfigurationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
return lbficlr.Value == nil || len(*lbficlr.Value) == 0
@@ -13362,11 +15767,11 @@ func (lbficlr LoadBalancerFrontendIPConfigurationListResult) IsEmpty() bool {
// loadBalancerFrontendIPConfigurationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer() (*http.Request, error) {
+func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFrontendIPConfigurationListResultPreparer(ctx context.Context) (*http.Request, error) {
if lbficlr.NextLink == nil || len(to.String(lbficlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lbficlr.NextLink)))
@@ -13374,14 +15779,24 @@ func (lbficlr LoadBalancerFrontendIPConfigurationListResult) loadBalancerFronten
// LoadBalancerFrontendIPConfigurationListResultPage contains a page of FrontendIPConfiguration values.
type LoadBalancerFrontendIPConfigurationListResultPage struct {
- fn func(LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
+ fn func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)
lbficlr LoadBalancerFrontendIPConfigurationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
- next, err := page.fn(page.lbficlr)
+func (page *LoadBalancerFrontendIPConfigurationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerFrontendIPConfigurationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lbficlr)
if err != nil {
return err
}
@@ -13389,6 +15804,13 @@ func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerFrontendIPConfigurationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LoadBalancerFrontendIPConfigurationListResultPage) NotDone() bool {
return !page.lbficlr.IsEmpty()
@@ -13407,6 +15829,11 @@ func (page LoadBalancerFrontendIPConfigurationListResultPage) Values() []Fronten
return *page.lbficlr.Value
}
+// Creates a new instance of the LoadBalancerFrontendIPConfigurationListResultPage type.
+func NewLoadBalancerFrontendIPConfigurationListResultPage(getNextPage func(context.Context, LoadBalancerFrontendIPConfigurationListResult) (LoadBalancerFrontendIPConfigurationListResult, error)) LoadBalancerFrontendIPConfigurationListResultPage {
+ return LoadBalancerFrontendIPConfigurationListResultPage{fn: getNextPage}
+}
+
// LoadBalancerListResult response for ListLoadBalancers API service call.
type LoadBalancerListResult struct {
autorest.Response `json:"-"`
@@ -13422,14 +15849,171 @@ type LoadBalancerListResultIterator struct {
page LoadBalancerListResultPage
}
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
// Next advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoadBalancerListResultIterator) Next() error {
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter LoadBalancerListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
+ if !iter.page.NotDone() {
+ return LoadBalancer{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the LoadBalancerListResultIterator type.
+func NewLoadBalancerListResultIterator(page LoadBalancerListResultPage) LoadBalancerListResultIterator {
+ return LoadBalancerListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (lblr LoadBalancerListResult) IsEmpty() bool {
+ return lblr.Value == nil || len(*lblr.Value) == 0
+}
+
+// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (lblr LoadBalancerListResult) loadBalancerListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(lblr.NextLink)))
+}
+
+// LoadBalancerListResultPage contains a page of LoadBalancer values.
+type LoadBalancerListResultPage struct {
+ fn func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)
+ lblr LoadBalancerListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *LoadBalancerListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lblr)
+ if err != nil {
+ return err
+ }
+ page.lblr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page LoadBalancerListResultPage) NotDone() bool {
+ return !page.lblr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
+ return page.lblr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page LoadBalancerListResultPage) Values() []LoadBalancer {
+ if page.lblr.IsEmpty() {
+ return nil
+ }
+ return *page.lblr.Value
+}
+
+// Creates a new instance of the LoadBalancerListResultPage type.
+func NewLoadBalancerListResultPage(getNextPage func(context.Context, LoadBalancerListResult) (LoadBalancerListResult, error)) LoadBalancerListResultPage {
+ return LoadBalancerListResultPage{fn: getNextPage}
+}
+
+// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
+type LoadBalancerLoadBalancingRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - A list of load balancing rules in a load balancer.
+ Value *[]LoadBalancingRule `json:"value,omitempty"`
+ // NextLink - The URL to get the next set of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of
+// LoadBalancingRule values.
+type LoadBalancerLoadBalancingRuleListResultIterator struct {
+ i int
+ page LoadBalancerLoadBalancingRuleListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *LoadBalancerLoadBalancingRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -13438,101 +16022,144 @@ func (iter *LoadBalancerListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerListResultIterator) NotDone() bool {
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
-func (iter LoadBalancerListResultIterator) Response() LoadBalancerListResult {
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
-func (iter LoadBalancerListResultIterator) Value() LoadBalancer {
+func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
if !iter.page.NotDone() {
- return LoadBalancer{}
+ return LoadBalancingRule{}
}
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultIterator type.
+func NewLoadBalancerLoadBalancingRuleListResultIterator(page LoadBalancerLoadBalancingRuleListResultPage) LoadBalancerLoadBalancingRuleListResultIterator {
+ return LoadBalancerLoadBalancingRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
-func (lblr LoadBalancerListResult) IsEmpty() bool {
- return lblr.Value == nil || len(*lblr.Value) == 0
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
+ return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
}
-// loadBalancerListResultPreparer prepares a request to retrieve the next set of results.
+// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lblr LoadBalancerListResult) loadBalancerListResultPreparer() (*http.Request, error) {
- if lblr.NextLink == nil || len(to.String(lblr.NextLink)) < 1 {
+func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
- autorest.WithBaseURL(to.String(lblr.NextLink)))
+ autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
}
-// LoadBalancerListResultPage contains a page of LoadBalancer values.
-type LoadBalancerListResultPage struct {
- fn func(LoadBalancerListResult) (LoadBalancerListResult, error)
- lblr LoadBalancerListResult
+// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
+type LoadBalancerLoadBalancingRuleListResultPage struct {
+ fn func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
+ lblbrlr LoadBalancerLoadBalancingRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoadBalancerListResultPage) Next() error {
- next, err := page.fn(page.lblr)
+func (page *LoadBalancerLoadBalancingRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerLoadBalancingRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lblbrlr)
if err != nil {
return err
}
- page.lblr = next
+ page.lblbrlr = next
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerListResultPage) NotDone() bool {
- return !page.lblr.IsEmpty()
+func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
+ return !page.lblbrlr.IsEmpty()
}
// Response returns the raw server response from the last page request.
-func (page LoadBalancerListResultPage) Response() LoadBalancerListResult {
- return page.lblr
+func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
+ return page.lblbrlr
}
// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerListResultPage) Values() []LoadBalancer {
- if page.lblr.IsEmpty() {
+func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
+ if page.lblbrlr.IsEmpty() {
return nil
}
- return *page.lblr.Value
+ return *page.lblbrlr.Value
}
-// LoadBalancerLoadBalancingRuleListResult response for ListLoadBalancingRule API service call.
-type LoadBalancerLoadBalancingRuleListResult struct {
+// Creates a new instance of the LoadBalancerLoadBalancingRuleListResultPage type.
+func NewLoadBalancerLoadBalancingRuleListResultPage(getNextPage func(context.Context, LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)) LoadBalancerLoadBalancingRuleListResultPage {
+ return LoadBalancerLoadBalancingRuleListResultPage{fn: getNextPage}
+}
+
+// LoadBalancerOutboundRuleListResult response for ListOutboundRule API service call.
+type LoadBalancerOutboundRuleListResult struct {
autorest.Response `json:"-"`
- // Value - A list of load balancing rules in a load balancer.
- Value *[]LoadBalancingRule `json:"value,omitempty"`
+ // Value - A list of outbound rules in a load balancer.
+ Value *[]OutboundRule `json:"value,omitempty"`
// NextLink - The URL to get the next set of results.
NextLink *string `json:"nextLink,omitempty"`
}
-// LoadBalancerLoadBalancingRuleListResultIterator provides access to a complete listing of LoadBalancingRule
-// values.
-type LoadBalancerLoadBalancingRuleListResultIterator struct {
+// LoadBalancerOutboundRuleListResultIterator provides access to a complete listing of OutboundRule values.
+type LoadBalancerOutboundRuleListResultIterator struct {
i int
- page LoadBalancerLoadBalancingRuleListResultPage
+ page LoadBalancerOutboundRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
+func (iter *LoadBalancerOutboundRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -13541,75 +16168,109 @@ func (iter *LoadBalancerLoadBalancingRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerOutboundRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
-func (iter LoadBalancerLoadBalancingRuleListResultIterator) NotDone() bool {
+func (iter LoadBalancerOutboundRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
}
// Response returns the raw server response from the last page request.
-func (iter LoadBalancerLoadBalancingRuleListResultIterator) Response() LoadBalancerLoadBalancingRuleListResult {
+func (iter LoadBalancerOutboundRuleListResultIterator) Response() LoadBalancerOutboundRuleListResult {
return iter.page.Response()
}
// Value returns the current value or a zero-initialized value if the
// iterator has advanced beyond the end of the collection.
-func (iter LoadBalancerLoadBalancingRuleListResultIterator) Value() LoadBalancingRule {
+func (iter LoadBalancerOutboundRuleListResultIterator) Value() OutboundRule {
if !iter.page.NotDone() {
- return LoadBalancingRule{}
+ return OutboundRule{}
}
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoadBalancerOutboundRuleListResultIterator type.
+func NewLoadBalancerOutboundRuleListResultIterator(page LoadBalancerOutboundRuleListResultPage) LoadBalancerOutboundRuleListResultIterator {
+ return LoadBalancerOutboundRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) IsEmpty() bool {
- return lblbrlr.Value == nil || len(*lblbrlr.Value) == 0
+func (lborlr LoadBalancerOutboundRuleListResult) IsEmpty() bool {
+ return lborlr.Value == nil || len(*lborlr.Value) == 0
}
-// loadBalancerLoadBalancingRuleListResultPreparer prepares a request to retrieve the next set of results.
+// loadBalancerOutboundRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lblbrlr LoadBalancerLoadBalancingRuleListResult) loadBalancerLoadBalancingRuleListResultPreparer() (*http.Request, error) {
- if lblbrlr.NextLink == nil || len(to.String(lblbrlr.NextLink)) < 1 {
+func (lborlr LoadBalancerOutboundRuleListResult) loadBalancerOutboundRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if lborlr.NextLink == nil || len(to.String(lborlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
- autorest.WithBaseURL(to.String(lblbrlr.NextLink)))
+ autorest.WithBaseURL(to.String(lborlr.NextLink)))
}
-// LoadBalancerLoadBalancingRuleListResultPage contains a page of LoadBalancingRule values.
-type LoadBalancerLoadBalancingRuleListResultPage struct {
- fn func(LoadBalancerLoadBalancingRuleListResult) (LoadBalancerLoadBalancingRuleListResult, error)
- lblbrlr LoadBalancerLoadBalancingRuleListResult
+// LoadBalancerOutboundRuleListResultPage contains a page of OutboundRule values.
+type LoadBalancerOutboundRuleListResultPage struct {
+ fn func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)
+ lborlr LoadBalancerOutboundRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoadBalancerLoadBalancingRuleListResultPage) Next() error {
- next, err := page.fn(page.lblbrlr)
+func (page *LoadBalancerOutboundRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerOutboundRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lborlr)
if err != nil {
return err
}
- page.lblbrlr = next
+ page.lborlr = next
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerOutboundRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
-func (page LoadBalancerLoadBalancingRuleListResultPage) NotDone() bool {
- return !page.lblbrlr.IsEmpty()
+func (page LoadBalancerOutboundRuleListResultPage) NotDone() bool {
+ return !page.lborlr.IsEmpty()
}
// Response returns the raw server response from the last page request.
-func (page LoadBalancerLoadBalancingRuleListResultPage) Response() LoadBalancerLoadBalancingRuleListResult {
- return page.lblbrlr
+func (page LoadBalancerOutboundRuleListResultPage) Response() LoadBalancerOutboundRuleListResult {
+ return page.lborlr
}
// Values returns the slice of values for the current page or nil if there are no values.
-func (page LoadBalancerLoadBalancingRuleListResultPage) Values() []LoadBalancingRule {
- if page.lblbrlr.IsEmpty() {
+func (page LoadBalancerOutboundRuleListResultPage) Values() []OutboundRule {
+ if page.lborlr.IsEmpty() {
return nil
}
- return *page.lblbrlr.Value
+ return *page.lborlr.Value
+}
+
+// Creates a new instance of the LoadBalancerOutboundRuleListResultPage type.
+func NewLoadBalancerOutboundRuleListResultPage(getNextPage func(context.Context, LoadBalancerOutboundRuleListResult) (LoadBalancerOutboundRuleListResult, error)) LoadBalancerOutboundRuleListResultPage {
+ return LoadBalancerOutboundRuleListResultPage{fn: getNextPage}
}
// LoadBalancerProbeListResult response for ListProbe API service call.
@@ -13627,14 +16288,24 @@ type LoadBalancerProbeListResultIterator struct {
page LoadBalancerProbeListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoadBalancerProbeListResultIterator) Next() error {
+func (iter *LoadBalancerProbeListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -13643,6 +16314,13 @@ func (iter *LoadBalancerProbeListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoadBalancerProbeListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LoadBalancerProbeListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -13662,6 +16340,11 @@ func (iter LoadBalancerProbeListResultIterator) Value() Probe {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoadBalancerProbeListResultIterator type.
+func NewLoadBalancerProbeListResultIterator(page LoadBalancerProbeListResultPage) LoadBalancerProbeListResultIterator {
+ return LoadBalancerProbeListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
return lbplr.Value == nil || len(*lbplr.Value) == 0
@@ -13669,11 +16352,11 @@ func (lbplr LoadBalancerProbeListResult) IsEmpty() bool {
// loadBalancerProbeListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (*http.Request, error) {
+func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer(ctx context.Context) (*http.Request, error) {
if lbplr.NextLink == nil || len(to.String(lbplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lbplr.NextLink)))
@@ -13681,14 +16364,24 @@ func (lbplr LoadBalancerProbeListResult) loadBalancerProbeListResultPreparer() (
// LoadBalancerProbeListResultPage contains a page of Probe values.
type LoadBalancerProbeListResultPage struct {
- fn func(LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
+ fn func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)
lbplr LoadBalancerProbeListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoadBalancerProbeListResultPage) Next() error {
- next, err := page.fn(page.lbplr)
+func (page *LoadBalancerProbeListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoadBalancerProbeListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lbplr)
if err != nil {
return err
}
@@ -13696,6 +16389,13 @@ func (page *LoadBalancerProbeListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoadBalancerProbeListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LoadBalancerProbeListResultPage) NotDone() bool {
return !page.lbplr.IsEmpty()
@@ -13714,6 +16414,11 @@ func (page LoadBalancerProbeListResultPage) Values() []Probe {
return *page.lbplr.Value
}
+// Creates a new instance of the LoadBalancerProbeListResultPage type.
+func NewLoadBalancerProbeListResultPage(getNextPage func(context.Context, LoadBalancerProbeListResult) (LoadBalancerProbeListResult, error)) LoadBalancerProbeListResultPage {
+ return LoadBalancerProbeListResultPage{fn: getNextPage}
+}
+
// LoadBalancerPropertiesFormat properties of the load balancer.
type LoadBalancerPropertiesFormat struct {
// FrontendIPConfigurations - Object representing the frontend IPs to be used for the load balancer
@@ -13736,8 +16441,8 @@ type LoadBalancerPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// LoadBalancersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type LoadBalancersCreateOrUpdateFuture struct {
azure.Future
}
@@ -13765,7 +16470,8 @@ func (future *LoadBalancersCreateOrUpdateFuture) Result(client LoadBalancersClie
return
}
-// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// LoadBalancersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type LoadBalancersDeleteFuture struct {
azure.Future
}
@@ -14065,20 +16771,31 @@ type LocalNetworkGatewayListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway values.
+// LocalNetworkGatewayListResultIterator provides access to a complete listing of LocalNetworkGateway
+// values.
type LocalNetworkGatewayListResultIterator struct {
i int
page LocalNetworkGatewayListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LocalNetworkGatewayListResultIterator) Next() error {
+func (iter *LocalNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -14087,6 +16804,13 @@ func (iter *LocalNetworkGatewayListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LocalNetworkGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LocalNetworkGatewayListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -14106,6 +16830,11 @@ func (iter LocalNetworkGatewayListResultIterator) Value() LocalNetworkGateway {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LocalNetworkGatewayListResultIterator type.
+func NewLocalNetworkGatewayListResultIterator(page LocalNetworkGatewayListResultPage) LocalNetworkGatewayListResultIterator {
+ return LocalNetworkGatewayListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
return lnglr.Value == nil || len(*lnglr.Value) == 0
@@ -14113,11 +16842,11 @@ func (lnglr LocalNetworkGatewayListResult) IsEmpty() bool {
// localNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer() (*http.Request, error) {
+func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
if lnglr.NextLink == nil || len(to.String(lnglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lnglr.NextLink)))
@@ -14125,14 +16854,24 @@ func (lnglr LocalNetworkGatewayListResult) localNetworkGatewayListResultPreparer
// LocalNetworkGatewayListResultPage contains a page of LocalNetworkGateway values.
type LocalNetworkGatewayListResultPage struct {
- fn func(LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
+ fn func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)
lnglr LocalNetworkGatewayListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LocalNetworkGatewayListResultPage) Next() error {
- next, err := page.fn(page.lnglr)
+func (page *LocalNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocalNetworkGatewayListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lnglr)
if err != nil {
return err
}
@@ -14140,6 +16879,13 @@ func (page *LocalNetworkGatewayListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LocalNetworkGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LocalNetworkGatewayListResultPage) NotDone() bool {
return !page.lnglr.IsEmpty()
@@ -14158,6 +16904,11 @@ func (page LocalNetworkGatewayListResultPage) Values() []LocalNetworkGateway {
return *page.lnglr.Value
}
+// Creates a new instance of the LocalNetworkGatewayListResultPage type.
+func NewLocalNetworkGatewayListResultPage(getNextPage func(context.Context, LocalNetworkGatewayListResult) (LocalNetworkGatewayListResult, error)) LocalNetworkGatewayListResultPage {
+ return LocalNetworkGatewayListResultPage{fn: getNextPage}
+}
+
// LocalNetworkGatewayPropertiesFormat localNetworkGateway properties
type LocalNetworkGatewayPropertiesFormat struct {
// LocalNetworkAddressSpace - Local network site address space.
@@ -14201,8 +16952,8 @@ func (future *LocalNetworkGatewaysCreateOrUpdateFuture) Result(client LocalNetwo
return
}
-// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// LocalNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type LocalNetworkGatewaysDeleteFuture struct {
azure.Future
}
@@ -14224,8 +16975,8 @@ func (future *LocalNetworkGatewaysDeleteFuture) Result(client LocalNetworkGatewa
return
}
-// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// LocalNetworkGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type LocalNetworkGatewaysUpdateTagsFuture struct {
azure.Future
}
@@ -14419,8 +17170,8 @@ type OperationDisplay struct {
Description *string `json:"description,omitempty"`
}
-// OperationListResult result of the request to list Network operations. It contains a list of operations and a URL
-// link to get the next set of results.
+// OperationListResult result of the request to list Network operations. It contains a list of operations
+// and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of Network operations supported by the Network resource provider.
@@ -14435,14 +17186,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -14451,6 +17212,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -14470,6 +17238,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -14477,11 +17250,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -14489,14 +17262,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -14504,6 +17287,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -14522,6 +17312,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationPropertiesFormat description of operation properties format.
type OperationPropertiesFormat struct {
// ServiceSpecification - Specification of the service.
@@ -14538,6 +17333,7 @@ type OperationPropertiesFormatServiceSpecification struct {
// OutboundRule outbound pool of the load balancer.
type OutboundRule struct {
+ autorest.Response `json:"-"`
// OutboundRulePropertiesFormat - Properties of load balancer outbound rule.
*OutboundRulePropertiesFormat `json:"properties,omitempty"`
// Name - The name of the resource that is unique within a resource group. This name can be used to access the resource.
@@ -14774,8 +17570,8 @@ type P2SVpnGatewayProperties struct {
VpnClientConnectionHealth *VpnClientConnectionHealth `json:"vpnClientConnectionHealth,omitempty"`
}
-// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// P2sVpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type P2sVpnGatewaysCreateOrUpdateFuture struct {
azure.Future
}
@@ -14803,7 +17599,8 @@ func (future *P2sVpnGatewaysCreateOrUpdateFuture) Result(client P2sVpnGatewaysCl
return
}
-// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// P2sVpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type P2sVpnGatewaysDeleteFuture struct {
azure.Future
}
@@ -14854,8 +17651,8 @@ func (future *P2sVpnGatewaysGenerateVpnProfileFuture) Result(client P2sVpnGatewa
return
}
-// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// P2sVpnGatewaysUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type P2sVpnGatewaysUpdateTagsFuture struct {
azure.Future
}
@@ -14889,7 +17686,8 @@ type P2SVpnProfileParameters struct {
AuthenticationMethod AuthenticationMethod `json:"authenticationMethod,omitempty"`
}
-// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of P2SVpnServerConfiguration.
+// P2SVpnServerConfigRadiusClientRootCertificate radius client root certificate of
+// P2SVpnServerConfiguration.
type P2SVpnServerConfigRadiusClientRootCertificate struct {
// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat - Properties of the Radius client root certificate.
*P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat `json:"properties,omitempty"`
@@ -14970,8 +17768,8 @@ func (pvscrcrc *P2SVpnServerConfigRadiusClientRootCertificate) UnmarshalJSON(bod
return nil
}
-// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root certificate
-// of P2SVpnServerConfiguration.
+// P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat properties of the Radius client root
+// certificate of P2SVpnServerConfiguration.
type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
// Thumbprint - The Radius client root certificate thumbprint.
Thumbprint *string `json:"thumbprint,omitempty"`
@@ -14979,7 +17777,8 @@ type P2SVpnServerConfigRadiusClientRootCertificatePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of P2SVpnServerConfiguration.
+// P2SVpnServerConfigRadiusServerRootCertificate radius Server root certificate of
+// P2SVpnServerConfiguration.
type P2SVpnServerConfigRadiusServerRootCertificate struct {
// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat - Properties of the P2SVpnServerConfiguration Radius Server root certificate.
*P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat `json:"properties,omitempty"`
@@ -15060,8 +17859,8 @@ func (pvscrsrc *P2SVpnServerConfigRadiusServerRootCertificate) UnmarshalJSON(bod
return nil
}
-// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root certificate of
-// P2SVpnServerConfiguration.
+// P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat properties of Radius Server root
+// certificate of P2SVpnServerConfiguration.
type P2SVpnServerConfigRadiusServerRootCertificatePropertiesFormat struct {
// PublicCertData - The certificate public data.
PublicCertData *string `json:"publicCertData,omitempty"`
@@ -15177,8 +17976,8 @@ type P2SVpnServerConfigurationProperties struct {
Etag *string `json:"etag,omitempty"`
}
-// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// P2sVpnServerConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type P2sVpnServerConfigurationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -15229,7 +18028,8 @@ func (future *P2sVpnServerConfigurationsDeleteFuture) Result(client P2sVpnServer
return
}
-// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of P2SVpnServerConfiguration.
+// P2SVpnServerConfigVpnClientRevokedCertificate VPN client revoked certificate of
+// P2SVpnServerConfiguration.
type P2SVpnServerConfigVpnClientRevokedCertificate struct {
// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat - Properties of the vpn client revoked certificate.
*P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat `json:"properties,omitempty"`
@@ -15310,8 +18110,8 @@ func (pvscvcrc *P2SVpnServerConfigVpnClientRevokedCertificate) UnmarshalJSON(bod
return nil
}
-// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate
-// of P2SVpnServerConfiguration.
+// P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client
+// certificate of P2SVpnServerConfiguration.
type P2SVpnServerConfigVpnClientRevokedCertificatePropertiesFormat struct {
// Thumbprint - The revoked VPN client certificate thumbprint.
Thumbprint *string `json:"thumbprint,omitempty"`
@@ -15595,7 +18395,8 @@ type PacketCaptureResultProperties struct {
Filters *[]PacketCaptureFilter `json:"filters,omitempty"`
}
-// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// PacketCapturesCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type PacketCapturesCreateFuture struct {
azure.Future
}
@@ -15623,7 +18424,8 @@ func (future *PacketCapturesCreateFuture) Result(client PacketCapturesClient) (p
return
}
-// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// PacketCapturesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type PacketCapturesDeleteFuture struct {
azure.Future
}
@@ -15674,7 +18476,8 @@ func (future *PacketCapturesGetStatusFuture) Result(client PacketCapturesClient)
return
}
-// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// PacketCapturesStopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type PacketCapturesStopFuture struct {
azure.Future
}
@@ -16133,14 +18936,24 @@ type ProfileListResultIterator struct {
page ProfileListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ProfileListResultIterator) Next() error {
+func (iter *ProfileListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -16149,6 +18962,13 @@ func (iter *ProfileListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProfileListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProfileListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -16168,6 +18988,11 @@ func (iter ProfileListResultIterator) Value() Profile {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ProfileListResultIterator type.
+func NewProfileListResultIterator(page ProfileListResultPage) ProfileListResultIterator {
+ return ProfileListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (plr ProfileListResult) IsEmpty() bool {
return plr.Value == nil || len(*plr.Value) == 0
@@ -16175,11 +19000,11 @@ func (plr ProfileListResult) IsEmpty() bool {
// profileListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (plr ProfileListResult) profileListResultPreparer() (*http.Request, error) {
+func (plr ProfileListResult) profileListResultPreparer(ctx context.Context) (*http.Request, error) {
if plr.NextLink == nil || len(to.String(plr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(plr.NextLink)))
@@ -16187,14 +19012,24 @@ func (plr ProfileListResult) profileListResultPreparer() (*http.Request, error)
// ProfileListResultPage contains a page of Profile values.
type ProfileListResultPage struct {
- fn func(ProfileListResult) (ProfileListResult, error)
+ fn func(context.Context, ProfileListResult) (ProfileListResult, error)
plr ProfileListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ProfileListResultPage) Next() error {
- next, err := page.fn(page.plr)
+func (page *ProfileListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfileListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.plr)
if err != nil {
return err
}
@@ -16202,6 +19037,13 @@ func (page *ProfileListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProfileListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProfileListResultPage) NotDone() bool {
return !page.plr.IsEmpty()
@@ -16220,6 +19062,11 @@ func (page ProfileListResultPage) Values() []Profile {
return *page.plr.Value
}
+// Creates a new instance of the ProfileListResultPage type.
+func NewProfileListResultPage(getNextPage func(context.Context, ProfileListResult) (ProfileListResult, error)) ProfileListResultPage {
+ return ProfileListResultPage{fn: getNextPage}
+}
+
// ProfilePropertiesFormat network profile properties.
type ProfilePropertiesFormat struct {
// ContainerNetworkInterfaces - List of child container network interfaces.
@@ -16399,8 +19246,8 @@ type PublicIPAddressDNSSettings struct {
ReverseFqdn *string `json:"reverseFqdn,omitempty"`
}
-// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// PublicIPAddressesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type PublicIPAddressesCreateOrUpdateFuture struct {
azure.Future
}
@@ -16451,8 +19298,8 @@ func (future *PublicIPAddressesDeleteFuture) Result(client PublicIPAddressesClie
return
}
-// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// PublicIPAddressesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type PublicIPAddressesUpdateTagsFuture struct {
azure.Future
}
@@ -16495,14 +19342,24 @@ type PublicIPAddressListResultIterator struct {
page PublicIPAddressListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *PublicIPAddressListResultIterator) Next() error {
+func (iter *PublicIPAddressListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -16511,6 +19368,13 @@ func (iter *PublicIPAddressListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PublicIPAddressListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PublicIPAddressListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -16530,6 +19394,11 @@ func (iter PublicIPAddressListResultIterator) Value() PublicIPAddress {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the PublicIPAddressListResultIterator type.
+func NewPublicIPAddressListResultIterator(page PublicIPAddressListResultPage) PublicIPAddressListResultIterator {
+ return PublicIPAddressListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pialr PublicIPAddressListResult) IsEmpty() bool {
return pialr.Value == nil || len(*pialr.Value) == 0
@@ -16537,11 +19406,11 @@ func (pialr PublicIPAddressListResult) IsEmpty() bool {
// publicIPAddressListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*http.Request, error) {
+func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer(ctx context.Context) (*http.Request, error) {
if pialr.NextLink == nil || len(to.String(pialr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pialr.NextLink)))
@@ -16549,14 +19418,24 @@ func (pialr PublicIPAddressListResult) publicIPAddressListResultPreparer() (*htt
// PublicIPAddressListResultPage contains a page of PublicIPAddress values.
type PublicIPAddressListResultPage struct {
- fn func(PublicIPAddressListResult) (PublicIPAddressListResult, error)
+ fn func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)
pialr PublicIPAddressListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *PublicIPAddressListResultPage) Next() error {
- next, err := page.fn(page.pialr)
+func (page *PublicIPAddressListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pialr)
if err != nil {
return err
}
@@ -16564,6 +19443,13 @@ func (page *PublicIPAddressListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PublicIPAddressListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PublicIPAddressListResultPage) NotDone() bool {
return !page.pialr.IsEmpty()
@@ -16582,6 +19468,11 @@ func (page PublicIPAddressListResultPage) Values() []PublicIPAddress {
return *page.pialr.Value
}
+// Creates a new instance of the PublicIPAddressListResultPage type.
+func NewPublicIPAddressListResultPage(getNextPage func(context.Context, PublicIPAddressListResult) (PublicIPAddressListResult, error)) PublicIPAddressListResultPage {
+ return PublicIPAddressListResultPage{fn: getNextPage}
+}
+
// PublicIPAddressPropertiesFormat public IP address properties.
type PublicIPAddressPropertiesFormat struct {
// PublicIPAllocationMethod - The public IP allocation method. Possible values are: 'Static' and 'Dynamic'. Possible values include: 'Static', 'Dynamic'
@@ -16764,8 +19655,8 @@ func (pip *PublicIPPrefix) UnmarshalJSON(body []byte) error {
return nil
}
-// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// PublicIPPrefixesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type PublicIPPrefixesCreateOrUpdateFuture struct {
azure.Future
}
@@ -16816,8 +19707,8 @@ func (future *PublicIPPrefixesDeleteFuture) Result(client PublicIPPrefixesClient
return
}
-// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// PublicIPPrefixesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type PublicIPPrefixesUpdateTagsFuture struct {
azure.Future
}
@@ -16860,14 +19751,24 @@ type PublicIPPrefixListResultIterator struct {
page PublicIPPrefixListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *PublicIPPrefixListResultIterator) Next() error {
+func (iter *PublicIPPrefixListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -16876,6 +19777,13 @@ func (iter *PublicIPPrefixListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PublicIPPrefixListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PublicIPPrefixListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -16895,6 +19803,11 @@ func (iter PublicIPPrefixListResultIterator) Value() PublicIPPrefix {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the PublicIPPrefixListResultIterator type.
+func NewPublicIPPrefixListResultIterator(page PublicIPPrefixListResultPage) PublicIPPrefixListResultIterator {
+ return PublicIPPrefixListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (piplr PublicIPPrefixListResult) IsEmpty() bool {
return piplr.Value == nil || len(*piplr.Value) == 0
@@ -16902,11 +19815,11 @@ func (piplr PublicIPPrefixListResult) IsEmpty() bool {
// publicIPPrefixListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer() (*http.Request, error) {
+func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer(ctx context.Context) (*http.Request, error) {
if piplr.NextLink == nil || len(to.String(piplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(piplr.NextLink)))
@@ -16914,14 +19827,24 @@ func (piplr PublicIPPrefixListResult) publicIPPrefixListResultPreparer() (*http.
// PublicIPPrefixListResultPage contains a page of PublicIPPrefix values.
type PublicIPPrefixListResultPage struct {
- fn func(PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
+ fn func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)
piplr PublicIPPrefixListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *PublicIPPrefixListResultPage) Next() error {
- next, err := page.fn(page.piplr)
+func (page *PublicIPPrefixListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.piplr)
if err != nil {
return err
}
@@ -16929,6 +19852,13 @@ func (page *PublicIPPrefixListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PublicIPPrefixListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PublicIPPrefixListResultPage) NotDone() bool {
return !page.piplr.IsEmpty()
@@ -16947,6 +19877,11 @@ func (page PublicIPPrefixListResultPage) Values() []PublicIPPrefix {
return *page.piplr.Value
}
+// Creates a new instance of the PublicIPPrefixListResultPage type.
+func NewPublicIPPrefixListResultPage(getNextPage func(context.Context, PublicIPPrefixListResult) (PublicIPPrefixListResult, error)) PublicIPPrefixListResultPage {
+ return PublicIPPrefixListResultPage{fn: getNextPage}
+}
+
// PublicIPPrefixPropertiesFormat public IP prefix properties.
type PublicIPPrefixPropertiesFormat struct {
// PublicIPAddressVersion - The public IP address version. Possible values are: 'IPv4' and 'IPv6'. Possible values include: 'IPv4', 'IPv6'
@@ -16967,7 +19902,7 @@ type PublicIPPrefixPropertiesFormat struct {
// PublicIPPrefixSku SKU of a public IP prefix
type PublicIPPrefixSku struct {
- // Name - Name of a public IP prefix SKU. Possible values include: 'PublicIPPrefixSkuNameStandard'
+ // Name - Name of a public IP prefix SKU. Possible values include: 'Standard'
Name PublicIPPrefixSkuName `json:"name,omitempty"`
}
@@ -17337,14 +20272,24 @@ type RouteFilterListResultIterator struct {
page RouteFilterListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RouteFilterListResultIterator) Next() error {
+func (iter *RouteFilterListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -17353,6 +20298,13 @@ func (iter *RouteFilterListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RouteFilterListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RouteFilterListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -17372,6 +20324,11 @@ func (iter RouteFilterListResultIterator) Value() RouteFilter {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RouteFilterListResultIterator type.
+func NewRouteFilterListResultIterator(page RouteFilterListResultPage) RouteFilterListResultIterator {
+ return RouteFilterListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rflr RouteFilterListResult) IsEmpty() bool {
return rflr.Value == nil || len(*rflr.Value) == 0
@@ -17379,11 +20336,11 @@ func (rflr RouteFilterListResult) IsEmpty() bool {
// routeFilterListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request, error) {
+func (rflr RouteFilterListResult) routeFilterListResultPreparer(ctx context.Context) (*http.Request, error) {
if rflr.NextLink == nil || len(to.String(rflr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rflr.NextLink)))
@@ -17391,14 +20348,24 @@ func (rflr RouteFilterListResult) routeFilterListResultPreparer() (*http.Request
// RouteFilterListResultPage contains a page of RouteFilter values.
type RouteFilterListResultPage struct {
- fn func(RouteFilterListResult) (RouteFilterListResult, error)
+ fn func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)
rflr RouteFilterListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RouteFilterListResultPage) Next() error {
- next, err := page.fn(page.rflr)
+func (page *RouteFilterListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rflr)
if err != nil {
return err
}
@@ -17406,6 +20373,13 @@ func (page *RouteFilterListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RouteFilterListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RouteFilterListResultPage) NotDone() bool {
return !page.rflr.IsEmpty()
@@ -17424,6 +20398,11 @@ func (page RouteFilterListResultPage) Values() []RouteFilter {
return *page.rflr.Value
}
+// Creates a new instance of the RouteFilterListResultPage type.
+func NewRouteFilterListResultPage(getNextPage func(context.Context, RouteFilterListResult) (RouteFilterListResult, error)) RouteFilterListResultPage {
+ return RouteFilterListResultPage{fn: getNextPage}
+}
+
// RouteFilterPropertiesFormat route Filter Resource
type RouteFilterPropertiesFormat struct {
// Rules - Collection of RouteFilterRules contained within a route filter.
@@ -17544,14 +20523,24 @@ type RouteFilterRuleListResultIterator struct {
page RouteFilterRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RouteFilterRuleListResultIterator) Next() error {
+func (iter *RouteFilterRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -17560,6 +20549,13 @@ func (iter *RouteFilterRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RouteFilterRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RouteFilterRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -17579,6 +20575,11 @@ func (iter RouteFilterRuleListResultIterator) Value() RouteFilterRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RouteFilterRuleListResultIterator type.
+func NewRouteFilterRuleListResultIterator(page RouteFilterRuleListResultPage) RouteFilterRuleListResultIterator {
+ return RouteFilterRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
return rfrlr.Value == nil || len(*rfrlr.Value) == 0
@@ -17586,11 +20587,11 @@ func (rfrlr RouteFilterRuleListResult) IsEmpty() bool {
// routeFilterRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*http.Request, error) {
+func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if rfrlr.NextLink == nil || len(to.String(rfrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rfrlr.NextLink)))
@@ -17598,14 +20599,24 @@ func (rfrlr RouteFilterRuleListResult) routeFilterRuleListResultPreparer() (*htt
// RouteFilterRuleListResultPage contains a page of RouteFilterRule values.
type RouteFilterRuleListResultPage struct {
- fn func(RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
+ fn func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)
rfrlr RouteFilterRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RouteFilterRuleListResultPage) Next() error {
- next, err := page.fn(page.rfrlr)
+func (page *RouteFilterRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rfrlr)
if err != nil {
return err
}
@@ -17613,6 +20624,13 @@ func (page *RouteFilterRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RouteFilterRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RouteFilterRuleListResultPage) NotDone() bool {
return !page.rfrlr.IsEmpty()
@@ -17631,6 +20649,11 @@ func (page RouteFilterRuleListResultPage) Values() []RouteFilterRule {
return *page.rfrlr.Value
}
+// Creates a new instance of the RouteFilterRuleListResultPage type.
+func NewRouteFilterRuleListResultPage(getNextPage func(context.Context, RouteFilterRuleListResult) (RouteFilterRuleListResult, error)) RouteFilterRuleListResultPage {
+ return RouteFilterRuleListResultPage{fn: getNextPage}
+}
+
// RouteFilterRulePropertiesFormat route Filter Rule Resource
type RouteFilterRulePropertiesFormat struct {
// Access - The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values include: 'Allow', 'Deny'
@@ -17643,8 +20666,8 @@ type RouteFilterRulePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// RouteFilterRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type RouteFilterRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -17724,8 +20747,8 @@ func (future *RouteFilterRulesUpdateFuture) Result(client RouteFilterRulesClient
return
}
-// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// RouteFiltersCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type RouteFiltersCreateOrUpdateFuture struct {
azure.Future
}
@@ -17753,7 +20776,8 @@ func (future *RouteFiltersCreateOrUpdateFuture) Result(client RouteFiltersClient
return
}
-// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RouteFiltersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RouteFiltersDeleteFuture struct {
azure.Future
}
@@ -17775,7 +20799,8 @@ func (future *RouteFiltersDeleteFuture) Result(client RouteFiltersClient) (ar au
return
}
-// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RouteFiltersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RouteFiltersUpdateFuture struct {
azure.Future
}
@@ -17818,14 +20843,24 @@ type RouteListResultIterator struct {
page RouteListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RouteListResultIterator) Next() error {
+func (iter *RouteListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -17834,6 +20869,13 @@ func (iter *RouteListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RouteListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RouteListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -17853,6 +20895,11 @@ func (iter RouteListResultIterator) Value() Route {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RouteListResultIterator type.
+func NewRouteListResultIterator(page RouteListResultPage) RouteListResultIterator {
+ return RouteListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr RouteListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -17860,11 +20907,11 @@ func (rlr RouteListResult) IsEmpty() bool {
// routeListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) {
+func (rlr RouteListResult) routeListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -17872,14 +20919,24 @@ func (rlr RouteListResult) routeListResultPreparer() (*http.Request, error) {
// RouteListResultPage contains a page of Route values.
type RouteListResultPage struct {
- fn func(RouteListResult) (RouteListResult, error)
+ fn func(context.Context, RouteListResult) (RouteListResult, error)
rlr RouteListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RouteListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *RouteListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -17887,6 +20944,13 @@ func (page *RouteListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RouteListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RouteListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -17905,6 +20969,11 @@ func (page RouteListResultPage) Values() []Route {
return *page.rlr.Value
}
+// Creates a new instance of the RouteListResultPage type.
+func NewRouteListResultPage(getNextPage func(context.Context, RouteListResult) (RouteListResult, error)) RouteListResultPage {
+ return RouteListResultPage{fn: getNextPage}
+}
+
// RoutePropertiesFormat route resource
type RoutePropertiesFormat struct {
// AddressPrefix - The destination CIDR to which the route applies.
@@ -17917,7 +20986,8 @@ type RoutePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RoutesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RoutesCreateOrUpdateFuture struct {
azure.Future
}
@@ -18106,14 +21176,24 @@ type RouteTableListResultIterator struct {
page RouteTableListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RouteTableListResultIterator) Next() error {
+func (iter *RouteTableListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -18122,6 +21202,13 @@ func (iter *RouteTableListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RouteTableListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RouteTableListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -18141,6 +21228,11 @@ func (iter RouteTableListResultIterator) Value() RouteTable {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RouteTableListResultIterator type.
+func NewRouteTableListResultIterator(page RouteTableListResultPage) RouteTableListResultIterator {
+ return RouteTableListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rtlr RouteTableListResult) IsEmpty() bool {
return rtlr.Value == nil || len(*rtlr.Value) == 0
@@ -18148,11 +21240,11 @@ func (rtlr RouteTableListResult) IsEmpty() bool {
// routeTableListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request, error) {
+func (rtlr RouteTableListResult) routeTableListResultPreparer(ctx context.Context) (*http.Request, error) {
if rtlr.NextLink == nil || len(to.String(rtlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rtlr.NextLink)))
@@ -18160,14 +21252,24 @@ func (rtlr RouteTableListResult) routeTableListResultPreparer() (*http.Request,
// RouteTableListResultPage contains a page of RouteTable values.
type RouteTableListResultPage struct {
- fn func(RouteTableListResult) (RouteTableListResult, error)
+ fn func(context.Context, RouteTableListResult) (RouteTableListResult, error)
rtlr RouteTableListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RouteTableListResultPage) Next() error {
- next, err := page.fn(page.rtlr)
+func (page *RouteTableListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTableListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rtlr)
if err != nil {
return err
}
@@ -18175,6 +21277,13 @@ func (page *RouteTableListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RouteTableListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RouteTableListResultPage) NotDone() bool {
return !page.rtlr.IsEmpty()
@@ -18193,6 +21302,11 @@ func (page RouteTableListResultPage) Values() []RouteTable {
return *page.rtlr.Value
}
+// Creates a new instance of the RouteTableListResultPage type.
+func NewRouteTableListResultPage(getNextPage func(context.Context, RouteTableListResult) (RouteTableListResult, error)) RouteTableListResultPage {
+ return RouteTableListResultPage{fn: getNextPage}
+}
+
// RouteTablePropertiesFormat route Table resource
type RouteTablePropertiesFormat struct {
// Routes - Collection of routes contained within a route table.
@@ -18205,8 +21319,8 @@ type RouteTablePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// RouteTablesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type RouteTablesCreateOrUpdateFuture struct {
azure.Future
}
@@ -18234,7 +21348,8 @@ func (future *RouteTablesCreateOrUpdateFuture) Result(client RouteTablesClient)
return
}
-// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RouteTablesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RouteTablesDeleteFuture struct {
azure.Future
}
@@ -18424,14 +21539,24 @@ type SecurityGroupListResultIterator struct {
page SecurityGroupListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SecurityGroupListResultIterator) Next() error {
+func (iter *SecurityGroupListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -18440,6 +21565,13 @@ func (iter *SecurityGroupListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SecurityGroupListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SecurityGroupListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -18459,6 +21591,11 @@ func (iter SecurityGroupListResultIterator) Value() SecurityGroup {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SecurityGroupListResultIterator type.
+func NewSecurityGroupListResultIterator(page SecurityGroupListResultPage) SecurityGroupListResultIterator {
+ return SecurityGroupListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sglr SecurityGroupListResult) IsEmpty() bool {
return sglr.Value == nil || len(*sglr.Value) == 0
@@ -18466,11 +21603,11 @@ func (sglr SecurityGroupListResult) IsEmpty() bool {
// securityGroupListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Request, error) {
+func (sglr SecurityGroupListResult) securityGroupListResultPreparer(ctx context.Context) (*http.Request, error) {
if sglr.NextLink == nil || len(to.String(sglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sglr.NextLink)))
@@ -18478,14 +21615,24 @@ func (sglr SecurityGroupListResult) securityGroupListResultPreparer() (*http.Req
// SecurityGroupListResultPage contains a page of SecurityGroup values.
type SecurityGroupListResultPage struct {
- fn func(SecurityGroupListResult) (SecurityGroupListResult, error)
+ fn func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)
sglr SecurityGroupListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SecurityGroupListResultPage) Next() error {
- next, err := page.fn(page.sglr)
+func (page *SecurityGroupListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sglr)
if err != nil {
return err
}
@@ -18493,6 +21640,13 @@ func (page *SecurityGroupListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SecurityGroupListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SecurityGroupListResultPage) NotDone() bool {
return !page.sglr.IsEmpty()
@@ -18511,6 +21665,11 @@ func (page SecurityGroupListResultPage) Values() []SecurityGroup {
return *page.sglr.Value
}
+// Creates a new instance of the SecurityGroupListResultPage type.
+func NewSecurityGroupListResultPage(getNextPage func(context.Context, SecurityGroupListResult) (SecurityGroupListResult, error)) SecurityGroupListResultPage {
+ return SecurityGroupListResultPage{fn: getNextPage}
+}
+
// SecurityGroupNetworkInterface network interface and all its associated security rules.
type SecurityGroupNetworkInterface struct {
// ID - ID of the network interface.
@@ -18542,8 +21701,8 @@ type SecurityGroupResult struct {
EvaluatedNetworkSecurityGroups *[]EvaluatedNetworkSecurityGroup `json:"evaluatedNetworkSecurityGroups,omitempty"`
}
-// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// SecurityGroupsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type SecurityGroupsCreateOrUpdateFuture struct {
azure.Future
}
@@ -18571,7 +21730,8 @@ func (future *SecurityGroupsCreateOrUpdateFuture) Result(client SecurityGroupsCl
return
}
-// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SecurityGroupsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SecurityGroupsDeleteFuture struct {
azure.Future
}
@@ -18593,8 +21753,8 @@ func (future *SecurityGroupsDeleteFuture) Result(client SecurityGroupsClient) (a
return
}
-// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// SecurityGroupsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type SecurityGroupsUpdateTagsFuture struct {
azure.Future
}
@@ -18727,8 +21887,8 @@ type SecurityRuleAssociations struct {
EffectiveSecurityRules *[]EffectiveNetworkSecurityRule `json:"effectiveSecurityRules,omitempty"`
}
-// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that belongs
-// to a network security group.
+// SecurityRuleListResult response for ListSecurityRule API service call. Retrieves all security rules that
+// belongs to a network security group.
type SecurityRuleListResult struct {
autorest.Response `json:"-"`
// Value - The security rules in a network security group.
@@ -18743,14 +21903,24 @@ type SecurityRuleListResultIterator struct {
page SecurityRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SecurityRuleListResultIterator) Next() error {
+func (iter *SecurityRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -18759,6 +21929,13 @@ func (iter *SecurityRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SecurityRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SecurityRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -18778,6 +21955,11 @@ func (iter SecurityRuleListResultIterator) Value() SecurityRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SecurityRuleListResultIterator type.
+func NewSecurityRuleListResultIterator(page SecurityRuleListResultPage) SecurityRuleListResultIterator {
+ return SecurityRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (srlr SecurityRuleListResult) IsEmpty() bool {
return srlr.Value == nil || len(*srlr.Value) == 0
@@ -18785,11 +21967,11 @@ func (srlr SecurityRuleListResult) IsEmpty() bool {
// securityRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Request, error) {
+func (srlr SecurityRuleListResult) securityRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if srlr.NextLink == nil || len(to.String(srlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(srlr.NextLink)))
@@ -18797,14 +21979,24 @@ func (srlr SecurityRuleListResult) securityRuleListResultPreparer() (*http.Reque
// SecurityRuleListResultPage contains a page of SecurityRule values.
type SecurityRuleListResultPage struct {
- fn func(SecurityRuleListResult) (SecurityRuleListResult, error)
+ fn func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)
srlr SecurityRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SecurityRuleListResultPage) Next() error {
- next, err := page.fn(page.srlr)
+func (page *SecurityRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.srlr)
if err != nil {
return err
}
@@ -18812,6 +22004,13 @@ func (page *SecurityRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SecurityRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SecurityRuleListResultPage) NotDone() bool {
return !page.srlr.IsEmpty()
@@ -18830,6 +22029,11 @@ func (page SecurityRuleListResultPage) Values() []SecurityRule {
return *page.srlr.Value
}
+// Creates a new instance of the SecurityRuleListResultPage type.
+func NewSecurityRuleListResultPage(getNextPage func(context.Context, SecurityRuleListResult) (SecurityRuleListResult, error)) SecurityRuleListResultPage {
+ return SecurityRuleListResultPage{fn: getNextPage}
+}
+
// SecurityRulePropertiesFormat security rule resource.
type SecurityRulePropertiesFormat struct {
// Description - A description for this rule. Restricted to 140 chars.
@@ -18866,8 +22070,8 @@ type SecurityRulePropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// SecurityRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type SecurityRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -18895,7 +22099,8 @@ func (future *SecurityRulesCreateOrUpdateFuture) Result(client SecurityRulesClie
return
}
-// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SecurityRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SecurityRulesDeleteFuture struct {
azure.Future
}
@@ -19034,8 +22239,8 @@ type ServiceDelegationPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServiceEndpointPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type ServiceEndpointPoliciesCreateOrUpdateFuture struct {
azure.Future
}
@@ -19063,8 +22268,8 @@ func (future *ServiceEndpointPoliciesCreateOrUpdateFuture) Result(client Service
return
}
-// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ServiceEndpointPoliciesDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ServiceEndpointPoliciesDeleteFuture struct {
azure.Future
}
@@ -19086,8 +22291,8 @@ func (future *ServiceEndpointPoliciesDeleteFuture) Result(client ServiceEndpoint
return
}
-// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ServiceEndpointPoliciesUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ServiceEndpointPoliciesUpdateFuture struct {
azure.Future
}
@@ -19321,8 +22526,8 @@ func (sepd *ServiceEndpointPolicyDefinition) UnmarshalJSON(body []byte) error {
return nil
}
-// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service call.
-// Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
+// ServiceEndpointPolicyDefinitionListResult response for ListServiceEndpointPolicyDefinition API service
+// call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy.
type ServiceEndpointPolicyDefinitionListResult struct {
autorest.Response `json:"-"`
// Value - The service endpoint policy definition in a service endpoint policy.
@@ -19338,14 +22543,24 @@ type ServiceEndpointPolicyDefinitionListResultIterator struct {
page ServiceEndpointPolicyDefinitionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
+func (iter *ServiceEndpointPolicyDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -19354,6 +22569,13 @@ func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ServiceEndpointPolicyDefinitionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ServiceEndpointPolicyDefinitionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -19373,6 +22595,11 @@ func (iter ServiceEndpointPolicyDefinitionListResultIterator) Value() ServiceEnd
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultIterator type.
+func NewServiceEndpointPolicyDefinitionListResultIterator(page ServiceEndpointPolicyDefinitionListResultPage) ServiceEndpointPolicyDefinitionListResultIterator {
+ return ServiceEndpointPolicyDefinitionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
return sepdlr.Value == nil || len(*sepdlr.Value) == 0
@@ -19380,11 +22607,11 @@ func (sepdlr ServiceEndpointPolicyDefinitionListResult) IsEmpty() bool {
// serviceEndpointPolicyDefinitionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer() (*http.Request, error) {
+func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
if sepdlr.NextLink == nil || len(to.String(sepdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sepdlr.NextLink)))
@@ -19392,14 +22619,24 @@ func (sepdlr ServiceEndpointPolicyDefinitionListResult) serviceEndpointPolicyDef
// ServiceEndpointPolicyDefinitionListResultPage contains a page of ServiceEndpointPolicyDefinition values.
type ServiceEndpointPolicyDefinitionListResultPage struct {
- fn func(ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
+ fn func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)
sepdlr ServiceEndpointPolicyDefinitionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
- next, err := page.fn(page.sepdlr)
+func (page *ServiceEndpointPolicyDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sepdlr)
if err != nil {
return err
}
@@ -19407,6 +22644,13 @@ func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ServiceEndpointPolicyDefinitionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ServiceEndpointPolicyDefinitionListResultPage) NotDone() bool {
return !page.sepdlr.IsEmpty()
@@ -19425,6 +22669,11 @@ func (page ServiceEndpointPolicyDefinitionListResultPage) Values() []ServiceEndp
return *page.sepdlr.Value
}
+// Creates a new instance of the ServiceEndpointPolicyDefinitionListResultPage type.
+func NewServiceEndpointPolicyDefinitionListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyDefinitionListResult) (ServiceEndpointPolicyDefinitionListResult, error)) ServiceEndpointPolicyDefinitionListResultPage {
+ return ServiceEndpointPolicyDefinitionListResultPage{fn: getNextPage}
+}
+
// ServiceEndpointPolicyDefinitionPropertiesFormat service Endpoint policy definition resource.
type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
// Description - A description for this rule. Restricted to 140 chars.
@@ -19437,8 +22686,8 @@ type ServiceEndpointPolicyDefinitionPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -19466,8 +22715,8 @@ func (future *ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture) Result(clien
return
}
-// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServiceEndpointPolicyDefinitionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type ServiceEndpointPolicyDefinitionsDeleteFuture struct {
azure.Future
}
@@ -19498,20 +22747,31 @@ type ServiceEndpointPolicyListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy values.
+// ServiceEndpointPolicyListResultIterator provides access to a complete listing of ServiceEndpointPolicy
+// values.
type ServiceEndpointPolicyListResultIterator struct {
i int
page ServiceEndpointPolicyListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
+func (iter *ServiceEndpointPolicyListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -19520,6 +22780,13 @@ func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ServiceEndpointPolicyListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ServiceEndpointPolicyListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -19539,6 +22806,11 @@ func (iter ServiceEndpointPolicyListResultIterator) Value() ServiceEndpointPolic
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ServiceEndpointPolicyListResultIterator type.
+func NewServiceEndpointPolicyListResultIterator(page ServiceEndpointPolicyListResultPage) ServiceEndpointPolicyListResultIterator {
+ return ServiceEndpointPolicyListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
return seplr.Value == nil || len(*seplr.Value) == 0
@@ -19546,11 +22818,11 @@ func (seplr ServiceEndpointPolicyListResult) IsEmpty() bool {
// serviceEndpointPolicyListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer() (*http.Request, error) {
+func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPreparer(ctx context.Context) (*http.Request, error) {
if seplr.NextLink == nil || len(to.String(seplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(seplr.NextLink)))
@@ -19558,14 +22830,24 @@ func (seplr ServiceEndpointPolicyListResult) serviceEndpointPolicyListResultPrep
// ServiceEndpointPolicyListResultPage contains a page of ServiceEndpointPolicy values.
type ServiceEndpointPolicyListResultPage struct {
- fn func(ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
+ fn func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)
seplr ServiceEndpointPolicyListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ServiceEndpointPolicyListResultPage) Next() error {
- next, err := page.fn(page.seplr)
+func (page *ServiceEndpointPolicyListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.seplr)
if err != nil {
return err
}
@@ -19573,6 +22855,13 @@ func (page *ServiceEndpointPolicyListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ServiceEndpointPolicyListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ServiceEndpointPolicyListResultPage) NotDone() bool {
return !page.seplr.IsEmpty()
@@ -19591,6 +22880,11 @@ func (page ServiceEndpointPolicyListResultPage) Values() []ServiceEndpointPolicy
return *page.seplr.Value
}
+// Creates a new instance of the ServiceEndpointPolicyListResultPage type.
+func NewServiceEndpointPolicyListResultPage(getNextPage func(context.Context, ServiceEndpointPolicyListResult) (ServiceEndpointPolicyListResult, error)) ServiceEndpointPolicyListResultPage {
+ return ServiceEndpointPolicyListResultPage{fn: getNextPage}
+}
+
// ServiceEndpointPolicyPropertiesFormat service Endpoint Policy resource.
type ServiceEndpointPolicyPropertiesFormat struct {
// ServiceEndpointPolicyDefinitions - A collection of service endpoint policy definitions of the service endpoint policy.
@@ -19709,7 +23003,8 @@ type SubnetAssociation struct {
SecurityRules *[]SecurityRule `json:"securityRules,omitempty"`
}
-// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network
+// SubnetListResult response for ListSubnets API service callRetrieves all subnet that belongs to a virtual
+// network
type SubnetListResult struct {
autorest.Response `json:"-"`
// Value - The subnets in a virtual network.
@@ -19724,14 +23019,24 @@ type SubnetListResultIterator struct {
page SubnetListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SubnetListResultIterator) Next() error {
+func (iter *SubnetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -19740,6 +23045,13 @@ func (iter *SubnetListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SubnetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SubnetListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -19759,6 +23071,11 @@ func (iter SubnetListResultIterator) Value() Subnet {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SubnetListResultIterator type.
+func NewSubnetListResultIterator(page SubnetListResultPage) SubnetListResultIterator {
+ return SubnetListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (slr SubnetListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
@@ -19766,11 +23083,11 @@ func (slr SubnetListResult) IsEmpty() bool {
// subnetListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) {
+func (slr SubnetListResult) subnetListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
@@ -19778,14 +23095,24 @@ func (slr SubnetListResult) subnetListResultPreparer() (*http.Request, error) {
// SubnetListResultPage contains a page of Subnet values.
type SubnetListResultPage struct {
- fn func(SubnetListResult) (SubnetListResult, error)
+ fn func(context.Context, SubnetListResult) (SubnetListResult, error)
slr SubnetListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SubnetListResultPage) Next() error {
- next, err := page.fn(page.slr)
+func (page *SubnetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
@@ -19793,6 +23120,13 @@ func (page *SubnetListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SubnetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SubnetListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
@@ -19811,6 +23145,11 @@ func (page SubnetListResultPage) Values() []Subnet {
return *page.slr.Value
}
+// Creates a new instance of the SubnetListResultPage type.
+func NewSubnetListResultPage(getNextPage func(context.Context, SubnetListResult) (SubnetListResult, error)) SubnetListResultPage {
+ return SubnetListResultPage{fn: getNextPage}
+}
+
// SubnetPropertiesFormat properties of the subnet.
type SubnetPropertiesFormat struct {
// AddressPrefix - The address prefix for the subnet.
@@ -19872,7 +23211,8 @@ func (future *SubnetsCreateOrUpdateFuture) Result(client SubnetsClient) (s Subne
return
}
-// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SubnetsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SubnetsDeleteFuture struct {
azure.Future
}
@@ -19976,20 +23316,6 @@ type TrafficAnalyticsProperties struct {
NetworkWatcherFlowAnalyticsConfiguration *TrafficAnalyticsConfigurationProperties `json:"networkWatcherFlowAnalyticsConfiguration,omitempty"`
}
-// TrafficQuery parameters to compare with network configuration.
-type TrafficQuery struct {
- // Direction - The direction of the traffic. Accepted values are 'Inbound' and 'Outbound'. Possible values include: 'Inbound', 'Outbound'
- Direction Direction `json:"direction,omitempty"`
- // Protocol - Protocol to be verified on. Accepted values are '*', TCP, UDP.
- Protocol *string `json:"protocol,omitempty"`
- // Source - Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag.
- Source *string `json:"source,omitempty"`
- // Destination - Traffic destination. Accepted values are: '*', IP Address/CIDR, Service Tag.
- Destination *string `json:"destination,omitempty"`
- // DestinationPort - Traffice destination port. Accepted values are '*', port (for example, 3389) and port range (for example, 80-100).
- DestinationPort *string `json:"destinationPort,omitempty"`
-}
-
// TroubleshootingDetails information gained from troubleshooting of specified resource.
type TroubleshootingDetails struct {
// ID - The id of the get troubleshoot operation.
@@ -20140,14 +23466,24 @@ type UsagesListResultIterator struct {
page UsagesListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UsagesListResultIterator) Next() error {
+func (iter *UsagesListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -20156,6 +23492,13 @@ func (iter *UsagesListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UsagesListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UsagesListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -20175,6 +23518,11 @@ func (iter UsagesListResultIterator) Value() Usage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UsagesListResultIterator type.
+func NewUsagesListResultIterator(page UsagesListResultPage) UsagesListResultIterator {
+ return UsagesListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ulr UsagesListResult) IsEmpty() bool {
return ulr.Value == nil || len(*ulr.Value) == 0
@@ -20182,11 +23530,11 @@ func (ulr UsagesListResult) IsEmpty() bool {
// usagesListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) {
+func (ulr UsagesListResult) usagesListResultPreparer(ctx context.Context) (*http.Request, error) {
if ulr.NextLink == nil || len(to.String(ulr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ulr.NextLink)))
@@ -20194,14 +23542,24 @@ func (ulr UsagesListResult) usagesListResultPreparer() (*http.Request, error) {
// UsagesListResultPage contains a page of Usage values.
type UsagesListResultPage struct {
- fn func(UsagesListResult) (UsagesListResult, error)
+ fn func(context.Context, UsagesListResult) (UsagesListResult, error)
ulr UsagesListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UsagesListResultPage) Next() error {
- next, err := page.fn(page.ulr)
+func (page *UsagesListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ulr)
if err != nil {
return err
}
@@ -20209,6 +23567,13 @@ func (page *UsagesListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UsagesListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UsagesListResultPage) NotDone() bool {
return !page.ulr.IsEmpty()
@@ -20227,6 +23592,11 @@ func (page UsagesListResultPage) Values() []Usage {
return *page.ulr.Value
}
+// Creates a new instance of the UsagesListResultPage type.
+func NewUsagesListResultPage(getNextPage func(context.Context, UsagesListResult) (UsagesListResult, error)) UsagesListResultPage {
+ return UsagesListResultPage{fn: getNextPage}
+}
+
// VerificationIPFlowParameters parameters that define the IP flow to be verified.
type VerificationIPFlowParameters struct {
// TargetResourceID - The ID of the target resource to perform next-hop on.
@@ -20419,8 +23789,8 @@ type VirtualHubRouteTable struct {
Routes *[]VirtualHubRoute `json:"routes,omitempty"`
}
-// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualHubsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualHubsCreateOrUpdateFuture struct {
azure.Future
}
@@ -20448,7 +23818,8 @@ func (future *VirtualHubsCreateOrUpdateFuture) Result(client VirtualHubsClient)
return
}
-// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualHubsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualHubsDeleteFuture struct {
azure.Future
}
@@ -20623,7 +23994,8 @@ func (vn *VirtualNetwork) UnmarshalJSON(body []byte) error {
return nil
}
-// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway resource.
+// VirtualNetworkConnectionGatewayReference a reference to VirtualNetworkGateway or LocalNetworkGateway
+// resource.
type VirtualNetworkConnectionGatewayReference struct {
// ID - The ID of VirtualNetworkGateway or LocalNetworkGateway resource.
ID *string `json:"id,omitempty"`
@@ -21042,7 +24414,8 @@ type VirtualNetworkGatewayConnectionListEntityPropertiesFormat struct {
ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
}
-// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API service call
+// VirtualNetworkGatewayConnectionListResult response for the ListVirtualNetworkGatewayConnections API
+// service call
type VirtualNetworkGatewayConnectionListResult struct {
autorest.Response `json:"-"`
// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
@@ -21058,14 +24431,24 @@ type VirtualNetworkGatewayConnectionListResultIterator struct {
page VirtualNetworkGatewayConnectionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
+func (iter *VirtualNetworkGatewayConnectionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -21074,6 +24457,13 @@ func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkGatewayConnectionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkGatewayConnectionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -21093,6 +24483,11 @@ func (iter VirtualNetworkGatewayConnectionListResultIterator) Value() VirtualNet
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkGatewayConnectionListResultIterator type.
+func NewVirtualNetworkGatewayConnectionListResultIterator(page VirtualNetworkGatewayConnectionListResultPage) VirtualNetworkGatewayConnectionListResultIterator {
+ return VirtualNetworkGatewayConnectionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
return vngclr.Value == nil || len(*vngclr.Value) == 0
@@ -21100,11 +24495,11 @@ func (vngclr VirtualNetworkGatewayConnectionListResult) IsEmpty() bool {
// virtualNetworkGatewayConnectionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer() (*http.Request, error) {
+func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayConnectionListResultPreparer(ctx context.Context) (*http.Request, error) {
if vngclr.NextLink == nil || len(to.String(vngclr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vngclr.NextLink)))
@@ -21112,14 +24507,24 @@ func (vngclr VirtualNetworkGatewayConnectionListResult) virtualNetworkGatewayCon
// VirtualNetworkGatewayConnectionListResultPage contains a page of VirtualNetworkGatewayConnection values.
type VirtualNetworkGatewayConnectionListResultPage struct {
- fn func(VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
+ fn func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)
vngclr VirtualNetworkGatewayConnectionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
- next, err := page.fn(page.vngclr)
+func (page *VirtualNetworkGatewayConnectionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vngclr)
if err != nil {
return err
}
@@ -21127,6 +24532,13 @@ func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkGatewayConnectionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkGatewayConnectionListResultPage) NotDone() bool {
return !page.vngclr.IsEmpty()
@@ -21145,6 +24557,11 @@ func (page VirtualNetworkGatewayConnectionListResultPage) Values() []VirtualNetw
return *page.vngclr.Value
}
+// Creates a new instance of the VirtualNetworkGatewayConnectionListResultPage type.
+func NewVirtualNetworkGatewayConnectionListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayConnectionListResult) (VirtualNetworkGatewayConnectionListResult, error)) VirtualNetworkGatewayConnectionListResultPage {
+ return VirtualNetworkGatewayConnectionListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkGatewayConnectionPropertiesFormat virtualNetworkGatewayConnection properties
type VirtualNetworkGatewayConnectionPropertiesFormat struct {
// AuthorizationKey - The authorizationKey.
@@ -21187,8 +24604,8 @@ type VirtualNetworkGatewayConnectionPropertiesFormat struct {
ExpressRouteGatewayBypass *bool `json:"expressRouteGatewayBypass,omitempty"`
}
-// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualNetworkGatewayConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewayConnectionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -21216,8 +24633,8 @@ func (future *VirtualNetworkGatewayConnectionsCreateOrUpdateFuture) Result(clien
return
}
-// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewayConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualNetworkGatewayConnectionsDeleteFuture struct {
azure.Future
}
@@ -21239,8 +24656,8 @@ func (future *VirtualNetworkGatewayConnectionsDeleteFuture) Result(client Virtua
return
}
-// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualNetworkGatewayConnectionsResetSharedKeyFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewayConnectionsResetSharedKeyFuture struct {
azure.Future
}
@@ -21268,8 +24685,8 @@ func (future *VirtualNetworkGatewayConnectionsResetSharedKeyFuture) Result(clien
return
}
-// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewayConnectionsSetSharedKeyFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewayConnectionsSetSharedKeyFuture struct {
azure.Future
}
@@ -21297,8 +24714,8 @@ func (future *VirtualNetworkGatewayConnectionsSetSharedKeyFuture) Result(client
return
}
-// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewayConnectionsUpdateTagsFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewayConnectionsUpdateTagsFuture struct {
azure.Future
}
@@ -21419,8 +24836,8 @@ type VirtualNetworkGatewayIPConfigurationPropertiesFormat struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
}
-// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API service
-// call
+// VirtualNetworkGatewayListConnectionsResult response for the VirtualNetworkGatewayListConnections API
+// service call
type VirtualNetworkGatewayListConnectionsResult struct {
autorest.Response `json:"-"`
// Value - Gets a list of VirtualNetworkGatewayConnection resources that exists in a resource group.
@@ -21436,14 +24853,24 @@ type VirtualNetworkGatewayListConnectionsResultIterator struct {
page VirtualNetworkGatewayListConnectionsResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
+func (iter *VirtualNetworkGatewayListConnectionsResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -21452,6 +24879,13 @@ func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkGatewayListConnectionsResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkGatewayListConnectionsResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -21471,6 +24905,11 @@ func (iter VirtualNetworkGatewayListConnectionsResultIterator) Value() VirtualNe
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultIterator type.
+func NewVirtualNetworkGatewayListConnectionsResultIterator(page VirtualNetworkGatewayListConnectionsResultPage) VirtualNetworkGatewayListConnectionsResultIterator {
+ return VirtualNetworkGatewayListConnectionsResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
return vnglcr.Value == nil || len(*vnglcr.Value) == 0
@@ -21478,27 +24917,37 @@ func (vnglcr VirtualNetworkGatewayListConnectionsResult) IsEmpty() bool {
// virtualNetworkGatewayListConnectionsResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer() (*http.Request, error) {
+func (vnglcr VirtualNetworkGatewayListConnectionsResult) virtualNetworkGatewayListConnectionsResultPreparer(ctx context.Context) (*http.Request, error) {
if vnglcr.NextLink == nil || len(to.String(vnglcr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnglcr.NextLink)))
}
-// VirtualNetworkGatewayListConnectionsResultPage contains a page of VirtualNetworkGatewayConnectionListEntity
-// values.
+// VirtualNetworkGatewayListConnectionsResultPage contains a page of
+// VirtualNetworkGatewayConnectionListEntity values.
type VirtualNetworkGatewayListConnectionsResultPage struct {
- fn func(VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
+ fn func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)
vnglcr VirtualNetworkGatewayListConnectionsResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
- next, err := page.fn(page.vnglcr)
+func (page *VirtualNetworkGatewayListConnectionsResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListConnectionsResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnglcr)
if err != nil {
return err
}
@@ -21506,6 +24955,13 @@ func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkGatewayListConnectionsResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkGatewayListConnectionsResultPage) NotDone() bool {
return !page.vnglcr.IsEmpty()
@@ -21524,6 +24980,11 @@ func (page VirtualNetworkGatewayListConnectionsResultPage) Values() []VirtualNet
return *page.vnglcr.Value
}
+// Creates a new instance of the VirtualNetworkGatewayListConnectionsResultPage type.
+func NewVirtualNetworkGatewayListConnectionsResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListConnectionsResult) (VirtualNetworkGatewayListConnectionsResult, error)) VirtualNetworkGatewayListConnectionsResultPage {
+ return VirtualNetworkGatewayListConnectionsResultPage{fn: getNextPage}
+}
+
// VirtualNetworkGatewayListResult response for the ListVirtualNetworkGateways API service call.
type VirtualNetworkGatewayListResult struct {
autorest.Response `json:"-"`
@@ -21533,20 +24994,31 @@ type VirtualNetworkGatewayListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway values.
+// VirtualNetworkGatewayListResultIterator provides access to a complete listing of VirtualNetworkGateway
+// values.
type VirtualNetworkGatewayListResultIterator struct {
i int
page VirtualNetworkGatewayListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
+func (iter *VirtualNetworkGatewayListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -21555,6 +25027,13 @@ func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkGatewayListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkGatewayListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -21574,6 +25053,11 @@ func (iter VirtualNetworkGatewayListResultIterator) Value() VirtualNetworkGatewa
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkGatewayListResultIterator type.
+func NewVirtualNetworkGatewayListResultIterator(page VirtualNetworkGatewayListResultPage) VirtualNetworkGatewayListResultIterator {
+ return VirtualNetworkGatewayListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
return vnglr.Value == nil || len(*vnglr.Value) == 0
@@ -21581,11 +25065,11 @@ func (vnglr VirtualNetworkGatewayListResult) IsEmpty() bool {
// virtualNetworkGatewayListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer() (*http.Request, error) {
+func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnglr.NextLink == nil || len(to.String(vnglr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnglr.NextLink)))
@@ -21593,14 +25077,24 @@ func (vnglr VirtualNetworkGatewayListResult) virtualNetworkGatewayListResultPrep
// VirtualNetworkGatewayListResultPage contains a page of VirtualNetworkGateway values.
type VirtualNetworkGatewayListResultPage struct {
- fn func(VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
+ fn func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)
vnglr VirtualNetworkGatewayListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkGatewayListResultPage) Next() error {
- next, err := page.fn(page.vnglr)
+func (page *VirtualNetworkGatewayListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnglr)
if err != nil {
return err
}
@@ -21608,6 +25102,13 @@ func (page *VirtualNetworkGatewayListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkGatewayListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkGatewayListResultPage) NotDone() bool {
return !page.vnglr.IsEmpty()
@@ -21626,6 +25127,11 @@ func (page VirtualNetworkGatewayListResultPage) Values() []VirtualNetworkGateway
return *page.vnglr.Value
}
+// Creates a new instance of the VirtualNetworkGatewayListResultPage type.
+func NewVirtualNetworkGatewayListResultPage(getNextPage func(context.Context, VirtualNetworkGatewayListResult) (VirtualNetworkGatewayListResult, error)) VirtualNetworkGatewayListResultPage {
+ return VirtualNetworkGatewayListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkGatewayPropertiesFormat virtualNetworkGateway properties
type VirtualNetworkGatewayPropertiesFormat struct {
// IPConfigurations - IP configurations for virtual network gateway.
@@ -21681,8 +25187,8 @@ func (future *VirtualNetworkGatewaysCreateOrUpdateFuture) Result(client VirtualN
return
}
-// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkGatewaysDeleteFuture struct {
azure.Future
}
@@ -21704,8 +25210,8 @@ func (future *VirtualNetworkGatewaysDeleteFuture) Result(client VirtualNetworkGa
return
}
-// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualNetworkGatewaysGeneratevpnclientpackageFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewaysGeneratevpnclientpackageFuture struct {
azure.Future
}
@@ -21733,8 +25239,8 @@ func (future *VirtualNetworkGatewaysGeneratevpnclientpackageFuture) Result(clien
return
}
-// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewaysGenerateVpnProfileFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualNetworkGatewaysGenerateVpnProfileFuture struct {
azure.Future
}
@@ -21762,8 +25268,8 @@ func (future *VirtualNetworkGatewaysGenerateVpnProfileFuture) Result(client Virt
return
}
-// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewaysGetAdvertisedRoutesFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type VirtualNetworkGatewaysGetAdvertisedRoutesFuture struct {
azure.Future
}
@@ -21791,8 +25297,8 @@ func (future *VirtualNetworkGatewaysGetAdvertisedRoutesFuture) Result(client Vir
return
}
-// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewaysGetBgpPeerStatusFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualNetworkGatewaysGetBgpPeerStatusFuture struct {
azure.Future
}
@@ -21820,8 +25326,8 @@ func (future *VirtualNetworkGatewaysGetBgpPeerStatusFuture) Result(client Virtua
return
}
-// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// VirtualNetworkGatewaysGetLearnedRoutesFuture an abstraction for monitoring and retrieving the results of
+// a long-running operation.
type VirtualNetworkGatewaysGetLearnedRoutesFuture struct {
azure.Future
}
@@ -21849,8 +25355,8 @@ func (future *VirtualNetworkGatewaysGetLearnedRoutesFuture) Result(client Virtua
return
}
-// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture struct {
azure.Future
}
@@ -21878,8 +25384,8 @@ func (future *VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture) Result(cl
return
}
-// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualNetworkGatewaysGetVpnProfilePackageURLFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewaysGetVpnProfilePackageURLFuture struct {
azure.Future
}
@@ -21917,8 +25423,8 @@ type VirtualNetworkGatewaySku struct {
Capacity *int32 `json:"capacity,omitempty"`
}
-// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkGatewaysResetFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkGatewaysResetFuture struct {
azure.Future
}
@@ -21946,8 +25452,8 @@ func (future *VirtualNetworkGatewaysResetFuture) Result(client VirtualNetworkGat
return
}
-// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// VirtualNetworkGatewaysResetVpnClientSharedKeyFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewaysResetVpnClientSharedKeyFuture struct {
azure.Future
}
@@ -21969,8 +25475,8 @@ func (future *VirtualNetworkGatewaysResetVpnClientSharedKeyFuture) Result(client
return
}
-// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the results
-// of a long-running operation.
+// VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture struct {
azure.Future
}
@@ -22042,14 +25548,24 @@ type VirtualNetworkListResultIterator struct {
page VirtualNetworkListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkListResultIterator) Next() error {
+func (iter *VirtualNetworkListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -22058,6 +25574,13 @@ func (iter *VirtualNetworkListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -22077,6 +25600,11 @@ func (iter VirtualNetworkListResultIterator) Value() VirtualNetwork {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkListResultIterator type.
+func NewVirtualNetworkListResultIterator(page VirtualNetworkListResultPage) VirtualNetworkListResultIterator {
+ return VirtualNetworkListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnlr VirtualNetworkListResult) IsEmpty() bool {
return vnlr.Value == nil || len(*vnlr.Value) == 0
@@ -22084,11 +25612,11 @@ func (vnlr VirtualNetworkListResult) IsEmpty() bool {
// virtualNetworkListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.Request, error) {
+func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnlr.NextLink == nil || len(to.String(vnlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnlr.NextLink)))
@@ -22096,14 +25624,24 @@ func (vnlr VirtualNetworkListResult) virtualNetworkListResultPreparer() (*http.R
// VirtualNetworkListResultPage contains a page of VirtualNetwork values.
type VirtualNetworkListResultPage struct {
- fn func(VirtualNetworkListResult) (VirtualNetworkListResult, error)
+ fn func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)
vnlr VirtualNetworkListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkListResultPage) Next() error {
- next, err := page.fn(page.vnlr)
+func (page *VirtualNetworkListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnlr)
if err != nil {
return err
}
@@ -22111,6 +25649,13 @@ func (page *VirtualNetworkListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkListResultPage) NotDone() bool {
return !page.vnlr.IsEmpty()
@@ -22129,6 +25674,11 @@ func (page VirtualNetworkListResultPage) Values() []VirtualNetwork {
return *page.vnlr.Value
}
+// Creates a new instance of the VirtualNetworkListResultPage type.
+func NewVirtualNetworkListResultPage(getNextPage func(context.Context, VirtualNetworkListResult) (VirtualNetworkListResult, error)) VirtualNetworkListResultPage {
+ return VirtualNetworkListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkListUsageResult response for the virtual networks GetUsage API service call.
type VirtualNetworkListUsageResult struct {
autorest.Response `json:"-"`
@@ -22138,20 +25688,31 @@ type VirtualNetworkListUsageResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage values.
+// VirtualNetworkListUsageResultIterator provides access to a complete listing of VirtualNetworkUsage
+// values.
type VirtualNetworkListUsageResultIterator struct {
i int
page VirtualNetworkListUsageResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkListUsageResultIterator) Next() error {
+func (iter *VirtualNetworkListUsageResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -22160,6 +25721,13 @@ func (iter *VirtualNetworkListUsageResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkListUsageResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkListUsageResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -22179,6 +25747,11 @@ func (iter VirtualNetworkListUsageResultIterator) Value() VirtualNetworkUsage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkListUsageResultIterator type.
+func NewVirtualNetworkListUsageResultIterator(page VirtualNetworkListUsageResultPage) VirtualNetworkListUsageResultIterator {
+ return VirtualNetworkListUsageResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
return vnlur.Value == nil || len(*vnlur.Value) == 0
@@ -22186,11 +25759,11 @@ func (vnlur VirtualNetworkListUsageResult) IsEmpty() bool {
// virtualNetworkListUsageResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer() (*http.Request, error) {
+func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer(ctx context.Context) (*http.Request, error) {
if vnlur.NextLink == nil || len(to.String(vnlur.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnlur.NextLink)))
@@ -22198,14 +25771,24 @@ func (vnlur VirtualNetworkListUsageResult) virtualNetworkListUsageResultPreparer
// VirtualNetworkListUsageResultPage contains a page of VirtualNetworkUsage values.
type VirtualNetworkListUsageResultPage struct {
- fn func(VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
+ fn func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)
vnlur VirtualNetworkListUsageResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkListUsageResultPage) Next() error {
- next, err := page.fn(page.vnlur)
+func (page *VirtualNetworkListUsageResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkListUsageResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnlur)
if err != nil {
return err
}
@@ -22213,6 +25796,13 @@ func (page *VirtualNetworkListUsageResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkListUsageResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkListUsageResultPage) NotDone() bool {
return !page.vnlur.IsEmpty()
@@ -22231,6 +25821,11 @@ func (page VirtualNetworkListUsageResultPage) Values() []VirtualNetworkUsage {
return *page.vnlur.Value
}
+// Creates a new instance of the VirtualNetworkListUsageResultPage type.
+func NewVirtualNetworkListUsageResultPage(getNextPage func(context.Context, VirtualNetworkListUsageResult) (VirtualNetworkListUsageResult, error)) VirtualNetworkListUsageResultPage {
+ return VirtualNetworkListUsageResultPage{fn: getNextPage}
+}
+
// VirtualNetworkPeering peerings in a virtual network resource.
type VirtualNetworkPeering struct {
autorest.Response `json:"-"`
@@ -22313,8 +25908,8 @@ func (vnp *VirtualNetworkPeering) UnmarshalJSON(body []byte) error {
return nil
}
-// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that belong to
-// a virtual network.
+// VirtualNetworkPeeringListResult response for ListSubnets API service call. Retrieves all subnets that
+// belong to a virtual network.
type VirtualNetworkPeeringListResult struct {
autorest.Response `json:"-"`
// Value - The peerings in a virtual network.
@@ -22323,20 +25918,31 @@ type VirtualNetworkPeeringListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering values.
+// VirtualNetworkPeeringListResultIterator provides access to a complete listing of VirtualNetworkPeering
+// values.
type VirtualNetworkPeeringListResultIterator struct {
i int
page VirtualNetworkPeeringListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
+func (iter *VirtualNetworkPeeringListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -22345,6 +25951,13 @@ func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkPeeringListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkPeeringListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -22364,6 +25977,11 @@ func (iter VirtualNetworkPeeringListResultIterator) Value() VirtualNetworkPeerin
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkPeeringListResultIterator type.
+func NewVirtualNetworkPeeringListResultIterator(page VirtualNetworkPeeringListResultPage) VirtualNetworkPeeringListResultIterator {
+ return VirtualNetworkPeeringListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
return vnplr.Value == nil || len(*vnplr.Value) == 0
@@ -22371,11 +25989,11 @@ func (vnplr VirtualNetworkPeeringListResult) IsEmpty() bool {
// virtualNetworkPeeringListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer() (*http.Request, error) {
+func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnplr.NextLink == nil || len(to.String(vnplr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnplr.NextLink)))
@@ -22383,14 +26001,24 @@ func (vnplr VirtualNetworkPeeringListResult) virtualNetworkPeeringListResultPrep
// VirtualNetworkPeeringListResultPage contains a page of VirtualNetworkPeering values.
type VirtualNetworkPeeringListResultPage struct {
- fn func(VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
+ fn func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)
vnplr VirtualNetworkPeeringListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkPeeringListResultPage) Next() error {
- next, err := page.fn(page.vnplr)
+func (page *VirtualNetworkPeeringListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnplr)
if err != nil {
return err
}
@@ -22398,6 +26026,13 @@ func (page *VirtualNetworkPeeringListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkPeeringListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkPeeringListResultPage) NotDone() bool {
return !page.vnplr.IsEmpty()
@@ -22416,6 +26051,11 @@ func (page VirtualNetworkPeeringListResultPage) Values() []VirtualNetworkPeering
return *page.vnplr.Value
}
+// Creates a new instance of the VirtualNetworkPeeringListResultPage type.
+func NewVirtualNetworkPeeringListResultPage(getNextPage func(context.Context, VirtualNetworkPeeringListResult) (VirtualNetworkPeeringListResult, error)) VirtualNetworkPeeringListResultPage {
+ return VirtualNetworkPeeringListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkPeeringPropertiesFormat properties of the virtual network peering.
type VirtualNetworkPeeringPropertiesFormat struct {
// AllowVirtualNetworkAccess - Whether the VMs in the linked virtual network space would be able to access all the VMs in local Virtual network space.
@@ -22465,8 +26105,8 @@ func (future *VirtualNetworkPeeringsCreateOrUpdateFuture) Result(client VirtualN
return
}
-// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkPeeringsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkPeeringsDeleteFuture struct {
azure.Future
}
@@ -22510,8 +26150,8 @@ type VirtualNetworkPropertiesFormat struct {
DdosProtectionPlan *SubResource `json:"ddosProtectionPlan,omitempty"`
}
-// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworksCreateOrUpdateFuture struct {
azure.Future
}
@@ -22562,8 +26202,8 @@ func (future *VirtualNetworksDeleteFuture) Result(client VirtualNetworksClient)
return
}
-// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworksUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworksUpdateTagsFuture struct {
azure.Future
}
@@ -22730,14 +26370,24 @@ type VirtualNetworkTapListResultIterator struct {
page VirtualNetworkTapListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkTapListResultIterator) Next() error {
+func (iter *VirtualNetworkTapListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -22746,6 +26396,13 @@ func (iter *VirtualNetworkTapListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkTapListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkTapListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -22765,6 +26422,11 @@ func (iter VirtualNetworkTapListResultIterator) Value() VirtualNetworkTap {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkTapListResultIterator type.
+func NewVirtualNetworkTapListResultIterator(page VirtualNetworkTapListResultPage) VirtualNetworkTapListResultIterator {
+ return VirtualNetworkTapListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
return vntlr.Value == nil || len(*vntlr.Value) == 0
@@ -22772,11 +26434,11 @@ func (vntlr VirtualNetworkTapListResult) IsEmpty() bool {
// virtualNetworkTapListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer() (*http.Request, error) {
+func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer(ctx context.Context) (*http.Request, error) {
if vntlr.NextLink == nil || len(to.String(vntlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vntlr.NextLink)))
@@ -22784,14 +26446,24 @@ func (vntlr VirtualNetworkTapListResult) virtualNetworkTapListResultPreparer() (
// VirtualNetworkTapListResultPage contains a page of VirtualNetworkTap values.
type VirtualNetworkTapListResultPage struct {
- fn func(VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
+ fn func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)
vntlr VirtualNetworkTapListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkTapListResultPage) Next() error {
- next, err := page.fn(page.vntlr)
+func (page *VirtualNetworkTapListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vntlr)
if err != nil {
return err
}
@@ -22799,6 +26471,13 @@ func (page *VirtualNetworkTapListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkTapListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkTapListResultPage) NotDone() bool {
return !page.vntlr.IsEmpty()
@@ -22817,6 +26496,11 @@ func (page VirtualNetworkTapListResultPage) Values() []VirtualNetworkTap {
return *page.vntlr.Value
}
+// Creates a new instance of the VirtualNetworkTapListResultPage type.
+func NewVirtualNetworkTapListResultPage(getNextPage func(context.Context, VirtualNetworkTapListResult) (VirtualNetworkTapListResult, error)) VirtualNetworkTapListResultPage {
+ return VirtualNetworkTapListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkTapPropertiesFormat virtual Network Tap properties.
type VirtualNetworkTapPropertiesFormat struct {
// NetworkInterfaceTapConfigurations - Specifies the list of resource IDs for the network interface IP configuration that needs to be tapped.
@@ -22862,8 +26546,8 @@ func (future *VirtualNetworkTapsCreateOrUpdateFuture) Result(client VirtualNetwo
return
}
-// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkTapsDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkTapsDeleteFuture struct {
azure.Future
}
@@ -22885,8 +26569,8 @@ func (future *VirtualNetworkTapsDeleteFuture) Result(client VirtualNetworkTapsCl
return
}
-// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkTapsUpdateTagsFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkTapsUpdateTagsFuture struct {
azure.Future
}
@@ -23080,8 +26764,8 @@ type VirtualWanProperties struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
-// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualWansCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualWansCreateOrUpdateFuture struct {
azure.Future
}
@@ -23109,7 +26793,8 @@ func (future *VirtualWansCreateOrUpdateFuture) Result(client VirtualWansClient)
return
}
-// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VirtualWansDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VirtualWansDeleteFuture struct {
azure.Future
}
@@ -23320,8 +27005,8 @@ func (vcrc *VpnClientRevokedCertificate) UnmarshalJSON(body []byte) error {
return nil
}
-// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual network
-// gateway.
+// VpnClientRevokedCertificatePropertiesFormat properties of the revoked VPN client certificate of virtual
+// network gateway.
type VpnClientRevokedCertificatePropertiesFormat struct {
// Thumbprint - The revoked VPN client certificate thumbprint.
Thumbprint *string `json:"thumbprint,omitempty"`
@@ -23529,8 +27214,8 @@ type VpnConnectionProperties struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
-// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VpnConnectionsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VpnConnectionsCreateOrUpdateFuture struct {
azure.Future
}
@@ -23558,7 +27243,8 @@ func (future *VpnConnectionsCreateOrUpdateFuture) Result(client VpnConnectionsCl
return
}
-// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VpnConnectionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VpnConnectionsDeleteFuture struct {
azure.Future
}
@@ -23727,8 +27413,8 @@ type VpnGatewayProperties struct {
VpnGatewayScaleUnit *int32 `json:"vpnGatewayScaleUnit,omitempty"`
}
-// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VpnGatewaysCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VpnGatewaysCreateOrUpdateFuture struct {
azure.Future
}
@@ -23756,7 +27442,8 @@ func (future *VpnGatewaysCreateOrUpdateFuture) Result(client VpnGatewaysClient)
return
}
-// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VpnGatewaysDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VpnGatewaysDeleteFuture struct {
azure.Future
}
@@ -23963,8 +27650,8 @@ type VpnSiteProperties struct {
IsSecuritySite *bool `json:"isSecuritySite,omitempty"`
}
-// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VpnSitesConfigurationDownloadFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VpnSitesConfigurationDownloadFuture struct {
azure.Future
}
@@ -24015,7 +27702,8 @@ func (future *VpnSitesCreateOrUpdateFuture) Result(client VpnSitesClient) (vs Vp
return
}
-// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VpnSitesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VpnSitesDeleteFuture struct {
azure.Future
}
@@ -24037,7 +27725,8 @@ func (future *VpnSitesDeleteFuture) Result(client VpnSitesClient) (ar autorest.R
return
}
-// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// VpnSitesUpdateTagsFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type VpnSitesUpdateTagsFuture struct {
azure.Future
}
@@ -24200,8 +27889,8 @@ type WatcherPropertiesFormat struct {
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
}
-// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersCheckConnectivityFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersCheckConnectivityFuture struct {
azure.Future
}
@@ -24229,7 +27918,8 @@ func (future *WatchersCheckConnectivityFuture) Result(client WatchersClient) (ci
return
}
-// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WatchersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WatchersDeleteFuture struct {
azure.Future
}
@@ -24280,8 +27970,8 @@ func (future *WatchersGetAzureReachabilityReportFuture) Result(client WatchersCl
return
}
-// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersGetFlowLogStatusFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersGetFlowLogStatusFuture struct {
azure.Future
}
@@ -24309,8 +27999,8 @@ func (future *WatchersGetFlowLogStatusFuture) Result(client WatchersClient) (fli
return
}
-// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// WatchersGetNetworkConfigurationDiagnosticFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type WatchersGetNetworkConfigurationDiagnosticFuture struct {
azure.Future
}
@@ -24338,7 +28028,8 @@ func (future *WatchersGetNetworkConfigurationDiagnosticFuture) Result(client Wat
return
}
-// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WatchersGetNextHopFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WatchersGetNextHopFuture struct {
azure.Future
}
@@ -24366,8 +28057,8 @@ func (future *WatchersGetNextHopFuture) Result(client WatchersClient) (nhr NextH
return
}
-// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersGetTroubleshootingFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersGetTroubleshootingFuture struct {
azure.Future
}
@@ -24424,8 +28115,8 @@ func (future *WatchersGetTroubleshootingResultFuture) Result(client WatchersClie
return
}
-// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersGetVMSecurityRulesFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersGetVMSecurityRulesFuture struct {
azure.Future
}
@@ -24453,8 +28144,8 @@ func (future *WatchersGetVMSecurityRulesFuture) Result(client WatchersClient) (s
return
}
-// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersListAvailableProvidersFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersListAvailableProvidersFuture struct {
azure.Future
}
@@ -24482,8 +28173,8 @@ func (future *WatchersListAvailableProvidersFuture) Result(client WatchersClient
return
}
-// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WatchersSetFlowLogConfigurationFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WatchersSetFlowLogConfigurationFuture struct {
azure.Future
}
@@ -24511,7 +28202,8 @@ func (future *WatchersSetFlowLogConfigurationFuture) Result(client WatchersClien
return
}
-// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// WatchersVerifyIPFlowFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type WatchersVerifyIPFlowFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go
index 318a2418283f..a602097beac3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available Network Rest API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go
index 1cc417640381..08d542830613 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpngateways.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewP2sVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) P
// gatewayName - the name of the gateway.
// p2SVpnGatewayParameters - parameters supplied to create or Update a virtual wan p2s vpn gateway.
func (client P2sVpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters P2SVpnGateway) (result P2sVpnGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client P2sVpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the resource group name of the P2SVpnGateway.
// gatewayName - the name of the gateway.
func (client P2sVpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result P2sVpnGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client P2sVpnGatewaysClient) DeleteResponder(resp *http.Response) (result
// gatewayName - the name of the P2SVpnGateway.
// parameters - parameters supplied to the generate P2SVpnGateway VPN client package operation.
func (client P2sVpnGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, gatewayName string, parameters P2SVpnProfileParameters) (result P2sVpnGatewaysGenerateVpnProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.GenerateVpnProfile")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, gatewayName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client P2sVpnGatewaysClient) GenerateVpnProfileResponder(resp *http.Respon
// resourceGroupName - the resource group name of the P2SVpnGateway.
// gatewayName - the name of the gateway.
func (client P2sVpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result P2SVpnGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "Get", nil, "Failure preparing request")
@@ -314,6 +355,16 @@ func (client P2sVpnGatewaysClient) GetResponder(resp *http.Response) (result P2S
// List lists all the P2SVpnGateways in a subscription.
func (client P2sVpnGatewaysClient) List(ctx context.Context) (result ListP2SVpnGatewaysResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.List")
+ defer func() {
+ sc := -1
+ if result.lpvgr.Response.Response != nil {
+ sc = result.lpvgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -376,8 +427,8 @@ func (client P2sVpnGatewaysClient) ListResponder(resp *http.Response) (result Li
}
// listNextResults retrieves the next set of results, if any.
-func (client P2sVpnGatewaysClient) listNextResults(lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
- req, err := lastResults.listP2SVpnGatewaysResultPreparer()
+func (client P2sVpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
+ req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -398,6 +449,16 @@ func (client P2sVpnGatewaysClient) listNextResults(lastResults ListP2SVpnGateway
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client P2sVpnGatewaysClient) ListComplete(ctx context.Context) (result ListP2SVpnGatewaysResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.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
}
@@ -406,6 +467,16 @@ func (client P2sVpnGatewaysClient) ListComplete(ctx context.Context) (result Lis
// Parameters:
// resourceGroupName - the resource group name of the P2SVpnGateway.
func (client P2sVpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lpvgr.Response.Response != nil {
+ sc = result.lpvgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -469,8 +540,8 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupResponder(resp *http.Respo
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client P2sVpnGatewaysClient) listByResourceGroupNextResults(lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
- req, err := lastResults.listP2SVpnGatewaysResultPreparer()
+func (client P2sVpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListP2SVpnGatewaysResult) (result ListP2SVpnGatewaysResult, err error) {
+ req, err := lastResults.listP2SVpnGatewaysResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -491,6 +562,16 @@ func (client P2sVpnGatewaysClient) listByResourceGroupNextResults(lastResults Li
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListP2SVpnGatewaysResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -501,6 +582,16 @@ func (client P2sVpnGatewaysClient) ListByResourceGroupComplete(ctx context.Conte
// gatewayName - the name of the gateway.
// p2SVpnGatewayParameters - parameters supplied to update a virtual wan p2s vpn gateway tags.
func (client P2sVpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, p2SVpnGatewayParameters TagsObject) (result P2sVpnGatewaysUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnGatewaysClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, p2SVpnGatewayParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnGatewaysClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go
index d70c906b28dd..f348f07d5e6f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/p2svpnserverconfigurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewP2sVpnServerConfigurationsClientWithBaseURI(baseURI string, subscription
// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
// p2SVpnServerConfigurationParameters - parameters supplied to create or Update a P2SVpnServerConfiguration.
func (client P2sVpnServerConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string, p2SVpnServerConfigurationParameters P2SVpnServerConfiguration) (result P2sVpnServerConfigurationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, p2SVpnServerConfigurationParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -118,6 +129,16 @@ func (client P2sVpnServerConfigurationsClient) CreateOrUpdateResponder(resp *htt
// virtualWanName - the name of the VirtualWan.
// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
func (client P2sVpnServerConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2sVpnServerConfigurationsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client P2sVpnServerConfigurationsClient) DeleteResponder(resp *http.Respon
// virtualWanName - the name of the VirtualWan.
// p2SVpnServerConfigurationName - the name of the P2SVpnServerConfiguration.
func (client P2sVpnServerConfigurationsClient) Get(ctx context.Context, resourceGroupName string, virtualWanName string, p2SVpnServerConfigurationName string) (result P2SVpnServerConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualWanName, p2SVpnServerConfigurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -254,6 +285,16 @@ func (client P2sVpnServerConfigurationsClient) GetResponder(resp *http.Response)
// resourceGroupName - the resource group name of the VirtualWan.
// virtualWanName - the name of the VirtualWan.
func (client P2sVpnServerConfigurationsClient) ListByVirtualWan(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan")
+ defer func() {
+ sc := -1
+ if result.lpvscr.Response.Response != nil {
+ sc = result.lpvscr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByVirtualWanNextResults
req, err := client.ListByVirtualWanPreparer(ctx, resourceGroupName, virtualWanName)
if err != nil {
@@ -318,8 +359,8 @@ func (client P2sVpnServerConfigurationsClient) ListByVirtualWanResponder(resp *h
}
// listByVirtualWanNextResults retrieves the next set of results, if any.
-func (client P2sVpnServerConfigurationsClient) listByVirtualWanNextResults(lastResults ListP2SVpnServerConfigurationsResult) (result ListP2SVpnServerConfigurationsResult, err error) {
- req, err := lastResults.listP2SVpnServerConfigurationsResultPreparer()
+func (client P2sVpnServerConfigurationsClient) listByVirtualWanNextResults(ctx context.Context, lastResults ListP2SVpnServerConfigurationsResult) (result ListP2SVpnServerConfigurationsResult, err error) {
+ req, err := lastResults.listP2SVpnServerConfigurationsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.P2sVpnServerConfigurationsClient", "listByVirtualWanNextResults", nil, "Failure preparing next results request")
}
@@ -340,6 +381,16 @@ func (client P2sVpnServerConfigurationsClient) listByVirtualWanNextResults(lastR
// ListByVirtualWanComplete enumerates all values, automatically crossing page boundaries as required.
func (client P2sVpnServerConfigurationsClient) ListByVirtualWanComplete(ctx context.Context, resourceGroupName string, virtualWanName string) (result ListP2SVpnServerConfigurationsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/P2sVpnServerConfigurationsClient.ListByVirtualWan")
+ 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.ListByVirtualWan(ctx, resourceGroupName, virtualWanName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go
index d98929cf2a0a..f0618b994292 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/packetcaptures.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewPacketCapturesClientWithBaseURI(baseURI string, subscriptionID string) P
// packetCaptureName - the name of the packet capture session.
// parameters - parameters that define the create packet capture operation.
func (client PacketCapturesClient) Create(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string, parameters PacketCapture) (result PacketCapturesCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.PacketCaptureParameters", Name: validation.Null, Rule: true,
@@ -127,6 +138,16 @@ func (client PacketCapturesClient) CreateResponder(resp *http.Response) (result
// networkWatcherName - the name of the network watcher.
// packetCaptureName - the name of the packet capture session.
func (client PacketCapturesClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Delete", nil, "Failure preparing request")
@@ -195,6 +216,16 @@ func (client PacketCapturesClient) DeleteResponder(resp *http.Response) (result
// networkWatcherName - the name of the network watcher.
// packetCaptureName - the name of the packet capture session.
func (client PacketCapturesClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCaptureResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Get", nil, "Failure preparing request")
@@ -264,6 +295,16 @@ func (client PacketCapturesClient) GetResponder(resp *http.Response) (result Pac
// networkWatcherName - the name of the Network Watcher resource.
// packetCaptureName - the name given to the packet capture session.
func (client PacketCapturesClient) GetStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesGetStatusFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.GetStatus")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetStatusPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "GetStatus", nil, "Failure preparing request")
@@ -332,6 +373,16 @@ func (client PacketCapturesClient) GetStatusResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// networkWatcherName - the name of the Network Watcher resource.
func (client PacketCapturesClient) List(ctx context.Context, resourceGroupName string, networkWatcherName string) (result PacketCaptureListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, networkWatcherName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "List", nil, "Failure preparing request")
@@ -400,6 +451,16 @@ func (client PacketCapturesClient) ListResponder(resp *http.Response) (result Pa
// networkWatcherName - the name of the network watcher.
// packetCaptureName - the name of the packet capture session.
func (client PacketCapturesClient) Stop(ctx context.Context, resourceGroupName string, networkWatcherName string, packetCaptureName string) (result PacketCapturesStopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PacketCapturesClient.Stop")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StopPreparer(ctx, resourceGroupName, networkWatcherName, packetCaptureName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PacketCapturesClient", "Stop", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go
index 109d25e8aebc..bdf55bed8b18 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/profiles.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewProfilesClientWithBaseURI(baseURI string, subscriptionID string) Profile
// networkProfileName - the name of the network profile.
// parameters - parameters supplied to the create or update network profile operation.
func (client ProfilesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkProfileName string, parameters Profile) (result Profile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkProfileName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ProfilesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client ProfilesClient) CreateOrUpdateResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// networkProfileName - the name of the NetworkProfile.
func (client ProfilesClient) Delete(ctx context.Context, resourceGroupName string, networkProfileName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkProfileName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client ProfilesClient) DeleteResponder(resp *http.Response) (result autore
// networkProfileName - the name of the PublicIPPrefx.
// expand - expands referenced resources.
func (client ProfilesClient) Get(ctx context.Context, resourceGroupName string, networkProfileName string, expand string) (result Profile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkProfileName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ProfilesClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client ProfilesClient) GetResponder(resp *http.Response) (result Profile,
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ProfilesClient) List(ctx context.Context, resourceGroupName string) (result ProfileListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.List")
+ defer func() {
+ sc := -1
+ if result.plr.Response.Response != nil {
+ sc = result.plr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client ProfilesClient) ListResponder(resp *http.Response) (result ProfileL
}
// listNextResults retrieves the next set of results, if any.
-func (client ProfilesClient) listNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer()
+func (client ProfilesClient) listNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
+ req, err := lastResults.profileListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client ProfilesClient) listNextResults(lastResults ProfileListResult) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListComplete(ctx context.Context, resourceGroupName string) (result ProfileListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.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, resourceGroupName)
return
}
// ListAll gets all the network profiles in a subscription.
func (client ProfilesClient) ListAll(ctx context.Context) (result ProfileListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.plr.Response.Response != nil {
+ sc = result.plr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client ProfilesClient) ListAllResponder(resp *http.Response) (result Profi
}
// listAllNextResults retrieves the next set of results, if any.
-func (client ProfilesClient) listAllNextResults(lastResults ProfileListResult) (result ProfileListResult, err error) {
- req, err := lastResults.profileListResultPreparer()
+func (client ProfilesClient) listAllNextResults(ctx context.Context, lastResults ProfileListResult) (result ProfileListResult, err error) {
+ req, err := lastResults.profileListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ProfilesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client ProfilesClient) listAllNextResults(lastResults ProfileListResult) (
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProfilesClient) ListAllComplete(ctx context.Context) (result ProfileListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -435,6 +506,16 @@ func (client ProfilesClient) ListAllComplete(ctx context.Context) (result Profil
// networkProfileName - the name of the network profile.
// parameters - parameters supplied to update network profile tags.
func (client ProfilesClient) UpdateTags(ctx context.Context, resourceGroupName string, networkProfileName string, parameters TagsObject) (result Profile, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProfilesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkProfileName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ProfilesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go
index e73318c19b76..b0da9acfef02 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipaddresses.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewPublicIPAddressesClientWithBaseURI(baseURI string, subscriptionID string
// publicIPAddressName - the name of the public IP address.
// parameters - parameters supplied to the create or update public IP address operation.
func (client PublicIPAddressesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters PublicIPAddress) (result PublicIPAddressesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.PublicIPAddressPropertiesFormat", Name: validation.Null, Rule: false,
@@ -126,6 +137,16 @@ func (client PublicIPAddressesClient) CreateOrUpdateResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// publicIPAddressName - the name of the subnet.
func (client PublicIPAddressesClient) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (result PublicIPAddressesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPAddressName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Delete", nil, "Failure preparing request")
@@ -193,6 +214,16 @@ func (client PublicIPAddressesClient) DeleteResponder(resp *http.Response) (resu
// publicIPAddressName - the name of the subnet.
// expand - expands referenced resources.
func (client PublicIPAddressesClient) Get(ctx context.Context, resourceGroupName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, publicIPAddressName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "Get", nil, "Failure preparing request")
@@ -268,6 +299,16 @@ func (client PublicIPAddressesClient) GetResponder(resp *http.Response) (result
// publicIPAddressName - the name of the public IP Address.
// expand - expands referenced resources.
func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddress(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string, publicIPAddressName string, expand string) (result PublicIPAddress, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.GetVirtualMachineScaleSetPublicIPAddress")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetVirtualMachineScaleSetPublicIPAddressPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName, publicIPAddressName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "GetVirtualMachineScaleSetPublicIPAddress", nil, "Failure preparing request")
@@ -341,6 +382,16 @@ func (client PublicIPAddressesClient) GetVirtualMachineScaleSetPublicIPAddressRe
// Parameters:
// resourceGroupName - the name of the resource group.
func (client PublicIPAddressesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.List")
+ defer func() {
+ sc := -1
+ if result.pialr.Response.Response != nil {
+ sc = result.pialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -404,8 +455,8 @@ func (client PublicIPAddressesClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client PublicIPAddressesClient) listNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
- req, err := lastResults.publicIPAddressListResultPreparer()
+func (client PublicIPAddressesClient) listNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -426,12 +477,32 @@ func (client PublicIPAddressesClient) listNextResults(lastResults PublicIPAddres
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPAddressesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPAddressListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.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, resourceGroupName)
return
}
// ListAll gets all the public IP addresses in a subscription.
func (client PublicIPAddressesClient) ListAll(ctx context.Context) (result PublicIPAddressListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.pialr.Response.Response != nil {
+ sc = result.pialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -494,8 +565,8 @@ func (client PublicIPAddressesClient) ListAllResponder(resp *http.Response) (res
}
// listAllNextResults retrieves the next set of results, if any.
-func (client PublicIPAddressesClient) listAllNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
- req, err := lastResults.publicIPAddressListResultPreparer()
+func (client PublicIPAddressesClient) listAllNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -516,6 +587,16 @@ func (client PublicIPAddressesClient) listAllNextResults(lastResults PublicIPAdd
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (result PublicIPAddressListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -526,6 +607,16 @@ func (client PublicIPAddressesClient) ListAllComplete(ctx context.Context) (resu
// resourceGroupName - the name of the resource group.
// virtualMachineScaleSetName - the name of the virtual machine scale set.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses")
+ defer func() {
+ sc := -1
+ if result.pialr.Response.Response != nil {
+ sc = result.pialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVirtualMachineScaleSetPublicIPAddressesNextResults
req, err := client.ListVirtualMachineScaleSetPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName)
if err != nil {
@@ -590,8 +681,8 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse
}
// listVirtualMachineScaleSetPublicIPAddressesNextResults retrieves the next set of results, if any.
-func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
- req, err := lastResults.publicIPAddressListResultPreparer()
+func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetPublicIPAddressesNextResults", nil, "Failure preparing next results request")
}
@@ -612,6 +703,16 @@ func (client PublicIPAddressesClient) listVirtualMachineScaleSetPublicIPAddresse
// ListVirtualMachineScaleSetPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string) (result PublicIPAddressListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetPublicIPAddresses")
+ 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.ListVirtualMachineScaleSetPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName)
return
}
@@ -625,6 +726,16 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetPublicIPAddresse
// networkInterfaceName - the network interface name.
// IPConfigurationName - the IP configuration name.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddresses(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses")
+ defer func() {
+ sc := -1
+ if result.pialr.Response.Response != nil {
+ sc = result.pialr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listVirtualMachineScaleSetVMPublicIPAddressesNextResults
req, err := client.ListVirtualMachineScaleSetVMPublicIPAddressesPreparer(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName)
if err != nil {
@@ -692,8 +803,8 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres
}
// listVirtualMachineScaleSetVMPublicIPAddressesNextResults retrieves the next set of results, if any.
-func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesNextResults(lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
- req, err := lastResults.publicIPAddressListResultPreparer()
+func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddressesNextResults(ctx context.Context, lastResults PublicIPAddressListResult) (result PublicIPAddressListResult, err error) {
+ req, err := lastResults.publicIPAddressListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "listVirtualMachineScaleSetVMPublicIPAddressesNextResults", nil, "Failure preparing next results request")
}
@@ -714,6 +825,16 @@ func (client PublicIPAddressesClient) listVirtualMachineScaleSetVMPublicIPAddres
// ListVirtualMachineScaleSetVMPublicIPAddressesComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddressesComplete(ctx context.Context, resourceGroupName string, virtualMachineScaleSetName string, virtualmachineIndex string, networkInterfaceName string, IPConfigurationName string) (result PublicIPAddressListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.ListVirtualMachineScaleSetVMPublicIPAddresses")
+ 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.ListVirtualMachineScaleSetVMPublicIPAddresses(ctx, resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, IPConfigurationName)
return
}
@@ -724,6 +845,16 @@ func (client PublicIPAddressesClient) ListVirtualMachineScaleSetVMPublicIPAddres
// publicIPAddressName - the name of the public IP address.
// parameters - parameters supplied to update public IP address tags.
func (client PublicIPAddressesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPAddressName string, parameters TagsObject) (result PublicIPAddressesUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPAddressesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPAddressName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPAddressesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go
index e564c3681cc9..2e930c4ad9d7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/publicipprefixes.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewPublicIPPrefixesClientWithBaseURI(baseURI string, subscriptionID string)
// publicIPPrefixName - the name of the public IP prefix.
// parameters - parameters supplied to the create or update public IP prefix operation.
func (client PublicIPPrefixesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters PublicIPPrefix) (result PublicIPPrefixesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client PublicIPPrefixesClient) CreateOrUpdateResponder(resp *http.Response
// resourceGroupName - the name of the resource group.
// publicIPPrefixName - the name of the PublicIpPrefix.
func (client PublicIPPrefixesClient) Delete(ctx context.Context, resourceGroupName string, publicIPPrefixName string) (result PublicIPPrefixesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, publicIPPrefixName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client PublicIPPrefixesClient) DeleteResponder(resp *http.Response) (resul
// publicIPPrefixName - the name of the PublicIPPrefx.
// expand - expands referenced resources.
func (client PublicIPPrefixesClient) Get(ctx context.Context, resourceGroupName string, publicIPPrefixName string, expand string) (result PublicIPPrefix, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, publicIPPrefixName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client PublicIPPrefixesClient) GetResponder(resp *http.Response) (result P
// Parameters:
// resourceGroupName - the name of the resource group.
func (client PublicIPPrefixesClient) List(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.List")
+ defer func() {
+ sc := -1
+ if result.piplr.Response.Response != nil {
+ sc = result.piplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client PublicIPPrefixesClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client PublicIPPrefixesClient) listNextResults(lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
- req, err := lastResults.publicIPPrefixListResultPreparer()
+func (client PublicIPPrefixesClient) listNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
+ req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client PublicIPPrefixesClient) listNextResults(lastResults PublicIPPrefixL
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPPrefixesClient) ListComplete(ctx context.Context, resourceGroupName string) (result PublicIPPrefixListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.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, resourceGroupName)
return
}
// ListAll gets all the public IP prefixes in a subscription.
func (client PublicIPPrefixesClient) ListAll(ctx context.Context) (result PublicIPPrefixListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.piplr.Response.Response != nil {
+ sc = result.piplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client PublicIPPrefixesClient) ListAllResponder(resp *http.Response) (resu
}
// listAllNextResults retrieves the next set of results, if any.
-func (client PublicIPPrefixesClient) listAllNextResults(lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
- req, err := lastResults.publicIPPrefixListResultPreparer()
+func (client PublicIPPrefixesClient) listAllNextResults(ctx context.Context, lastResults PublicIPPrefixListResult) (result PublicIPPrefixListResult, err error) {
+ req, err := lastResults.publicIPPrefixListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client PublicIPPrefixesClient) listAllNextResults(lastResults PublicIPPref
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (result PublicIPPrefixListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -435,6 +506,16 @@ func (client PublicIPPrefixesClient) ListAllComplete(ctx context.Context) (resul
// publicIPPrefixName - the name of the public IP prefix.
// parameters - parameters supplied to update public IP prefix tags.
func (client PublicIPPrefixesClient) UpdateTags(ctx context.Context, resourceGroupName string, publicIPPrefixName string, parameters TagsObject) (result PublicIPPrefixesUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PublicIPPrefixesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, publicIPPrefixName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.PublicIPPrefixesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go
index b92705a15428..ef3facfafa6a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilterrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewRouteFilterRulesClientWithBaseURI(baseURI string, subscriptionID string)
// ruleName - the name of the route filter rule.
// routeFilterRuleParameters - parameters supplied to the create or update route filter rule operation.
func (client RouteFilterRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters RouteFilterRule) (result RouteFilterRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: routeFilterRuleParameters,
Constraints: []validation.Constraint{{Target: "routeFilterRuleParameters.RouteFilterRulePropertiesFormat", Name: validation.Null, Rule: false,
@@ -127,6 +138,16 @@ func (client RouteFilterRulesClient) CreateOrUpdateResponder(resp *http.Response
// routeFilterName - the name of the route filter.
// ruleName - the name of the rule.
func (client RouteFilterRulesClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Delete", nil, "Failure preparing request")
@@ -195,6 +216,16 @@ func (client RouteFilterRulesClient) DeleteResponder(resp *http.Response) (resul
// routeFilterName - the name of the route filter.
// ruleName - the name of the rule.
func (client RouteFilterRulesClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string) (result RouteFilterRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, routeFilterName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client RouteFilterRulesClient) GetResponder(resp *http.Response) (result R
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
func (client RouteFilterRulesClient) ListByRouteFilter(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter")
+ defer func() {
+ sc := -1
+ if result.rfrlr.Response.Response != nil {
+ sc = result.rfrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByRouteFilterNextResults
req, err := client.ListByRouteFilterPreparer(ctx, resourceGroupName, routeFilterName)
if err != nil {
@@ -327,8 +368,8 @@ func (client RouteFilterRulesClient) ListByRouteFilterResponder(resp *http.Respo
}
// listByRouteFilterNextResults retrieves the next set of results, if any.
-func (client RouteFilterRulesClient) listByRouteFilterNextResults(lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) {
- req, err := lastResults.routeFilterRuleListResultPreparer()
+func (client RouteFilterRulesClient) listByRouteFilterNextResults(ctx context.Context, lastResults RouteFilterRuleListResult) (result RouteFilterRuleListResult, err error) {
+ req, err := lastResults.routeFilterRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "listByRouteFilterNextResults", nil, "Failure preparing next results request")
}
@@ -349,6 +390,16 @@ func (client RouteFilterRulesClient) listByRouteFilterNextResults(lastResults Ro
// ListByRouteFilterComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFilterRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.ListByRouteFilter")
+ 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.ListByRouteFilter(ctx, resourceGroupName, routeFilterName)
return
}
@@ -360,6 +411,16 @@ func (client RouteFilterRulesClient) ListByRouteFilterComplete(ctx context.Conte
// ruleName - the name of the route filter rule.
// routeFilterRuleParameters - parameters supplied to the update route filter rule operation.
func (client RouteFilterRulesClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, ruleName string, routeFilterRuleParameters PatchRouteFilterRule) (result RouteFilterRulesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFilterRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, ruleName, routeFilterRuleParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFilterRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go
index 2494ecd1be78..87a36f2476d5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routefilters.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewRouteFiltersClientWithBaseURI(baseURI string, subscriptionID string) Rou
// routeFilterName - the name of the route filter.
// routeFilterParameters - parameters supplied to the create or update route filter operation.
func (client RouteFiltersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters RouteFilter) (result RouteFiltersCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client RouteFiltersClient) CreateOrUpdateResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// routeFilterName - the name of the route filter.
func (client RouteFiltersClient) Delete(ctx context.Context, resourceGroupName string, routeFilterName string) (result RouteFiltersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, routeFilterName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client RouteFiltersClient) DeleteResponder(resp *http.Response) (result au
// routeFilterName - the name of the route filter.
// expand - expands referenced express route bgp peering resources.
func (client RouteFiltersClient) Get(ctx context.Context, resourceGroupName string, routeFilterName string, expand string) (result RouteFilter, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, routeFilterName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Get", nil, "Failure preparing request")
@@ -248,6 +279,16 @@ func (client RouteFiltersClient) GetResponder(resp *http.Response) (result Route
// List gets all route filters in a subscription.
func (client RouteFiltersClient) List(ctx context.Context) (result RouteFilterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.List")
+ defer func() {
+ sc := -1
+ if result.rflr.Response.Response != nil {
+ sc = result.rflr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -310,8 +351,8 @@ func (client RouteFiltersClient) ListResponder(resp *http.Response) (result Rout
}
// listNextResults retrieves the next set of results, if any.
-func (client RouteFiltersClient) listNextResults(lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
- req, err := lastResults.routeFilterListResultPreparer()
+func (client RouteFiltersClient) listNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
+ req, err := lastResults.routeFilterListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -332,6 +373,16 @@ func (client RouteFiltersClient) listNextResults(lastResults RouteFilterListResu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteFiltersClient) ListComplete(ctx context.Context) (result RouteFilterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.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
}
@@ -340,6 +391,16 @@ func (client RouteFiltersClient) ListComplete(ctx context.Context) (result Route
// Parameters:
// resourceGroupName - the name of the resource group.
func (client RouteFiltersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result RouteFilterListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.rflr.Response.Response != nil {
+ sc = result.rflr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -403,8 +464,8 @@ func (client RouteFiltersClient) ListByResourceGroupResponder(resp *http.Respons
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client RouteFiltersClient) listByResourceGroupNextResults(lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
- req, err := lastResults.routeFilterListResultPreparer()
+func (client RouteFiltersClient) listByResourceGroupNextResults(ctx context.Context, lastResults RouteFilterListResult) (result RouteFilterListResult, err error) {
+ req, err := lastResults.routeFilterListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteFiltersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client RouteFiltersClient) listByResourceGroupNextResults(lastResults Rout
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result RouteFilterListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -435,6 +506,16 @@ func (client RouteFiltersClient) ListByResourceGroupComplete(ctx context.Context
// routeFilterName - the name of the route filter.
// routeFilterParameters - parameters supplied to the update route filter operation.
func (client RouteFiltersClient) Update(ctx context.Context, resourceGroupName string, routeFilterName string, routeFilterParameters PatchRouteFilter) (result RouteFiltersUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteFiltersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, routeFilterName, routeFilterParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteFiltersClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go
index 60be23088d5a..b943c97f666b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routes.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewRoutesClientWithBaseURI(baseURI string, subscriptionID string) RoutesCli
// routeName - the name of the route.
// routeParameters - parameters supplied to the create or update route operation.
func (client RoutesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, routeName string, routeParameters Route) (result RoutesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, routeName, routeParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RoutesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client RoutesClient) CreateOrUpdateResponder(resp *http.Response) (result
// routeTableName - the name of the route table.
// routeName - the name of the route.
func (client RoutesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result RoutesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName, routeName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RoutesClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client RoutesClient) DeleteResponder(resp *http.Response) (result autorest
// routeTableName - the name of the route table.
// routeName - the name of the route.
func (client RoutesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, routeName string) (result Route, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, routeName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RoutesClient", "Get", nil, "Failure preparing request")
@@ -253,6 +284,16 @@ func (client RoutesClient) GetResponder(resp *http.Response) (result Route, err
// resourceGroupName - the name of the resource group.
// routeTableName - the name of the route table.
func (client RoutesClient) List(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.List")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, routeTableName)
if err != nil {
@@ -317,8 +358,8 @@ func (client RoutesClient) ListResponder(resp *http.Response) (result RouteListR
}
// listNextResults retrieves the next set of results, if any.
-func (client RoutesClient) listNextResults(lastResults RouteListResult) (result RouteListResult, err error) {
- req, err := lastResults.routeListResultPreparer()
+func (client RoutesClient) listNextResults(ctx context.Context, lastResults RouteListResult) (result RouteListResult, err error) {
+ req, err := lastResults.routeListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RoutesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -339,6 +380,16 @@ func (client RoutesClient) listNextResults(lastResults RouteListResult) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoutesClient) ListComplete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoutesClient.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, resourceGroupName, routeTableName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go
index 6662de10ff7a..9a07d1cec515 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/routetables.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewRouteTablesClientWithBaseURI(baseURI string, subscriptionID string) Rout
// routeTableName - the name of the route table.
// parameters - parameters supplied to the create or update route table operation.
func (client RouteTablesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, routeTableName string, parameters RouteTable) (result RouteTablesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, routeTableName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client RouteTablesClient) CreateOrUpdateResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// routeTableName - the name of the route table.
func (client RouteTablesClient) Delete(ctx context.Context, resourceGroupName string, routeTableName string) (result RouteTablesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, routeTableName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client RouteTablesClient) DeleteResponder(resp *http.Response) (result aut
// routeTableName - the name of the route table.
// expand - expands referenced resources.
func (client RouteTablesClient) Get(ctx context.Context, resourceGroupName string, routeTableName string, expand string) (result RouteTable, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, routeTableName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client RouteTablesClient) GetResponder(resp *http.Response) (result RouteT
// Parameters:
// resourceGroupName - the name of the resource group.
func (client RouteTablesClient) List(ctx context.Context, resourceGroupName string) (result RouteTableListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.List")
+ defer func() {
+ sc := -1
+ if result.rtlr.Response.Response != nil {
+ sc = result.rtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client RouteTablesClient) ListResponder(resp *http.Response) (result Route
}
// listNextResults retrieves the next set of results, if any.
-func (client RouteTablesClient) listNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) {
- req, err := lastResults.routeTableListResultPreparer()
+func (client RouteTablesClient) listNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) {
+ req, err := lastResults.routeTableListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client RouteTablesClient) listNextResults(lastResults RouteTableListResult
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteTablesClient) ListComplete(ctx context.Context, resourceGroupName string) (result RouteTableListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.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, resourceGroupName)
return
}
// ListAll gets all route tables in a subscription.
func (client RouteTablesClient) ListAll(ctx context.Context) (result RouteTableListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.rtlr.Response.Response != nil {
+ sc = result.rtlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client RouteTablesClient) ListAllResponder(resp *http.Response) (result Ro
}
// listAllNextResults retrieves the next set of results, if any.
-func (client RouteTablesClient) listAllNextResults(lastResults RouteTableListResult) (result RouteTableListResult, err error) {
- req, err := lastResults.routeTableListResultPreparer()
+func (client RouteTablesClient) listAllNextResults(ctx context.Context, lastResults RouteTableListResult) (result RouteTableListResult, err error) {
+ req, err := lastResults.routeTableListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.RouteTablesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client RouteTablesClient) listAllNextResults(lastResults RouteTableListRes
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result RouteTableListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -435,6 +506,16 @@ func (client RouteTablesClient) ListAllComplete(ctx context.Context) (result Rou
// routeTableName - the name of the route table.
// parameters - parameters supplied to update route table tags.
func (client RouteTablesClient) UpdateTags(ctx context.Context, resourceGroupName string, routeTableName string, parameters TagsObject) (result RouteTablesUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RouteTablesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, routeTableName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.RouteTablesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go
index 5fb4dfe36fd6..4460a2979509 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securitygroups.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewSecurityGroupsClientWithBaseURI(baseURI string, subscriptionID string) S
// networkSecurityGroupName - the name of the network security group.
// parameters - parameters supplied to the create or update network security group operation.
func (client SecurityGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters SecurityGroup) (result SecurityGroupsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client SecurityGroupsClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// networkSecurityGroupName - the name of the network security group.
func (client SecurityGroupsClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityGroupsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client SecurityGroupsClient) DeleteResponder(resp *http.Response) (result
// networkSecurityGroupName - the name of the network security group.
// expand - expands referenced resources.
func (client SecurityGroupsClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, expand string) (result SecurityGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "Get", nil, "Failure preparing request")
@@ -250,6 +281,16 @@ func (client SecurityGroupsClient) GetResponder(resp *http.Response) (result Sec
// Parameters:
// resourceGroupName - the name of the resource group.
func (client SecurityGroupsClient) List(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.List")
+ defer func() {
+ sc := -1
+ if result.sglr.Response.Response != nil {
+ sc = result.sglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -313,8 +354,8 @@ func (client SecurityGroupsClient) ListResponder(resp *http.Response) (result Se
}
// listNextResults retrieves the next set of results, if any.
-func (client SecurityGroupsClient) listNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
- req, err := lastResults.securityGroupListResultPreparer()
+func (client SecurityGroupsClient) listNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
+ req, err := lastResults.securityGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -335,12 +376,32 @@ func (client SecurityGroupsClient) listNextResults(lastResults SecurityGroupList
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SecurityGroupsClient) ListComplete(ctx context.Context, resourceGroupName string) (result SecurityGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.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, resourceGroupName)
return
}
// ListAll gets all network security groups in a subscription.
func (client SecurityGroupsClient) ListAll(ctx context.Context) (result SecurityGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.sglr.Response.Response != nil {
+ sc = result.sglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -403,8 +464,8 @@ func (client SecurityGroupsClient) ListAllResponder(resp *http.Response) (result
}
// listAllNextResults retrieves the next set of results, if any.
-func (client SecurityGroupsClient) listAllNextResults(lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
- req, err := lastResults.securityGroupListResultPreparer()
+func (client SecurityGroupsClient) listAllNextResults(ctx context.Context, lastResults SecurityGroupListResult) (result SecurityGroupListResult, err error) {
+ req, err := lastResults.securityGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client SecurityGroupsClient) listAllNextResults(lastResults SecurityGroupL
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result SecurityGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -435,6 +506,16 @@ func (client SecurityGroupsClient) ListAllComplete(ctx context.Context) (result
// networkSecurityGroupName - the name of the network security group.
// parameters - parameters supplied to update network security group tags.
func (client SecurityGroupsClient) UpdateTags(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, parameters TagsObject) (result SecurityGroupsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityGroupsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkSecurityGroupName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityGroupsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go
index fb8d46408267..f47bb0d993f6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/securityrules.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewSecurityRulesClientWithBaseURI(baseURI string, subscriptionID string) Se
// securityRuleName - the name of the security rule.
// securityRuleParameters - parameters supplied to the create or update network security rule operation.
func (client SecurityRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string, securityRuleParameters SecurityRule) (result SecurityRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client SecurityRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// networkSecurityGroupName - the name of the network security group.
// securityRuleName - the name of the security rule.
func (client SecurityRulesClient) Delete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Delete", nil, "Failure preparing request")
@@ -185,6 +206,16 @@ func (client SecurityRulesClient) DeleteResponder(resp *http.Response) (result a
// networkSecurityGroupName - the name of the network security group.
// securityRuleName - the name of the security rule.
func (client SecurityRulesClient) Get(ctx context.Context, resourceGroupName string, networkSecurityGroupName string, securityRuleName string) (result SecurityRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkSecurityGroupName, securityRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SecurityRulesClient", "Get", nil, "Failure preparing request")
@@ -253,6 +284,16 @@ func (client SecurityRulesClient) GetResponder(resp *http.Response) (result Secu
// resourceGroupName - the name of the resource group.
// networkSecurityGroupName - the name of the network security group.
func (client SecurityRulesClient) List(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.List")
+ defer func() {
+ sc := -1
+ if result.srlr.Response.Response != nil {
+ sc = result.srlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, networkSecurityGroupName)
if err != nil {
@@ -317,8 +358,8 @@ func (client SecurityRulesClient) ListResponder(resp *http.Response) (result Sec
}
// listNextResults retrieves the next set of results, if any.
-func (client SecurityRulesClient) listNextResults(lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) {
- req, err := lastResults.securityRuleListResultPreparer()
+func (client SecurityRulesClient) listNextResults(ctx context.Context, lastResults SecurityRuleListResult) (result SecurityRuleListResult, err error) {
+ req, err := lastResults.securityRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.SecurityRulesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -339,6 +380,16 @@ func (client SecurityRulesClient) listNextResults(lastResults SecurityRuleListRe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SecurityRulesClient) ListComplete(ctx context.Context, resourceGroupName string, networkSecurityGroupName string) (result SecurityRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SecurityRulesClient.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, resourceGroupName, networkSecurityGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go
index c3d830d13b04..46ced39dbaa5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewServiceEndpointPoliciesClientWithBaseURI(baseURI string, subscriptionID
// serviceEndpointPolicyName - the name of the service endpoint policy.
// parameters - parameters supplied to the create or update service endpoint policy operation.
func (client ServiceEndpointPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters ServiceEndpointPolicy) (result ServiceEndpointPoliciesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client ServiceEndpointPoliciesClient) CreateOrUpdateResponder(resp *http.R
// resourceGroupName - the name of the resource group.
// serviceEndpointPolicyName - the name of the service endpoint policy.
func (client ServiceEndpointPoliciesClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPoliciesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Delete", nil, "Failure preparing request")
@@ -181,6 +202,16 @@ func (client ServiceEndpointPoliciesClient) DeleteResponder(resp *http.Response)
// serviceEndpointPolicyName - the name of the service endpoint policy.
// expand - expands referenced resources.
func (client ServiceEndpointPoliciesClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, expand string) (result ServiceEndpointPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serviceEndpointPolicyName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Get", nil, "Failure preparing request")
@@ -248,6 +279,16 @@ func (client ServiceEndpointPoliciesClient) GetResponder(resp *http.Response) (r
// List gets all the service endpoint policies in a subscription.
func (client ServiceEndpointPoliciesClient) List(ctx context.Context) (result ServiceEndpointPolicyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.List")
+ defer func() {
+ sc := -1
+ if result.seplr.Response.Response != nil {
+ sc = result.seplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -310,8 +351,8 @@ func (client ServiceEndpointPoliciesClient) ListResponder(resp *http.Response) (
}
// listNextResults retrieves the next set of results, if any.
-func (client ServiceEndpointPoliciesClient) listNextResults(lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyListResultPreparer()
+func (client ServiceEndpointPoliciesClient) listNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
+ req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -332,6 +373,16 @@ func (client ServiceEndpointPoliciesClient) listNextResults(lastResults ServiceE
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceEndpointPoliciesClient) ListComplete(ctx context.Context) (result ServiceEndpointPolicyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.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
}
@@ -340,6 +391,16 @@ func (client ServiceEndpointPoliciesClient) ListComplete(ctx context.Context) (r
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ServiceEndpointPoliciesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.seplr.Response.Response != nil {
+ sc = result.seplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -403,8 +464,8 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupResponder(resp *h
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ServiceEndpointPoliciesClient) listByResourceGroupNextResults(lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyListResultPreparer()
+func (client ServiceEndpointPoliciesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyListResult) (result ServiceEndpointPolicyListResult, err error) {
+ req, err := lastResults.serviceEndpointPolicyListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -425,6 +486,16 @@ func (client ServiceEndpointPoliciesClient) listByResourceGroupNextResults(lastR
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServiceEndpointPolicyListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -435,6 +506,16 @@ func (client ServiceEndpointPoliciesClient) ListByResourceGroupComplete(ctx cont
// serviceEndpointPolicyName - the name of the service endpoint policy.
// parameters - parameters supplied to update service endpoint policy tags.
func (client ServiceEndpointPoliciesClient) Update(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, parameters TagsObject) (result ServiceEndpointPoliciesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPoliciesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPoliciesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go
index 21b2c1275f97..1ccd3e8983bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/serviceendpointpolicydefinitions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewServiceEndpointPolicyDefinitionsClientWithBaseURI(baseURI string, subscr
// serviceEndpointPolicyDefinitions - parameters supplied to the create or update service endpoint policy
// operation.
func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string, serviceEndpointPolicyDefinitions ServiceEndpointPolicyDefinition) (result ServiceEndpointPolicyDefinitionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName, serviceEndpointPolicyDefinitions)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -119,6 +130,16 @@ func (client ServiceEndpointPolicyDefinitionsClient) CreateOrUpdateResponder(res
// serviceEndpointPolicyName - the name of the Service Endpoint Policy.
// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition.
func (client ServiceEndpointPolicyDefinitionsClient) Delete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinitionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Delete", nil, "Failure preparing request")
@@ -187,6 +208,16 @@ func (client ServiceEndpointPolicyDefinitionsClient) DeleteResponder(resp *http.
// serviceEndpointPolicyName - the name of the service endpoint policy name.
// serviceEndpointPolicyDefinitionName - the name of the service endpoint policy definition name.
func (client ServiceEndpointPolicyDefinitionsClient) Get(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string, serviceEndpointPolicyDefinitionName string) (result ServiceEndpointPolicyDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serviceEndpointPolicyName, serviceEndpointPolicyDefinitionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "Get", nil, "Failure preparing request")
@@ -255,6 +286,16 @@ func (client ServiceEndpointPolicyDefinitionsClient) GetResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// serviceEndpointPolicyName - the name of the service endpoint policy name.
func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.sepdlr.Response.Response != nil {
+ sc = result.sepdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, serviceEndpointPolicyName)
if err != nil {
@@ -319,8 +360,8 @@ func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupResponde
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResults(lastResults ServiceEndpointPolicyDefinitionListResult) (result ServiceEndpointPolicyDefinitionListResult, err error) {
- req, err := lastResults.serviceEndpointPolicyDefinitionListResultPreparer()
+func (client ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceEndpointPolicyDefinitionListResult) (result ServiceEndpointPolicyDefinitionListResult, err error) {
+ req, err := lastResults.serviceEndpointPolicyDefinitionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.ServiceEndpointPolicyDefinitionsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -341,6 +382,16 @@ func (client ServiceEndpointPolicyDefinitionsClient) listByResourceGroupNextResu
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceEndpointPolicyDefinitionsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, serviceEndpointPolicyName string) (result ServiceEndpointPolicyDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceEndpointPolicyDefinitionsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, serviceEndpointPolicyName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go
index 71ffe460f1bf..78bc52ab01bf 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/subnets.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewSubnetsClientWithBaseURI(baseURI string, subscriptionID string) SubnetsC
// subnetName - the name of the subnet.
// subnetParameters - parameters supplied to the create or update subnet operation.
func (client SubnetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, subnetParameters Subnet) (result SubnetsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, subnetParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SubnetsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -117,6 +128,16 @@ func (client SubnetsClient) CreateOrUpdateResponder(resp *http.Response) (result
// virtualNetworkName - the name of the virtual network.
// subnetName - the name of the subnet.
func (client SubnetsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string) (result SubnetsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, subnetName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client SubnetsClient) DeleteResponder(resp *http.Response) (result autores
// subnetName - the name of the subnet.
// expand - expands referenced resources.
func (client SubnetsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, subnetName string, expand string) (result Subnet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, subnetName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.SubnetsClient", "Get", nil, "Failure preparing request")
@@ -257,6 +288,16 @@ func (client SubnetsClient) GetResponder(resp *http.Response) (result Subnet, er
// resourceGroupName - the name of the resource group.
// virtualNetworkName - the name of the virtual network.
func (client SubnetsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.List")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName)
if err != nil {
@@ -321,8 +362,8 @@ func (client SubnetsClient) ListResponder(resp *http.Response) (result SubnetLis
}
// listNextResults retrieves the next set of results, if any.
-func (client SubnetsClient) listNextResults(lastResults SubnetListResult) (result SubnetListResult, err error) {
- req, err := lastResults.subnetListResultPreparer()
+func (client SubnetsClient) listNextResults(ctx context.Context, lastResults SubnetListResult) (result SubnetListResult, err error) {
+ req, err := lastResults.subnetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.SubnetsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -343,6 +384,16 @@ func (client SubnetsClient) listNextResults(lastResults SubnetListResult) (resul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubnetsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result SubnetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubnetsClient.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, resourceGroupName, virtualNetworkName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go
index bba367db24be..6fe262dfb368 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/usages.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
// Parameters:
// location - the location where resource usage is queried.
func (client UsagesClient) List(ctx context.Context, location string) (result UsagesListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List")
+ defer func() {
+ sc := -1
+ if result.ulr.Response.Response != nil {
+ sc = result.ulr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: location,
Constraints: []validation.Constraint{{Target: "location", Name: validation.Pattern, Rule: `^[-\w\._ ]+$`, Chain: nil}}}}); err != nil {
@@ -113,8 +124,8 @@ func (client UsagesClient) ListResponder(resp *http.Response) (result UsagesList
}
// listNextResults retrieves the next set of results, if any.
-func (client UsagesClient) listNextResults(lastResults UsagesListResult) (result UsagesListResult, err error) {
- req, err := lastResults.usagesListResultPreparer()
+func (client UsagesClient) listNextResults(ctx context.Context, lastResults UsagesListResult) (result UsagesListResult, err error) {
+ req, err := lastResults.usagesListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.UsagesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -135,6 +146,16 @@ func (client UsagesClient) listNextResults(lastResults UsagesListResult) (result
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsagesListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go
index 727aa6bb9dc3..f9d7adcff2cc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualhubs.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVirtualHubsClientWithBaseURI(baseURI string, subscriptionID string) Virt
// virtualHubName - the name of the VirtualHub.
// virtualHubParameters - parameters supplied to create or update VirtualHub.
func (client VirtualHubsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters VirtualHub) (result VirtualHubsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client VirtualHubsClient) CreateOrUpdateResponder(resp *http.Response) (re
// resourceGroupName - the resource group name of the VirtualHub.
// virtualHubName - the name of the VirtualHub.
func (client VirtualHubsClient) Delete(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHubsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualHubName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client VirtualHubsClient) DeleteResponder(resp *http.Response) (result aut
// resourceGroupName - the resource group name of the VirtualHub.
// virtualHubName - the name of the VirtualHub.
func (client VirtualHubsClient) Get(ctx context.Context, resourceGroupName string, virtualHubName string) (result VirtualHub, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualHubName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "Get", nil, "Failure preparing request")
@@ -244,6 +275,16 @@ func (client VirtualHubsClient) GetResponder(resp *http.Response) (result Virtua
// List lists all the VirtualHubs in a subscription.
func (client VirtualHubsClient) List(ctx context.Context) (result ListVirtualHubsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.List")
+ defer func() {
+ sc := -1
+ if result.lvhr.Response.Response != nil {
+ sc = result.lvhr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -306,8 +347,8 @@ func (client VirtualHubsClient) ListResponder(resp *http.Response) (result ListV
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualHubsClient) listNextResults(lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
- req, err := lastResults.listVirtualHubsResultPreparer()
+func (client VirtualHubsClient) listNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
+ req, err := lastResults.listVirtualHubsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -328,6 +369,16 @@ func (client VirtualHubsClient) listNextResults(lastResults ListVirtualHubsResul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVirtualHubsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.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
}
@@ -336,6 +387,16 @@ func (client VirtualHubsClient) ListComplete(ctx context.Context) (result ListVi
// Parameters:
// resourceGroupName - the resource group name of the VirtualHub.
func (client VirtualHubsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lvhr.Response.Response != nil {
+ sc = result.lvhr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -399,8 +460,8 @@ func (client VirtualHubsClient) ListByResourceGroupResponder(resp *http.Response
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VirtualHubsClient) listByResourceGroupNextResults(lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
- req, err := lastResults.listVirtualHubsResultPreparer()
+func (client VirtualHubsClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualHubsResult) (result ListVirtualHubsResult, err error) {
+ req, err := lastResults.listVirtualHubsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualHubsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client VirtualHubsClient) listByResourceGroupNextResults(lastResults ListV
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualHubsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -431,6 +502,16 @@ func (client VirtualHubsClient) ListByResourceGroupComplete(ctx context.Context,
// virtualHubName - the name of the VirtualHub.
// virtualHubParameters - parameters supplied to update VirtualHub tags.
func (client VirtualHubsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualHubName string, virtualHubParameters TagsObject) (result VirtualHubsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualHubsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualHubName, virtualHubParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualHubsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go
index a012c8c2f815..8f58c681602b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgatewayconnections.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualNetworkGatewayConnectionsClientWithBaseURI(baseURI string, subscr
// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
// parameters - parameters supplied to the create or update virtual network gateway connection operation.
func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VirtualNetworkGatewayConnection) (result VirtualNetworkGatewayConnectionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayConnectionPropertiesFormat", Name: validation.Null, Rule: true,
@@ -129,6 +140,16 @@ func (client VirtualNetworkGatewayConnectionsClient) CreateOrUpdateResponder(res
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
func (client VirtualNetworkGatewayConnectionsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Delete", nil, "Failure preparing request")
@@ -195,6 +216,16 @@ func (client VirtualNetworkGatewayConnectionsClient) DeleteResponder(resp *http.
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
func (client VirtualNetworkGatewayConnectionsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result VirtualNetworkGatewayConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client VirtualNetworkGatewayConnectionsClient) GetResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayConnectionName - the virtual network gateway connection shared key name.
func (client VirtualNetworkGatewayConnectionsClient) GetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string) (result ConnectionSharedKey, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.GetSharedKey")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "GetSharedKey", nil, "Failure preparing request")
@@ -330,6 +371,16 @@ func (client VirtualNetworkGatewayConnectionsClient) GetSharedKeyResponder(resp
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualNetworkGatewayConnectionsClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.vngclr.Response.Response != nil {
+ sc = result.vngclr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -393,8 +444,8 @@ func (client VirtualNetworkGatewayConnectionsClient) ListResponder(resp *http.Re
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkGatewayConnectionsClient) listNextResults(lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) {
- req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer()
+func (client VirtualNetworkGatewayConnectionsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayConnectionListResult) (result VirtualNetworkGatewayConnectionListResult, err error) {
+ req, err := lastResults.virtualNetworkGatewayConnectionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -415,6 +466,16 @@ func (client VirtualNetworkGatewayConnectionsClient) listNextResults(lastResults
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayConnectionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.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, resourceGroupName)
return
}
@@ -428,6 +489,16 @@ func (client VirtualNetworkGatewayConnectionsClient) ListComplete(ctx context.Co
// parameters - parameters supplied to the begin reset virtual network gateway connection shared key operation
// through network resource provider.
func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionResetSharedKey) (result VirtualNetworkGatewayConnectionsResetSharedKeyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.ResetSharedKey")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.KeyLength", Name: validation.Null, Rule: true,
@@ -510,6 +581,16 @@ func (client VirtualNetworkGatewayConnectionsClient) ResetSharedKeyResponder(res
// parameters - parameters supplied to the Begin Set Virtual Network Gateway connection Shared key operation
// throughNetwork resource provider.
func (client VirtualNetworkGatewayConnectionsClient) SetSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters ConnectionSharedKey) (result VirtualNetworkGatewayConnectionsSetSharedKeyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.SetSharedKey")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Value", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -586,6 +667,16 @@ func (client VirtualNetworkGatewayConnectionsClient) SetSharedKeyResponder(resp
// virtualNetworkGatewayConnectionName - the name of the virtual network gateway connection.
// parameters - parameters supplied to update virtual network gateway connection tags.
func (client VirtualNetworkGatewayConnectionsClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters TagsObject) (result VirtualNetworkGatewayConnectionsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewayConnectionsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewayConnectionsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go
index 028a7c4a03b3..f576b136aaf2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkgateways.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualNetworkGatewaysClientWithBaseURI(baseURI string, subscriptionID s
// virtualNetworkGatewayName - the name of the virtual network gateway.
// parameters - parameters supplied to create or update virtual network gateway operation.
func (client VirtualNetworkGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VirtualNetworkGateway) (result VirtualNetworkGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkGatewayPropertiesFormat", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -121,6 +132,16 @@ func (client VirtualNetworkGatewaysClient) CreateOrUpdateResponder(resp *http.Re
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Delete", nil, "Failure preparing request")
@@ -189,6 +210,16 @@ func (client VirtualNetworkGatewaysClient) DeleteResponder(resp *http.Response)
// virtualNetworkGatewayName - the name of the virtual network gateway.
// parameters - parameters supplied to the generate virtual network gateway VPN client package operation.
func (client VirtualNetworkGatewaysClient) Generatevpnclientpackage(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGeneratevpnclientpackageFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Generatevpnclientpackage")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GeneratevpnclientpackagePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Generatevpnclientpackage", nil, "Failure preparing request")
@@ -260,6 +291,16 @@ func (client VirtualNetworkGatewaysClient) GeneratevpnclientpackageResponder(res
// virtualNetworkGatewayName - the name of the virtual network gateway.
// parameters - parameters supplied to the generate virtual network gateway VPN client package operation.
func (client VirtualNetworkGatewaysClient) GenerateVpnProfile(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters VpnClientParameters) (result VirtualNetworkGatewaysGenerateVpnProfileFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GenerateVpnProfile")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GenerateVpnProfilePreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GenerateVpnProfile", nil, "Failure preparing request")
@@ -329,6 +370,16 @@ func (client VirtualNetworkGatewaysClient) GenerateVpnProfileResponder(resp *htt
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Get", nil, "Failure preparing request")
@@ -398,6 +449,16 @@ func (client VirtualNetworkGatewaysClient) GetResponder(resp *http.Response) (re
// virtualNetworkGatewayName - the name of the virtual network gateway.
// peer - the IP address of the peer
func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetAdvertisedRoutesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetAdvertisedRoutes")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetAdvertisedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetAdvertisedRoutes", nil, "Failure preparing request")
@@ -467,6 +528,16 @@ func (client VirtualNetworkGatewaysClient) GetAdvertisedRoutesResponder(resp *ht
// virtualNetworkGatewayName - the name of the virtual network gateway.
// peer - the IP address of the peer to retrieve the status of.
func (client VirtualNetworkGatewaysClient) GetBgpPeerStatus(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, peer string) (result VirtualNetworkGatewaysGetBgpPeerStatusFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetBgpPeerStatus")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetBgpPeerStatusPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, peer)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetBgpPeerStatus", nil, "Failure preparing request")
@@ -538,6 +609,16 @@ func (client VirtualNetworkGatewaysClient) GetBgpPeerStatusResponder(resp *http.
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) GetLearnedRoutes(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetLearnedRoutesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetLearnedRoutes")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetLearnedRoutesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetLearnedRoutes", nil, "Failure preparing request")
@@ -607,6 +688,16 @@ func (client VirtualNetworkGatewaysClient) GetLearnedRoutesResponder(resp *http.
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the virtual network gateway name.
func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnclientIpsecParametersFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnclientIpsecParameters")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetVpnclientIpsecParametersPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnclientIpsecParameters", nil, "Failure preparing request")
@@ -675,6 +766,16 @@ func (client VirtualNetworkGatewaysClient) GetVpnclientIpsecParametersResponder(
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURL(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysGetVpnProfilePackageURLFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.GetVpnProfilePackageURL")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetVpnProfilePackageURLPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "GetVpnProfilePackageURL", nil, "Failure preparing request")
@@ -741,6 +842,16 @@ func (client VirtualNetworkGatewaysClient) GetVpnProfilePackageURLResponder(resp
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualNetworkGatewaysClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.List")
+ defer func() {
+ sc := -1
+ if result.vnglr.Response.Response != nil {
+ sc = result.vnglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -804,8 +915,8 @@ func (client VirtualNetworkGatewaysClient) ListResponder(resp *http.Response) (r
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkGatewaysClient) listNextResults(lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) {
- req, err := lastResults.virtualNetworkGatewayListResultPreparer()
+func (client VirtualNetworkGatewaysClient) listNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListResult) (result VirtualNetworkGatewayListResult, err error) {
+ req, err := lastResults.virtualNetworkGatewayListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -826,6 +937,16 @@ func (client VirtualNetworkGatewaysClient) listNextResults(lastResults VirtualNe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkGatewayListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.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, resourceGroupName)
return
}
@@ -835,6 +956,16 @@ func (client VirtualNetworkGatewaysClient) ListComplete(ctx context.Context, res
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) ListConnections(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections")
+ defer func() {
+ sc := -1
+ if result.vnglcr.Response.Response != nil {
+ sc = result.vnglcr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listConnectionsNextResults
req, err := client.ListConnectionsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
@@ -899,8 +1030,8 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsResponder(resp *http.R
}
// listConnectionsNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(lastResults VirtualNetworkGatewayListConnectionsResult) (result VirtualNetworkGatewayListConnectionsResult, err error) {
- req, err := lastResults.virtualNetworkGatewayListConnectionsResultPreparer()
+func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(ctx context.Context, lastResults VirtualNetworkGatewayListConnectionsResult) (result VirtualNetworkGatewayListConnectionsResult, err error) {
+ req, err := lastResults.virtualNetworkGatewayListConnectionsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "listConnectionsNextResults", nil, "Failure preparing next results request")
}
@@ -921,6 +1052,16 @@ func (client VirtualNetworkGatewaysClient) listConnectionsNextResults(lastResult
// ListConnectionsComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewayListConnectionsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ListConnections")
+ 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.ListConnections(ctx, resourceGroupName, virtualNetworkGatewayName)
return
}
@@ -932,6 +1073,16 @@ func (client VirtualNetworkGatewaysClient) ListConnectionsComplete(ctx context.C
// gatewayVip - virtual network gateway vip address supplied to the begin reset of the active-active feature
// enabled gateway.
func (client VirtualNetworkGatewaysClient) Reset(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, gatewayVip string) (result VirtualNetworkGatewaysResetFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.Reset")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ResetPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, gatewayVip)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "Reset", nil, "Failure preparing request")
@@ -1003,6 +1154,16 @@ func (client VirtualNetworkGatewaysClient) ResetResponder(resp *http.Response) (
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKey(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result VirtualNetworkGatewaysResetVpnClientSharedKeyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.ResetVpnClientSharedKey")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ResetVpnClientSharedKeyPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "ResetVpnClientSharedKey", nil, "Failure preparing request")
@@ -1072,6 +1233,16 @@ func (client VirtualNetworkGatewaysClient) ResetVpnClientSharedKeyResponder(resp
// vpnclientIpsecParams - parameters supplied to the Begin Set vpnclient ipsec parameters of Virtual Network
// Gateway P2S client operation through Network resource provider.
func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParameters(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, vpnclientIpsecParams VpnClientIPsecParameters) (result VirtualNetworkGatewaysSetVpnclientIpsecParametersFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SetVpnclientIpsecParameters")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: vpnclientIpsecParams,
Constraints: []validation.Constraint{{Target: "vpnclientIpsecParams.SaLifeTimeSeconds", Name: validation.Null, Rule: true, Chain: nil},
@@ -1148,6 +1319,16 @@ func (client VirtualNetworkGatewaysClient) SetVpnclientIpsecParametersResponder(
// resourceGroupName - the name of the resource group.
// virtualNetworkGatewayName - the name of the virtual network gateway.
func (client VirtualNetworkGatewaysClient) SupportedVpnDevices(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string) (result String, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.SupportedVpnDevices")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.SupportedVpnDevicesPreparer(ctx, resourceGroupName, virtualNetworkGatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "SupportedVpnDevices", nil, "Failure preparing request")
@@ -1216,6 +1397,16 @@ func (client VirtualNetworkGatewaysClient) SupportedVpnDevicesResponder(resp *ht
// virtualNetworkGatewayName - the name of the virtual network gateway.
// parameters - parameters supplied to update virtual network gateway tags.
func (client VirtualNetworkGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkGatewayName string, parameters TagsObject) (result VirtualNetworkGatewaysUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkGatewayName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "UpdateTags", nil, "Failure preparing request")
@@ -1287,6 +1478,16 @@ func (client VirtualNetworkGatewaysClient) UpdateTagsResponder(resp *http.Respon
// configuration script is generated.
// parameters - parameters supplied to the generate vpn device script operation.
func (client VirtualNetworkGatewaysClient) VpnDeviceConfigurationScript(ctx context.Context, resourceGroupName string, virtualNetworkGatewayConnectionName string, parameters VpnDeviceScriptParameters) (result String, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkGatewaysClient.VpnDeviceConfigurationScript")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.VpnDeviceConfigurationScriptPreparer(ctx, resourceGroupName, virtualNetworkGatewayConnectionName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkGatewaysClient", "VpnDeviceConfigurationScript", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go
index 1639cf5d9725..3f632e799dcd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworkpeerings.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVirtualNetworkPeeringsClientWithBaseURI(baseURI string, subscriptionID s
// virtualNetworkPeeringParameters - parameters supplied to the create or update virtual network peering
// operation.
func (client VirtualNetworkPeeringsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string, virtualNetworkPeeringParameters VirtualNetworkPeering) (result VirtualNetworkPeeringsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -118,6 +129,16 @@ func (client VirtualNetworkPeeringsClient) CreateOrUpdateResponder(resp *http.Re
// virtualNetworkName - the name of the virtual network.
// virtualNetworkPeeringName - the name of the virtual network peering.
func (client VirtualNetworkPeeringsClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeeringsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client VirtualNetworkPeeringsClient) DeleteResponder(resp *http.Response)
// virtualNetworkName - the name of the virtual network.
// virtualNetworkPeeringName - the name of the virtual network peering.
func (client VirtualNetworkPeeringsClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, virtualNetworkPeeringName string) (result VirtualNetworkPeering, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, virtualNetworkPeeringName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "Get", nil, "Failure preparing request")
@@ -254,6 +285,16 @@ func (client VirtualNetworkPeeringsClient) GetResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// virtualNetworkName - the name of the virtual network.
func (client VirtualNetworkPeeringsClient) List(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.List")
+ defer func() {
+ sc := -1
+ if result.vnplr.Response.Response != nil {
+ sc = result.vnplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, virtualNetworkName)
if err != nil {
@@ -318,8 +359,8 @@ func (client VirtualNetworkPeeringsClient) ListResponder(resp *http.Response) (r
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkPeeringsClient) listNextResults(lastResults VirtualNetworkPeeringListResult) (result VirtualNetworkPeeringListResult, err error) {
- req, err := lastResults.virtualNetworkPeeringListResultPreparer()
+func (client VirtualNetworkPeeringsClient) listNextResults(ctx context.Context, lastResults VirtualNetworkPeeringListResult) (result VirtualNetworkPeeringListResult, err error) {
+ req, err := lastResults.virtualNetworkPeeringListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkPeeringsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -340,6 +381,16 @@ func (client VirtualNetworkPeeringsClient) listNextResults(lastResults VirtualNe
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkPeeringsClient) ListComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkPeeringListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkPeeringsClient.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, resourceGroupName, virtualNetworkName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go
index f7c798edb474..cd3252f13a53 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworks.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVirtualNetworksClientWithBaseURI(baseURI string, subscriptionID string)
// virtualNetworkName - the name of the virtual network.
// IPAddress - the private IP address to be verified.
func (client VirtualNetworksClient) CheckIPAddressAvailability(ctx context.Context, resourceGroupName string, virtualNetworkName string, IPAddress string) (result IPAddressAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CheckIPAddressAvailability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CheckIPAddressAvailabilityPreparer(ctx, resourceGroupName, virtualNetworkName, IPAddress)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CheckIPAddressAvailability", nil, "Failure preparing request")
@@ -77,9 +88,7 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityPreparer(ctx conte
const APIVersion = "2018-08-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
- }
- if len(IPAddress) > 0 {
- queryParameters["ipAddress"] = autorest.Encode("query", IPAddress)
+ "ipAddress": autorest.Encode("query", IPAddress),
}
preparer := autorest.CreatePreparer(
@@ -116,6 +125,16 @@ func (client VirtualNetworksClient) CheckIPAddressAvailabilityResponder(resp *ht
// virtualNetworkName - the name of the virtual network.
// parameters - parameters supplied to the create or update virtual network operation
func (client VirtualNetworksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters VirtualNetwork) (result VirtualNetworksCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualNetworkName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -185,6 +204,16 @@ func (client VirtualNetworksClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// virtualNetworkName - the name of the virtual network.
func (client VirtualNetworksClient) Delete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworksDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualNetworkName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Delete", nil, "Failure preparing request")
@@ -252,6 +281,16 @@ func (client VirtualNetworksClient) DeleteResponder(resp *http.Response) (result
// virtualNetworkName - the name of the virtual network.
// expand - expands referenced resources.
func (client VirtualNetworksClient) Get(ctx context.Context, resourceGroupName string, virtualNetworkName string, expand string) (result VirtualNetwork, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualNetworkName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "Get", nil, "Failure preparing request")
@@ -321,6 +360,16 @@ func (client VirtualNetworksClient) GetResponder(resp *http.Response) (result Vi
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualNetworksClient) List(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.List")
+ defer func() {
+ sc := -1
+ if result.vnlr.Response.Response != nil {
+ sc = result.vnlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -384,8 +433,8 @@ func (client VirtualNetworksClient) ListResponder(resp *http.Response) (result V
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualNetworksClient) listNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
- req, err := lastResults.virtualNetworkListResultPreparer()
+func (client VirtualNetworksClient) listNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
+ req, err := lastResults.virtualNetworkListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -406,12 +455,32 @@ func (client VirtualNetworksClient) listNextResults(lastResults VirtualNetworkLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworksClient) ListComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.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, resourceGroupName)
return
}
// ListAll gets all virtual networks in a subscription.
func (client VirtualNetworksClient) ListAll(ctx context.Context) (result VirtualNetworkListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vnlr.Response.Response != nil {
+ sc = result.vnlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -474,8 +543,8 @@ func (client VirtualNetworksClient) ListAllResponder(resp *http.Response) (resul
}
// listAllNextResults retrieves the next set of results, if any.
-func (client VirtualNetworksClient) listAllNextResults(lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
- req, err := lastResults.virtualNetworkListResultPreparer()
+func (client VirtualNetworksClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkListResult) (result VirtualNetworkListResult, err error) {
+ req, err := lastResults.virtualNetworkListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -496,6 +565,16 @@ func (client VirtualNetworksClient) listAllNextResults(lastResults VirtualNetwor
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result VirtualNetworkListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -505,6 +584,16 @@ func (client VirtualNetworksClient) ListAllComplete(ctx context.Context) (result
// resourceGroupName - the name of the resource group.
// virtualNetworkName - the name of the virtual network.
func (client VirtualNetworksClient) ListUsage(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage")
+ defer func() {
+ sc := -1
+ if result.vnlur.Response.Response != nil {
+ sc = result.vnlur.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listUsageNextResults
req, err := client.ListUsagePreparer(ctx, resourceGroupName, virtualNetworkName)
if err != nil {
@@ -569,8 +658,8 @@ func (client VirtualNetworksClient) ListUsageResponder(resp *http.Response) (res
}
// listUsageNextResults retrieves the next set of results, if any.
-func (client VirtualNetworksClient) listUsageNextResults(lastResults VirtualNetworkListUsageResult) (result VirtualNetworkListUsageResult, err error) {
- req, err := lastResults.virtualNetworkListUsageResultPreparer()
+func (client VirtualNetworksClient) listUsageNextResults(ctx context.Context, lastResults VirtualNetworkListUsageResult) (result VirtualNetworkListUsageResult, err error) {
+ req, err := lastResults.virtualNetworkListUsageResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "listUsageNextResults", nil, "Failure preparing next results request")
}
@@ -591,6 +680,16 @@ func (client VirtualNetworksClient) listUsageNextResults(lastResults VirtualNetw
// ListUsageComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resourceGroupName string, virtualNetworkName string) (result VirtualNetworkListUsageResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.ListUsage")
+ 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.ListUsage(ctx, resourceGroupName, virtualNetworkName)
return
}
@@ -601,6 +700,16 @@ func (client VirtualNetworksClient) ListUsageComplete(ctx context.Context, resou
// virtualNetworkName - the name of the virtual network.
// parameters - parameters supplied to update virtual network tags.
func (client VirtualNetworksClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualNetworkName string, parameters TagsObject) (result VirtualNetworksUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworksClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualNetworkName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworksClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go
index 82ef3664d7cf..5ed4462d49ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualnetworktaps.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewVirtualNetworkTapsClientWithBaseURI(baseURI string, subscriptionID strin
// tapName - the name of the virtual network tap.
// parameters - parameters supplied to the create or update virtual network tap operation.
func (client VirtualNetworkTapsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, tapName string, parameters VirtualNetworkTap) (result VirtualNetworkTapsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkTapPropertiesFormat", Name: validation.Null, Rule: false,
@@ -146,6 +157,16 @@ func (client VirtualNetworkTapsClient) CreateOrUpdateResponder(resp *http.Respon
// resourceGroupName - the name of the resource group.
// tapName - the name of the virtual network tap.
func (client VirtualNetworkTapsClient) Delete(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTapsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, tapName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Delete", nil, "Failure preparing request")
@@ -212,6 +233,16 @@ func (client VirtualNetworkTapsClient) DeleteResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group.
// tapName - the name of virtual network tap.
func (client VirtualNetworkTapsClient) Get(ctx context.Context, resourceGroupName string, tapName string) (result VirtualNetworkTap, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, tapName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "Get", nil, "Failure preparing request")
@@ -276,6 +307,16 @@ func (client VirtualNetworkTapsClient) GetResponder(resp *http.Response) (result
// ListAll gets all the VirtualNetworkTaps in a subscription.
func (client VirtualNetworkTapsClient) ListAll(ctx context.Context) (result VirtualNetworkTapListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.vntlr.Response.Response != nil {
+ sc = result.vntlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -338,8 +379,8 @@ func (client VirtualNetworkTapsClient) ListAllResponder(resp *http.Response) (re
}
// listAllNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkTapsClient) listAllNextResults(lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
- req, err := lastResults.virtualNetworkTapListResultPreparer()
+func (client VirtualNetworkTapsClient) listAllNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
+ req, err := lastResults.virtualNetworkTapListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -360,6 +401,16 @@ func (client VirtualNetworkTapsClient) listAllNextResults(lastResults VirtualNet
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkTapsClient) ListAllComplete(ctx context.Context) (result VirtualNetworkTapListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -368,6 +419,16 @@ func (client VirtualNetworkTapsClient) ListAllComplete(ctx context.Context) (res
// Parameters:
// resourceGroupName - the name of the resource group.
func (client VirtualNetworkTapsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.vntlr.Response.Response != nil {
+ sc = result.vntlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -431,8 +492,8 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupResponder(resp *http.R
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkTapsClient) listByResourceGroupNextResults(lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
- req, err := lastResults.virtualNetworkTapListResultPreparer()
+func (client VirtualNetworkTapsClient) listByResourceGroupNextResults(ctx context.Context, lastResults VirtualNetworkTapListResult) (result VirtualNetworkTapListResult, err error) {
+ req, err := lastResults.virtualNetworkTapListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -453,6 +514,16 @@ func (client VirtualNetworkTapsClient) listByResourceGroupNextResults(lastResult
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result VirtualNetworkTapListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -463,6 +534,16 @@ func (client VirtualNetworkTapsClient) ListByResourceGroupComplete(ctx context.C
// tapName - the name of the tap.
// tapParameters - parameters supplied to update VirtualNetworkTap tags.
func (client VirtualNetworkTapsClient) UpdateTags(ctx context.Context, resourceGroupName string, tapName string, tapParameters TagsObject) (result VirtualNetworkTapsUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkTapsClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, tapName, tapParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualNetworkTapsClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go
index 0179decb8f28..32be90cf4f4c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/virtualwans.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVirtualWansClientWithBaseURI(baseURI string, subscriptionID string) Virt
// virtualWANName - the name of the VirtualWAN being created or updated.
// wANParameters - parameters supplied to create or update VirtualWAN.
func (client VirtualWansClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters VirtualWAN) (result VirtualWansCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, virtualWANName, wANParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client VirtualWansClient) CreateOrUpdateResponder(resp *http.Response) (re
// resourceGroupName - the resource group name of the VirtualWan.
// virtualWANName - the name of the VirtualWAN being deleted.
func (client VirtualWansClient) Delete(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWansDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, virtualWANName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client VirtualWansClient) DeleteResponder(resp *http.Response) (result aut
// resourceGroupName - the resource group name of the VirtualWan.
// virtualWANName - the name of the VirtualWAN being retrieved.
func (client VirtualWansClient) Get(ctx context.Context, resourceGroupName string, virtualWANName string) (result VirtualWAN, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, virtualWANName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "Get", nil, "Failure preparing request")
@@ -244,6 +275,16 @@ func (client VirtualWansClient) GetResponder(resp *http.Response) (result Virtua
// List lists all the VirtualWANs in a subscription.
func (client VirtualWansClient) List(ctx context.Context) (result ListVirtualWANsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.List")
+ defer func() {
+ sc := -1
+ if result.lvwnr.Response.Response != nil {
+ sc = result.lvwnr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -306,8 +347,8 @@ func (client VirtualWansClient) ListResponder(resp *http.Response) (result ListV
}
// listNextResults retrieves the next set of results, if any.
-func (client VirtualWansClient) listNextResults(lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
- req, err := lastResults.listVirtualWANsResultPreparer()
+func (client VirtualWansClient) listNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
+ req, err := lastResults.listVirtualWANsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -328,6 +369,16 @@ func (client VirtualWansClient) listNextResults(lastResults ListVirtualWANsResul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualWansClient) ListComplete(ctx context.Context) (result ListVirtualWANsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.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
}
@@ -336,6 +387,16 @@ func (client VirtualWansClient) ListComplete(ctx context.Context) (result ListVi
// Parameters:
// resourceGroupName - the resource group name of the VirtualWan.
func (client VirtualWansClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lvwnr.Response.Response != nil {
+ sc = result.lvwnr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -399,8 +460,8 @@ func (client VirtualWansClient) ListByResourceGroupResponder(resp *http.Response
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VirtualWansClient) listByResourceGroupNextResults(lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
- req, err := lastResults.listVirtualWANsResultPreparer()
+func (client VirtualWansClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVirtualWANsResult) (result ListVirtualWANsResult, err error) {
+ req, err := lastResults.listVirtualWANsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VirtualWansClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client VirtualWansClient) listByResourceGroupNextResults(lastResults ListV
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVirtualWANsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -431,6 +502,16 @@ func (client VirtualWansClient) ListByResourceGroupComplete(ctx context.Context,
// virtualWANName - the name of the VirtualWAN being updated.
// wANParameters - parameters supplied to Update VirtualWAN tags.
func (client VirtualWansClient) UpdateTags(ctx context.Context, resourceGroupName string, virtualWANName string, wANParameters TagsObject) (result VirtualWansUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualWansClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, virtualWANName, wANParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VirtualWansClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go
index f629f6b5b8a4..0e4ce3ddf690 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnconnections.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewVpnConnectionsClientWithBaseURI(baseURI string, subscriptionID string) V
// connectionName - the name of the connection.
// vpnConnectionParameters - parameters supplied to create or Update a VPN Connection.
func (client VpnConnectionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string, vpnConnectionParameters VpnConnection) (result VpnConnectionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, connectionName, vpnConnectionParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -118,6 +129,16 @@ func (client VpnConnectionsClient) CreateOrUpdateResponder(resp *http.Response)
// gatewayName - the name of the gateway.
// connectionName - the name of the connection.
func (client VpnConnectionsClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnectionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Delete", nil, "Failure preparing request")
@@ -186,6 +207,16 @@ func (client VpnConnectionsClient) DeleteResponder(resp *http.Response) (result
// gatewayName - the name of the gateway.
// connectionName - the name of the vpn connection.
func (client VpnConnectionsClient) Get(ctx context.Context, resourceGroupName string, gatewayName string, connectionName string) (result VpnConnection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName, connectionName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "Get", nil, "Failure preparing request")
@@ -254,6 +285,16 @@ func (client VpnConnectionsClient) GetResponder(resp *http.Response) (result Vpn
// resourceGroupName - the resource group name of the VpnGateway.
// gatewayName - the name of the gateway.
func (client VpnConnectionsClient) ListByVpnGateway(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway")
+ defer func() {
+ sc := -1
+ if result.lvcr.Response.Response != nil {
+ sc = result.lvcr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByVpnGatewayNextResults
req, err := client.ListByVpnGatewayPreparer(ctx, resourceGroupName, gatewayName)
if err != nil {
@@ -318,8 +359,8 @@ func (client VpnConnectionsClient) ListByVpnGatewayResponder(resp *http.Response
}
// listByVpnGatewayNextResults retrieves the next set of results, if any.
-func (client VpnConnectionsClient) listByVpnGatewayNextResults(lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) {
- req, err := lastResults.listVpnConnectionsResultPreparer()
+func (client VpnConnectionsClient) listByVpnGatewayNextResults(ctx context.Context, lastResults ListVpnConnectionsResult) (result ListVpnConnectionsResult, err error) {
+ req, err := lastResults.listVpnConnectionsResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VpnConnectionsClient", "listByVpnGatewayNextResults", nil, "Failure preparing next results request")
}
@@ -340,6 +381,16 @@ func (client VpnConnectionsClient) listByVpnGatewayNextResults(lastResults ListV
// ListByVpnGatewayComplete enumerates all values, automatically crossing page boundaries as required.
func (client VpnConnectionsClient) ListByVpnGatewayComplete(ctx context.Context, resourceGroupName string, gatewayName string) (result ListVpnConnectionsResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnConnectionsClient.ListByVpnGateway")
+ 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.ListByVpnGateway(ctx, resourceGroupName, gatewayName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go
index 656c651ebc5e..16a9274d7724 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpngateways.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVpnGatewaysClientWithBaseURI(baseURI string, subscriptionID string) VpnG
// gatewayName - the name of the gateway.
// vpnGatewayParameters - parameters supplied to create or Update a virtual wan vpn gateway.
func (client VpnGatewaysClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters VpnGateway) (result VpnGatewaysCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client VpnGatewaysClient) CreateOrUpdateResponder(resp *http.Response) (re
// resourceGroupName - the resource group name of the VpnGateway.
// gatewayName - the name of the gateway.
func (client VpnGatewaysClient) Delete(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGatewaysDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, gatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client VpnGatewaysClient) DeleteResponder(resp *http.Response) (result aut
// resourceGroupName - the resource group name of the VpnGateway.
// gatewayName - the name of the gateway.
func (client VpnGatewaysClient) Get(ctx context.Context, resourceGroupName string, gatewayName string) (result VpnGateway, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, gatewayName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "Get", nil, "Failure preparing request")
@@ -244,6 +275,16 @@ func (client VpnGatewaysClient) GetResponder(resp *http.Response) (result VpnGat
// List lists all the VpnGateways in a subscription.
func (client VpnGatewaysClient) List(ctx context.Context) (result ListVpnGatewaysResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.List")
+ defer func() {
+ sc := -1
+ if result.lvgr.Response.Response != nil {
+ sc = result.lvgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -306,8 +347,8 @@ func (client VpnGatewaysClient) ListResponder(resp *http.Response) (result ListV
}
// listNextResults retrieves the next set of results, if any.
-func (client VpnGatewaysClient) listNextResults(lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
- req, err := lastResults.listVpnGatewaysResultPreparer()
+func (client VpnGatewaysClient) listNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
+ req, err := lastResults.listVpnGatewaysResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -328,6 +369,16 @@ func (client VpnGatewaysClient) listNextResults(lastResults ListVpnGatewaysResul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVpnGatewaysResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.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
}
@@ -336,6 +387,16 @@ func (client VpnGatewaysClient) ListComplete(ctx context.Context) (result ListVp
// Parameters:
// resourceGroupName - the resource group name of the VpnGateway.
func (client VpnGatewaysClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lvgr.Response.Response != nil {
+ sc = result.lvgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -399,8 +460,8 @@ func (client VpnGatewaysClient) ListByResourceGroupResponder(resp *http.Response
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VpnGatewaysClient) listByResourceGroupNextResults(lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
- req, err := lastResults.listVpnGatewaysResultPreparer()
+func (client VpnGatewaysClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnGatewaysResult) (result ListVpnGatewaysResult, err error) {
+ req, err := lastResults.listVpnGatewaysResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client VpnGatewaysClient) listByResourceGroupNextResults(lastResults ListV
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnGatewaysResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -431,6 +502,16 @@ func (client VpnGatewaysClient) ListByResourceGroupComplete(ctx context.Context,
// gatewayName - the name of the gateway.
// vpnGatewayParameters - parameters supplied to update a virtual wan vpn gateway tags.
func (client VpnGatewaysClient) UpdateTags(ctx context.Context, resourceGroupName string, gatewayName string, vpnGatewayParameters TagsObject) (result VpnGatewaysUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnGatewaysClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, gatewayName, vpnGatewayParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnGatewaysClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go
index 2efd727d56c7..f905a49277a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsites.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVpnSitesClientWithBaseURI(baseURI string, subscriptionID string) VpnSite
// vpnSiteName - the name of the VpnSite being created or updated.
// vpnSiteParameters - parameters supplied to create or update VpnSite.
func (client VpnSitesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters VpnSite) (result VpnSitesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client VpnSitesClient) CreateOrUpdateResponder(resp *http.Response) (resul
// resourceGroupName - the resource group name of the VpnSite.
// vpnSiteName - the name of the VpnSite being deleted.
func (client VpnSitesClient) Delete(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSitesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, vpnSiteName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client VpnSitesClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the resource group name of the VpnSite.
// vpnSiteName - the name of the VpnSite being retrieved.
func (client VpnSitesClient) Get(ctx context.Context, resourceGroupName string, vpnSiteName string) (result VpnSite, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, vpnSiteName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "Get", nil, "Failure preparing request")
@@ -244,6 +275,16 @@ func (client VpnSitesClient) GetResponder(resp *http.Response) (result VpnSite,
// List lists all the VpnSites in a subscription.
func (client VpnSitesClient) List(ctx context.Context) (result ListVpnSitesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.List")
+ defer func() {
+ sc := -1
+ if result.lvsr.Response.Response != nil {
+ sc = result.lvsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -306,8 +347,8 @@ func (client VpnSitesClient) ListResponder(resp *http.Response) (result ListVpnS
}
// listNextResults retrieves the next set of results, if any.
-func (client VpnSitesClient) listNextResults(lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
- req, err := lastResults.listVpnSitesResultPreparer()
+func (client VpnSitesClient) listNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
+ req, err := lastResults.listVpnSitesResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -328,6 +369,16 @@ func (client VpnSitesClient) listNextResults(lastResults ListVpnSitesResult) (re
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSitesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.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
}
@@ -336,6 +387,16 @@ func (client VpnSitesClient) ListComplete(ctx context.Context) (result ListVpnSi
// Parameters:
// resourceGroupName - the resource group name of the VpnSite.
func (client VpnSitesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.lvsr.Response.Response != nil {
+ sc = result.lvsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -399,8 +460,8 @@ func (client VpnSitesClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client VpnSitesClient) listByResourceGroupNextResults(lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
- req, err := lastResults.listVpnSitesResultPreparer()
+func (client VpnSitesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ListVpnSitesResult) (result ListVpnSitesResult, err error) {
+ req, err := lastResults.listVpnSitesResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "network.VpnSitesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client VpnSitesClient) listByResourceGroupNextResults(lastResults ListVpnS
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ListVpnSitesResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -431,6 +502,16 @@ func (client VpnSitesClient) ListByResourceGroupComplete(ctx context.Context, re
// vpnSiteName - the name of the VpnSite being updated.
// vpnSiteParameters - parameters supplied to update VpnSite tags.
func (client VpnSitesClient) UpdateTags(ctx context.Context, resourceGroupName string, vpnSiteName string, vpnSiteParameters TagsObject) (result VpnSitesUpdateTagsFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, vpnSiteName, vpnSiteParameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnSitesClient", "UpdateTags", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go
index 0b7e7bc359db..fc8b5c3d6c2d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/vpnsitesconfiguration.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewVpnSitesConfigurationClientWithBaseURI(baseURI string, subscriptionID st
// virtualWANName - the name of the VirtualWAN for which configuration of all vpn-sites is needed.
// request - parameters supplied to download vpn-sites configuration.
func (client VpnSitesConfigurationClient) Download(ctx context.Context, resourceGroupName string, virtualWANName string, request GetVpnSitesConfigurationRequest) (result VpnSitesConfigurationDownloadFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VpnSitesConfigurationClient.Download")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DownloadPreparer(ctx, resourceGroupName, virtualWANName, request)
if err != nil {
err = autorest.NewErrorWithError(err, "network.VpnSitesConfigurationClient", "Download", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go
index 782ef3bda969..233abb22defa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network/watchers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewWatchersClientWithBaseURI(baseURI string, subscriptionID string) Watcher
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that determine how the connectivity check will be performed.
func (client WatchersClient) CheckConnectivity(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConnectivityParameters) (result WatchersCheckConnectivityFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CheckConnectivity")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Source", Name: validation.Null, Rule: true,
@@ -125,6 +136,16 @@ func (client WatchersClient) CheckConnectivityResponder(resp *http.Response) (re
// networkWatcherName - the name of the network watcher.
// parameters - parameters that define the network watcher resource.
func (client WatchersClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters Watcher) (result Watcher, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, networkWatcherName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -194,6 +215,16 @@ func (client WatchersClient) CreateOrUpdateResponder(resp *http.Response) (resul
// resourceGroupName - the name of the resource group.
// networkWatcherName - the name of the network watcher.
func (client WatchersClient) Delete(ctx context.Context, resourceGroupName string, networkWatcherName string) (result WatchersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, networkWatcherName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "Delete", nil, "Failure preparing request")
@@ -260,6 +291,16 @@ func (client WatchersClient) DeleteResponder(resp *http.Response) (result autore
// resourceGroupName - the name of the resource group.
// networkWatcherName - the name of the network watcher.
func (client WatchersClient) Get(ctx context.Context, resourceGroupName string, networkWatcherName string) (result Watcher, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, networkWatcherName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "Get", nil, "Failure preparing request")
@@ -329,6 +370,16 @@ func (client WatchersClient) GetResponder(resp *http.Response) (result Watcher,
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that determine Azure reachability report configuration.
func (client WatchersClient) GetAzureReachabilityReport(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AzureReachabilityReportParameters) (result WatchersGetAzureReachabilityReportFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetAzureReachabilityReport")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ProviderLocation", Name: validation.Null, Rule: true,
@@ -408,6 +459,16 @@ func (client WatchersClient) GetAzureReachabilityReportResponder(resp *http.Resp
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that define a resource to query flow log and traffic analytics (optional) status.
func (client WatchersClient) GetFlowLogStatus(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogStatusParameters) (result WatchersGetFlowLogStatusFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetFlowLogStatus")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -484,10 +545,20 @@ func (client WatchersClient) GetFlowLogStatusResponder(resp *http.Response) (res
// networkWatcherName - the name of the network watcher.
// parameters - parameters to get network configuration diagnostic.
func (client WatchersClient) GetNetworkConfigurationDiagnostic(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters ConfigurationDiagnosticParameters) (result WatchersGetNetworkConfigurationDiagnosticFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNetworkConfigurationDiagnostic")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.Queries", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
+ {Target: "parameters.Profiles", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
return result, validation.NewError("network.WatchersClient", "GetNetworkConfigurationDiagnostic", err.Error())
}
@@ -561,6 +632,16 @@ func (client WatchersClient) GetNetworkConfigurationDiagnosticResponder(resp *ht
// networkWatcherName - the name of the network watcher.
// parameters - parameters that define the source and destination endpoint.
func (client WatchersClient) GetNextHop(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters NextHopParameters) (result WatchersGetNextHopFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetNextHop")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
@@ -639,6 +720,16 @@ func (client WatchersClient) GetNextHopResponder(resp *http.Response) (result Ne
// networkWatcherName - the name of the network watcher.
// parameters - parameters that define the representation of topology.
func (client WatchersClient) GetTopology(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TopologyParameters) (result Topology, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTopology")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetTopologyPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "GetTopology", nil, "Failure preparing request")
@@ -709,6 +800,16 @@ func (client WatchersClient) GetTopologyResponder(resp *http.Response) (result T
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that define the resource to troubleshoot.
func (client WatchersClient) GetTroubleshooting(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TroubleshootingParameters) (result WatchersGetTroubleshootingFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshooting")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
@@ -789,6 +890,16 @@ func (client WatchersClient) GetTroubleshootingResponder(resp *http.Response) (r
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that define the resource to query the troubleshooting result.
func (client WatchersClient) GetTroubleshootingResult(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters QueryTroubleshootingParameters) (result WatchersGetTroubleshootingResultFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetTroubleshootingResult")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -865,6 +976,16 @@ func (client WatchersClient) GetTroubleshootingResultResponder(resp *http.Respon
// networkWatcherName - the name of the network watcher.
// parameters - parameters that define the VM to check security groups for.
func (client WatchersClient) GetVMSecurityRules(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters SecurityGroupViewParameters) (result WatchersGetVMSecurityRulesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.GetVMSecurityRules")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -939,6 +1060,16 @@ func (client WatchersClient) GetVMSecurityRulesResponder(resp *http.Response) (r
// Parameters:
// resourceGroupName - the name of the resource group.
func (client WatchersClient) List(ctx context.Context, resourceGroupName string) (result WatcherListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "List", nil, "Failure preparing request")
@@ -1002,6 +1133,16 @@ func (client WatchersClient) ListResponder(resp *http.Response) (result WatcherL
// ListAll gets all network watchers by subscription.
func (client WatchersClient) ListAll(ctx context.Context) (result WatcherListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAllPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAll", nil, "Failure preparing request")
@@ -1068,6 +1209,16 @@ func (client WatchersClient) ListAllResponder(resp *http.Response) (result Watch
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that scope the list of available providers.
func (client WatchersClient) ListAvailableProviders(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters AvailableProvidersListParameters) (result WatchersListAvailableProvidersFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.ListAvailableProviders")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListAvailableProvidersPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "ListAvailableProviders", nil, "Failure preparing request")
@@ -1138,6 +1289,16 @@ func (client WatchersClient) ListAvailableProvidersResponder(resp *http.Response
// networkWatcherName - the name of the network watcher resource.
// parameters - parameters that define the configuration of flow log.
func (client WatchersClient) SetFlowLogConfiguration(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters FlowLogInformation) (result WatchersSetFlowLogConfigurationFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.SetFlowLogConfiguration")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
@@ -1226,6 +1387,16 @@ func (client WatchersClient) SetFlowLogConfigurationResponder(resp *http.Respons
// networkWatcherName - the name of the network watcher.
// parameters - parameters supplied to update network watcher tags.
func (client WatchersClient) UpdateTags(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters TagsObject) (result Watcher, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.UpdateTags")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdateTagsPreparer(ctx, resourceGroupName, networkWatcherName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "network.WatchersClient", "UpdateTags", nil, "Failure preparing request")
@@ -1296,6 +1467,16 @@ func (client WatchersClient) UpdateTagsResponder(resp *http.Response) (result Wa
// networkWatcherName - the name of the network watcher.
// parameters - parameters that define the IP flow to be verified.
func (client WatchersClient) VerifyIPFlow(ctx context.Context, resourceGroupName string, networkWatcherName string, parameters VerificationIPFlowParameters) (result WatchersVerifyIPFlowFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WatchersClient.VerifyIPFlow")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.TargetResourceID", Name: validation.Null, Rule: true, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
index 82520f63cce1..fcd9ddfa85be 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/models.go
@@ -18,14 +18,19 @@ package notificationhubs
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs"
+
// AccessRights enumerates the values for access rights.
type AccessRights string
@@ -171,7 +176,7 @@ type ApnsCredentialProperties struct {
CertificateKey *string `json:"certificateKey,omitempty"`
// Endpoint - The endpoint of this credential.
Endpoint *string `json:"endpoint,omitempty"`
- // Thumbprint - The Apns certificate Thumbprint
+ // Thumbprint - The APNS certificate Thumbprint
Thumbprint *string `json:"thumbprint,omitempty"`
// KeyID - A 10-character key identifier (kid) key, obtained from your developer account
KeyID *string `json:"keyId,omitempty"`
@@ -278,7 +283,7 @@ func (capVar CheckAvailabilityParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// CheckAvailabilityResult description of a CheckAvailibility resource.
+// CheckAvailabilityResult description of a CheckAvailability resource.
type CheckAvailabilityResult struct {
autorest.Response `json:"-"`
// IsAvailiable - True if the name is available and can be used to create new Namespace/NotificationHub. Otherwise false.
@@ -581,8 +586,8 @@ type DebugSendResult struct {
Results interface{} `json:"results,omitempty"`
}
-// ErrorResponse error reponse indicates NotificationHubs service is not able to process the incoming request. The
-// reason is provided in the error message.
+// ErrorResponse error response indicates NotificationHubs service is not able to process the incoming
+// request. The reason is provided in the error message.
type ErrorResponse struct {
// Code - Error code.
Code *string `json:"code,omitempty"`
@@ -652,14 +657,24 @@ type ListResultIterator struct {
page ListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListResultIterator) Next() error {
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -668,6 +683,13 @@ func (iter *ListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -687,6 +709,11 @@ func (iter ListResultIterator) Value() ResourceType {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lr ListResult) IsEmpty() bool {
return lr.Value == nil || len(*lr.Value) == 0
@@ -694,11 +721,11 @@ func (lr ListResult) IsEmpty() bool {
// listResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lr ListResult) listResultPreparer() (*http.Request, error) {
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lr.NextLink)))
@@ -706,14 +733,24 @@ func (lr ListResult) listResultPreparer() (*http.Request, error) {
// ListResultPage contains a page of ResourceType values.
type ListResultPage struct {
- fn func(ListResult) (ListResult, error)
+ fn func(context.Context, ListResult) (ListResult, error)
lr ListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListResultPage) Next() error {
- next, err := page.fn(page.lr)
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
if err != nil {
return err
}
@@ -721,6 +758,13 @@ func (page *ListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListResultPage) NotDone() bool {
return !page.lr.IsEmpty()
@@ -739,6 +783,11 @@ func (page ListResultPage) Values() []ResourceType {
return *page.lr.Value
}
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
// MpnsCredential description of a NotificationHub MpnsCredential.
type MpnsCredential struct {
// MpnsCredentialProperties - Properties of NotificationHub MpnsCredential.
@@ -784,7 +833,7 @@ type MpnsCredentialProperties struct {
MpnsCertificate *string `json:"mpnsCertificate,omitempty"`
// CertificateKey - The certificate key for this credential.
CertificateKey *string `json:"certificateKey,omitempty"`
- // Thumbprint - The Mpns certificate Thumbprint
+ // Thumbprint - The MPNS certificate Thumbprint
Thumbprint *string `json:"thumbprint,omitempty"`
}
@@ -926,14 +975,24 @@ type NamespaceListResultIterator struct {
page NamespaceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *NamespaceListResultIterator) Next() error {
+func (iter *NamespaceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespaceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -942,6 +1001,13 @@ func (iter *NamespaceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *NamespaceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter NamespaceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -961,6 +1027,11 @@ func (iter NamespaceListResultIterator) Value() NamespaceResource {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the NamespaceListResultIterator type.
+func NewNamespaceListResultIterator(page NamespaceListResultPage) NamespaceListResultIterator {
+ return NamespaceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (nlr NamespaceListResult) IsEmpty() bool {
return nlr.Value == nil || len(*nlr.Value) == 0
@@ -968,11 +1039,11 @@ func (nlr NamespaceListResult) IsEmpty() bool {
// namespaceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (nlr NamespaceListResult) namespaceListResultPreparer() (*http.Request, error) {
+func (nlr NamespaceListResult) namespaceListResultPreparer(ctx context.Context) (*http.Request, error) {
if nlr.NextLink == nil || len(to.String(nlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(nlr.NextLink)))
@@ -980,14 +1051,24 @@ func (nlr NamespaceListResult) namespaceListResultPreparer() (*http.Request, err
// NamespaceListResultPage contains a page of NamespaceResource values.
type NamespaceListResultPage struct {
- fn func(NamespaceListResult) (NamespaceListResult, error)
+ fn func(context.Context, NamespaceListResult) (NamespaceListResult, error)
nlr NamespaceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *NamespaceListResultPage) Next() error {
- next, err := page.fn(page.nlr)
+func (page *NamespaceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespaceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.nlr)
if err != nil {
return err
}
@@ -995,6 +1076,13 @@ func (page *NamespaceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *NamespaceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page NamespaceListResultPage) NotDone() bool {
return !page.nlr.IsEmpty()
@@ -1013,6 +1101,11 @@ func (page NamespaceListResultPage) Values() []NamespaceResource {
return *page.nlr.Value
}
+// Creates a new instance of the NamespaceListResultPage type.
+func NewNamespaceListResultPage(getNextPage func(context.Context, NamespaceListResult) (NamespaceListResult, error)) NamespaceListResultPage {
+ return NamespaceListResultPage{fn: getNextPage}
+}
+
// NamespacePatchParameters parameters supplied to the Patch Namespace operation.
type NamespacePatchParameters struct {
// Tags - Resource tags
@@ -1189,7 +1282,8 @@ func (nr *NamespaceResource) UnmarshalJSON(body []byte) error {
return nil
}
-// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// NamespacesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type NamespacesDeleteFuture struct {
azure.Future
}
@@ -1229,8 +1323,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
-// OperationListResult result of the request to list NotificationHubs operations. It contains a list of operations
-// and a URL link to get the next set of results.
+// OperationListResult result of the request to list NotificationHubs operations. It contains a list of
+// operations and a URL link to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of NotificationHubs operations supported by the Microsoft.NotificationHubs resource provider.
@@ -1245,14 +1339,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1261,6 +1365,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1280,6 +1391,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1287,11 +1403,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1299,14 +1415,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1314,6 +1440,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1332,6 +1465,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// PatchParameters parameters supplied to the patch NotificationHub operation.
type PatchParameters struct {
// Properties - Properties of the NotificationHub.
@@ -1802,8 +1940,8 @@ func (rt *ResourceType) UnmarshalJSON(body []byte) error {
return nil
}
-// SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters supplied to the CreateOrUpdate Namespace
-// AuthorizationRules.
+// SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters supplied to the CreateOrUpdate
+// Namespace AuthorizationRules.
type SharedAccessAuthorizationRuleCreateOrUpdateParameters struct {
// Properties - Properties of the Namespace AuthorizationRules.
Properties *SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"`
@@ -1825,14 +1963,24 @@ type SharedAccessAuthorizationRuleListResultIterator struct {
page SharedAccessAuthorizationRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SharedAccessAuthorizationRuleListResultIterator) Next() error {
+func (iter *SharedAccessAuthorizationRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessAuthorizationRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1841,6 +1989,13 @@ func (iter *SharedAccessAuthorizationRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SharedAccessAuthorizationRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SharedAccessAuthorizationRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1860,6 +2015,11 @@ func (iter SharedAccessAuthorizationRuleListResultIterator) Value() SharedAccess
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SharedAccessAuthorizationRuleListResultIterator type.
+func NewSharedAccessAuthorizationRuleListResultIterator(page SharedAccessAuthorizationRuleListResultPage) SharedAccessAuthorizationRuleListResultIterator {
+ return SharedAccessAuthorizationRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (saarlr SharedAccessAuthorizationRuleListResult) IsEmpty() bool {
return saarlr.Value == nil || len(*saarlr.Value) == 0
@@ -1867,26 +2027,37 @@ func (saarlr SharedAccessAuthorizationRuleListResult) IsEmpty() bool {
// sharedAccessAuthorizationRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (saarlr SharedAccessAuthorizationRuleListResult) sharedAccessAuthorizationRuleListResultPreparer() (*http.Request, error) {
+func (saarlr SharedAccessAuthorizationRuleListResult) sharedAccessAuthorizationRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if saarlr.NextLink == nil || len(to.String(saarlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(saarlr.NextLink)))
}
-// SharedAccessAuthorizationRuleListResultPage contains a page of SharedAccessAuthorizationRuleResource values.
+// SharedAccessAuthorizationRuleListResultPage contains a page of SharedAccessAuthorizationRuleResource
+// values.
type SharedAccessAuthorizationRuleListResultPage struct {
- fn func(SharedAccessAuthorizationRuleListResult) (SharedAccessAuthorizationRuleListResult, error)
+ fn func(context.Context, SharedAccessAuthorizationRuleListResult) (SharedAccessAuthorizationRuleListResult, error)
saarlr SharedAccessAuthorizationRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SharedAccessAuthorizationRuleListResultPage) Next() error {
- next, err := page.fn(page.saarlr)
+func (page *SharedAccessAuthorizationRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SharedAccessAuthorizationRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.saarlr)
if err != nil {
return err
}
@@ -1894,6 +2065,13 @@ func (page *SharedAccessAuthorizationRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SharedAccessAuthorizationRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SharedAccessAuthorizationRuleListResultPage) NotDone() bool {
return !page.saarlr.IsEmpty()
@@ -1912,6 +2090,11 @@ func (page SharedAccessAuthorizationRuleListResultPage) Values() []SharedAccessA
return *page.saarlr.Value
}
+// Creates a new instance of the SharedAccessAuthorizationRuleListResultPage type.
+func NewSharedAccessAuthorizationRuleListResultPage(getNextPage func(context.Context, SharedAccessAuthorizationRuleListResult) (SharedAccessAuthorizationRuleListResult, error)) SharedAccessAuthorizationRuleListResultPage {
+ return SharedAccessAuthorizationRuleListResultPage{fn: getNextPage}
+}
+
// SharedAccessAuthorizationRuleProperties sharedAccessAuthorizationRule properties.
type SharedAccessAuthorizationRuleProperties struct {
// Rights - The rights associated with the rule.
@@ -1937,7 +2120,7 @@ type SharedAccessAuthorizationRuleProperties struct {
// SharedAccessAuthorizationRuleResource description of a Namespace AuthorizationRules.
type SharedAccessAuthorizationRuleResource struct {
autorest.Response `json:"-"`
- // SharedAccessAuthorizationRuleProperties - Pproperties of the Namespace AuthorizationRule.
+ // SharedAccessAuthorizationRuleProperties - Properties of the Namespace AuthorizationRule.
*SharedAccessAuthorizationRuleProperties `json:"properties,omitempty"`
// ID - Resource Id
ID *string `json:"id,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
index e7362a7a0a89..8429cad1b654 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/namespaces.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) Names
// Parameters:
// parameters - the namespace name.
func (client NamespacesClient) CheckAvailability(ctx context.Context, parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CheckAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -120,6 +131,16 @@ func (client NamespacesClient) CheckAvailabilityResponder(resp *http.Response) (
// namespaceName - the namespace name.
// parameters - parameters supplied to create a Namespace Resource.
func (client NamespacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespaceCreateOrUpdateParameters) (result NamespaceResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, namespaceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -188,9 +209,19 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res
// Parameters:
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
-// authorizationRuleName - aauthorization Rule Name.
+// authorizationRuleName - authorization Rule Name.
// parameters - the shared access authorization rule.
func (client NamespacesClient) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.CreateOrUpdateAuthorizationRule")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -268,6 +299,16 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
func (client NamespacesClient) Delete(ctx context.Context, resourceGroupName string, namespaceName string) (result NamespacesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, namespaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "Delete", nil, "Failure preparing request")
@@ -313,10 +354,6 @@ func (client NamespacesClient) DeleteSender(req *http.Request) (future Namespace
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -339,6 +376,16 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto
// namespaceName - the namespace name.
// authorizationRuleName - authorization Rule Name.
func (client NamespacesClient) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.DeleteAuthorizationRule")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "DeleteAuthorizationRule", nil, "Failure preparing request")
@@ -406,6 +453,16 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
func (client NamespacesClient) Get(ctx context.Context, resourceGroupName string, namespaceName string) (result NamespaceResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, namespaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "Get", nil, "Failure preparing request")
@@ -474,6 +531,16 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa
// namespaceName - the namespace name
// authorizationRuleName - authorization rule name.
func (client NamespacesClient) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.GetAuthorizationRule")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "GetAuthorizationRule", nil, "Failure preparing request")
@@ -542,6 +609,16 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response
// resourceGroupName - the name of the resource group. If resourceGroupName value is null the method lists all
// the namespaces within subscription
func (client NamespacesClient) List(ctx context.Context, resourceGroupName string) (result NamespaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.List")
+ defer func() {
+ sc := -1
+ if result.nlr.Response.Response != nil {
+ sc = result.nlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName)
if err != nil {
@@ -605,8 +682,8 @@ func (client NamespacesClient) ListResponder(resp *http.Response) (result Namesp
}
// listNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) {
- req, err := lastResults.namespaceListResultPreparer()
+func (client NamespacesClient) listNextResults(ctx context.Context, lastResults NamespaceListResult) (result NamespaceListResult, err error) {
+ req, err := lastResults.namespaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -627,12 +704,32 @@ func (client NamespacesClient) listNextResults(lastResults NamespaceListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListComplete(ctx context.Context, resourceGroupName string) (result NamespaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.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, resourceGroupName)
return
}
// ListAll lists all the available namespaces within the subscription irrespective of the resourceGroups.
func (client NamespacesClient) ListAll(ctx context.Context) (result NamespaceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAll")
+ defer func() {
+ sc := -1
+ if result.nlr.Response.Response != nil {
+ sc = result.nlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAllNextResults
req, err := client.ListAllPreparer(ctx)
if err != nil {
@@ -695,8 +792,8 @@ func (client NamespacesClient) ListAllResponder(resp *http.Response) (result Nam
}
// listAllNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listAllNextResults(lastResults NamespaceListResult) (result NamespaceListResult, err error) {
- req, err := lastResults.namespaceListResultPreparer()
+func (client NamespacesClient) listAllNextResults(ctx context.Context, lastResults NamespaceListResult) (result NamespaceListResult, err error) {
+ req, err := lastResults.namespaceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "listAllNextResults", nil, "Failure preparing next results request")
}
@@ -717,6 +814,16 @@ func (client NamespacesClient) listAllNextResults(lastResults NamespaceListResul
// ListAllComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListAllComplete(ctx context.Context) (result NamespaceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAll")
+ 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.ListAll(ctx)
return
}
@@ -726,6 +833,16 @@ func (client NamespacesClient) ListAllComplete(ctx context.Context) (result Name
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name
func (client NamespacesClient) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAuthorizationRules")
+ defer func() {
+ sc := -1
+ if result.saarlr.Response.Response != nil {
+ sc = result.saarlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAuthorizationRulesNextResults
req, err := client.ListAuthorizationRulesPreparer(ctx, resourceGroupName, namespaceName)
if err != nil {
@@ -790,8 +907,8 @@ func (client NamespacesClient) ListAuthorizationRulesResponder(resp *http.Respon
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
-func (client NamespacesClient) listAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) {
- req, err := lastResults.sharedAccessAuthorizationRuleListResultPreparer()
+func (client NamespacesClient) listAuthorizationRulesNextResults(ctx context.Context, lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) {
+ req, err := lastResults.sharedAccessAuthorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
@@ -812,6 +929,16 @@ func (client NamespacesClient) listAuthorizationRulesNextResults(lastResults Sha
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client NamespacesClient) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result SharedAccessAuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListAuthorizationRules")
+ 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.ListAuthorizationRules(ctx, resourceGroupName, namespaceName)
return
}
@@ -822,6 +949,16 @@ func (client NamespacesClient) ListAuthorizationRulesComplete(ctx context.Contex
// namespaceName - the namespace name.
// authorizationRuleName - the connection string of the namespace for the specified authorizationRule.
func (client NamespacesClient) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.ListKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListKeysPreparer(ctx, resourceGroupName, namespaceName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "ListKeys", nil, "Failure preparing request")
@@ -891,6 +1028,16 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Sh
// namespaceName - the namespace name.
// parameters - parameters supplied to patch a Namespace Resource.
func (client NamespacesClient) Patch(ctx context.Context, resourceGroupName string, namespaceName string, parameters NamespacePatchParameters) (result NamespaceResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.Patch")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PatchPreparer(ctx, resourceGroupName, namespaceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "Patch", nil, "Failure preparing request")
@@ -962,6 +1109,16 @@ func (client NamespacesClient) PatchResponder(resp *http.Response) (result Names
// authorizationRuleName - the connection string of the namespace for the specified authorizationRule.
// parameters - parameters supplied to regenerate the Namespace Authorization Rule Key.
func (client NamespacesClient) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, authorizationRuleName string, parameters PolicykeyResource) (result ResourceListKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NamespacesClient.RegenerateKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RegenerateKeysPreparer(ctx, resourceGroupName, namespaceName, authorizationRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.NamespacesClient", "RegenerateKeys", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
index 29e1e678beb3..e6ea8675eaa4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/notificationhubs.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
// namespaceName - the namespace name.
// parameters - the notificationHub name.
func (client Client) CheckNotificationHubAvailability(ctx context.Context, resourceGroupName string, namespaceName string, parameters CheckAvailabilityParameters) (result CheckAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckNotificationHubAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -123,6 +134,16 @@ func (client Client) CheckNotificationHubAvailabilityResponder(resp *http.Respon
// notificationHubName - the notification hub name.
// parameters - parameters supplied to the create/update a NotificationHub Resource.
func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters CreateOrUpdateParameters) (result ResourceType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -202,6 +223,16 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Resour
// authorizationRuleName - authorization Rule Name.
// parameters - the shared access authorization rule.
func (client Client) CreateOrUpdateAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters SharedAccessAuthorizationRuleCreateOrUpdateParameters) (result SharedAccessAuthorizationRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdateAuthorizationRule")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Properties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -281,6 +312,16 @@ func (client Client) CreateOrUpdateAuthorizationRuleResponder(resp *http.Respons
// notificationHubName - the notification hub name.
// parameters - debug send parameters
func (client Client) DebugSend(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters *interface{}) (result DebugSendResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.DebugSend")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DebugSendPreparer(ctx, resourceGroupName, namespaceName, notificationHubName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "DebugSend", nil, "Failure preparing request")
@@ -355,6 +396,16 @@ func (client Client) DebugSendResponder(resp *http.Response) (result DebugSendRe
// namespaceName - the namespace name.
// notificationHubName - the notification hub name.
func (client Client) Delete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, namespaceName, notificationHubName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "Delete", nil, "Failure preparing request")
@@ -424,6 +475,16 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo
// notificationHubName - the notification hub name.
// authorizationRuleName - authorization Rule Name.
func (client Client) DeleteAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.DeleteAuthorizationRule")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, notificationHubName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "DeleteAuthorizationRule", nil, "Failure preparing request")
@@ -493,6 +554,16 @@ func (client Client) DeleteAuthorizationRuleResponder(resp *http.Response) (resu
// namespaceName - the namespace name.
// notificationHubName - the notification hub name.
func (client Client) Get(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result ResourceType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, namespaceName, notificationHubName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "Get", nil, "Failure preparing request")
@@ -563,6 +634,16 @@ func (client Client) GetResponder(resp *http.Response) (result ResourceType, err
// notificationHubName - the notification hub name.
// authorizationRuleName - authorization rule name.
func (client Client) GetAuthorizationRule(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result SharedAccessAuthorizationRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetAuthorizationRule")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetAuthorizationRulePreparer(ctx, resourceGroupName, namespaceName, notificationHubName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "GetAuthorizationRule", nil, "Failure preparing request")
@@ -633,6 +714,16 @@ func (client Client) GetAuthorizationRuleResponder(resp *http.Response) (result
// namespaceName - the namespace name.
// notificationHubName - the notification hub name.
func (client Client) GetPnsCredentials(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result PnsCredentialsResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.GetPnsCredentials")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPnsCredentialsPreparer(ctx, resourceGroupName, namespaceName, notificationHubName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "GetPnsCredentials", nil, "Failure preparing request")
@@ -701,6 +792,16 @@ func (client Client) GetPnsCredentialsResponder(resp *http.Response) (result Pns
// resourceGroupName - the name of the resource group.
// namespaceName - the namespace name.
func (client Client) List(ctx context.Context, resourceGroupName string, namespaceName string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, resourceGroupName, namespaceName)
if err != nil {
@@ -765,8 +866,8 @@ func (client Client) ListResponder(resp *http.Response) (result ListResult, err
}
// listNextResults retrieves the next set of results, if any.
-func (client Client) listNextResults(lastResults ListResult) (result ListResult, err error) {
- req, err := lastResults.listResultPreparer()
+func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.Client", "listNextResults", nil, "Failure preparing next results request")
}
@@ -787,6 +888,16 @@ func (client Client) listNextResults(lastResults ListResult) (result ListResult,
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListComplete(ctx context.Context, resourceGroupName string, namespaceName string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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, resourceGroupName, namespaceName)
return
}
@@ -797,6 +908,16 @@ func (client Client) ListComplete(ctx context.Context, resourceGroupName string,
// namespaceName - the namespace name
// notificationHubName - the notification hub name.
func (client Client) ListAuthorizationRules(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result SharedAccessAuthorizationRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListAuthorizationRules")
+ defer func() {
+ sc := -1
+ if result.saarlr.Response.Response != nil {
+ sc = result.saarlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listAuthorizationRulesNextResults
req, err := client.ListAuthorizationRulesPreparer(ctx, resourceGroupName, namespaceName, notificationHubName)
if err != nil {
@@ -862,8 +983,8 @@ func (client Client) ListAuthorizationRulesResponder(resp *http.Response) (resul
}
// listAuthorizationRulesNextResults retrieves the next set of results, if any.
-func (client Client) listAuthorizationRulesNextResults(lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) {
- req, err := lastResults.sharedAccessAuthorizationRuleListResultPreparer()
+func (client Client) listAuthorizationRulesNextResults(ctx context.Context, lastResults SharedAccessAuthorizationRuleListResult) (result SharedAccessAuthorizationRuleListResult, err error) {
+ req, err := lastResults.sharedAccessAuthorizationRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.Client", "listAuthorizationRulesNextResults", nil, "Failure preparing next results request")
}
@@ -884,6 +1005,16 @@ func (client Client) listAuthorizationRulesNextResults(lastResults SharedAccessA
// ListAuthorizationRulesComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListAuthorizationRulesComplete(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string) (result SharedAccessAuthorizationRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListAuthorizationRules")
+ 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.ListAuthorizationRules(ctx, resourceGroupName, namespaceName, notificationHubName)
return
}
@@ -895,6 +1026,16 @@ func (client Client) ListAuthorizationRulesComplete(ctx context.Context, resourc
// notificationHubName - the notification hub name.
// authorizationRuleName - the connection string of the NotificationHub for the specified authorizationRule.
func (client Client) ListKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string) (result ResourceListKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListKeysPreparer(ctx, resourceGroupName, namespaceName, notificationHubName, authorizationRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "ListKeys", nil, "Failure preparing request")
@@ -966,6 +1107,16 @@ func (client Client) ListKeysResponder(resp *http.Response) (result ResourceList
// notificationHubName - the notification hub name.
// parameters - parameters supplied to patch a NotificationHub Resource.
func (client Client) Patch(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, parameters *PatchParameters) (result ResourceType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Patch")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PatchPreparer(ctx, resourceGroupName, namespaceName, notificationHubName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "Patch", nil, "Failure preparing request")
@@ -1042,6 +1193,16 @@ func (client Client) PatchResponder(resp *http.Response) (result ResourceType, e
// authorizationRuleName - the connection string of the NotificationHub for the specified authorizationRule.
// parameters - parameters supplied to regenerate the NotificationHub Authorization Rule Key.
func (client Client) RegenerateKeys(ctx context.Context, resourceGroupName string, namespaceName string, notificationHubName string, authorizationRuleName string, parameters PolicykeyResource) (result ResourceListKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.RegenerateKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RegenerateKeysPreparer(ctx, resourceGroupName, namespaceName, notificationHubName, authorizationRuleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "notificationhubs.Client", "RegenerateKeys", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go
index 259076cc3409..af68aff10c66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available NotificationHubs REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "notificationhubs.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
index ba3edddcfb20..ed59e7bfb66f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/checknameavailability.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID st
// Parameters:
// nameAvailabilityRequest - the required parameters for checking if resource name is available.
func (client CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest) (result NameAvailability, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CheckNameAvailabilityClient.Execute")
+ 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: nameAvailabilityRequest,
Constraints: []validation.Constraint{{Target: "nameAvailabilityRequest.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
index 62adef66e5d1..e58d09bc83bd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/configurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) C
// configurationName - the name of the server configuration.
// parameters - the required parameters for updating a server configuration.
func (client ConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration) (result ConfigurationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, configurationName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client ConfigurationsClient) CreateOrUpdateResponder(resp *http.Response)
// serverName - the name of the server.
// configurationName - the name of the server configuration.
func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (result Configuration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, configurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -194,6 +211,16 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result Con
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ConfigurationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ConfigurationsClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
index d069e2d9e73c..cf3ce45e968f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/databases.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) Databa
// databaseName - the name of the database.
// parameters - the required parameters for creating or updating a database.
func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future Da
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.DatabasesClient", "Delete", nil, "Failure preparing request")
@@ -171,10 +188,6 @@ func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -198,6 +211,16 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.DatabasesClient", "Get", nil, "Failure preparing request")
@@ -267,6 +290,16 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.DatabasesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
index eacdf075f25d..a429e9f7ad49 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the server firewall rule.
// parameters - the required parameters for creating or updating a firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: true,
@@ -109,10 +120,6 @@ func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -137,6 +144,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -183,10 +200,6 @@ func (client FirewallRulesClient) DeleteSender(req *http.Request) (future Firewa
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -210,6 +223,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -279,6 +302,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.FirewallRulesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
index e67344f714bf..bf4cae244ee4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/locationbasedperformancetier.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscripti
// Parameters:
// locationName - the name of the location.
func (client LocationBasedPerformanceTierClient) List(ctx context.Context, locationName string) (result PerformanceTierListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedPerformanceTierClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, locationName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.LocationBasedPerformanceTierClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
index af9c90a14003..4ac4d2afb1d3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/logfiles.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFile
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogFileListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogFilesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.LogFilesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
index bf47a674d7ed..6e886e0dc363 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/models.go
@@ -18,14 +18,19 @@ package postgresql
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql"
+
// CreateMode enumerates the values for create mode.
type CreateMode string
@@ -288,8 +293,8 @@ type ConfigurationProperties struct {
Source *string `json:"source,omitempty"`
}
-// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ConfigurationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -443,7 +448,8 @@ func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d D
return
}
-// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DatabasesDeleteFuture struct {
azure.Future
}
@@ -562,8 +568,8 @@ type FirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type FirewallRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -591,7 +597,8 @@ func (future *FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClie
return
}
-// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type FirewallRulesDeleteFuture struct {
azure.Future
}
@@ -1248,8 +1255,8 @@ func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate()
return &spfdc, true
}
-// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different region from
-// a geo replicated backup.
+// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different
+// region from a geo replicated backup.
type ServerPropertiesForGeoRestore struct {
// SourceServerID - The source server id to restore from.
SourceServerID *string `json:"sourceServerId,omitempty"`
@@ -1376,7 +1383,8 @@ func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (Basic
return &spfr, true
}
-// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersCreateFuture struct {
azure.Future
}
@@ -1404,7 +1412,8 @@ func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersDeleteFuture struct {
azure.Future
}
@@ -1426,8 +1435,8 @@ func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Res
return
}
-// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1537,7 +1546,8 @@ func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
return nil
}
-// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersUpdateFuture struct {
azure.Future
}
@@ -1565,7 +1575,7 @@ func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServerUpdateParameters parameters allowd to update for a server.
+// ServerUpdateParameters parameters allowed to update for a server.
type ServerUpdateParameters struct {
// Sku - The SKU (pricing tier) of the server.
Sku *Sku `json:"sku,omitempty"`
@@ -1800,14 +1810,24 @@ type VirtualNetworkRuleListResultIterator struct {
page VirtualNetworkRuleListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1816,6 +1836,13 @@ func (iter *VirtualNetworkRuleListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1835,6 +1862,11 @@ func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the VirtualNetworkRuleListResultIterator type.
+func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator {
+ return VirtualNetworkRuleListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
return vnrlr.Value == nil || len(*vnrlr.Value) == 0
@@ -1842,11 +1874,11 @@ func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer() (*http.Request, error) {
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(vnrlr.NextLink)))
@@ -1854,14 +1886,24 @@ func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer()
// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
type VirtualNetworkRuleListResultPage struct {
- fn func(VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
vnrlr VirtualNetworkRuleListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *VirtualNetworkRuleListResultPage) Next() error {
- next, err := page.fn(page.vnrlr)
+func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnrlr)
if err != nil {
return err
}
@@ -1869,6 +1911,13 @@ func (page *VirtualNetworkRuleListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page VirtualNetworkRuleListResultPage) NotDone() bool {
return !page.vnrlr.IsEmpty()
@@ -1887,6 +1936,11 @@ func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
return *page.vnrlr.Value
}
+// Creates a new instance of the VirtualNetworkRuleListResultPage type.
+func NewVirtualNetworkRuleListResultPage(getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage {
+ return VirtualNetworkRuleListResultPage{fn: getNextPage}
+}
+
// VirtualNetworkRuleProperties properties of a virtual network rule.
type VirtualNetworkRuleProperties struct {
// VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
@@ -1926,8 +1980,8 @@ func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetw
return
}
-// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type VirtualNetworkRulesDeleteFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
index 76e4b8e7bdd9..1c491d113d90 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
index aaae22bbb618..35e9bb4cd26e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/servers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC
// serverName - the name of the server.
// parameters - the required parameters for creating or updating a server.
func (client ServersClient) Create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (result ServersCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
@@ -107,10 +118,6 @@ func (client ServersClient) CreateSender(req *http.Request) (future ServersCreat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -134,6 +141,16 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server,
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Delete", nil, "Failure preparing request")
@@ -179,10 +196,6 @@ func (client ServersClient) DeleteSender(req *http.Request) (future ServersDelet
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -205,6 +218,16 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Get", nil, "Failure preparing request")
@@ -269,6 +292,16 @@ func (client ServersClient) GetResponder(resp *http.Response) (result Server, er
// List list all the servers in a given subscription.
func (client ServersClient) List(ctx context.Context) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "List", nil, "Failure preparing request")
@@ -334,6 +367,16 @@ func (client ServersClient) ListResponder(resp *http.Response) (result ServerLis
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -403,6 +446,16 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r
// serverName - the name of the server.
// parameters - the required parameters for updating a server.
func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (result ServersUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServersClient", "Update", nil, "Failure preparing request")
@@ -450,10 +503,6 @@ func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go
index 002c2755d165..f12673990cef 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/serversecurityalertpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptio
// serverName - the name of the server.
// parameters - the server security alert policy.
func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -96,10 +107,6 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.R
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -123,6 +130,16 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *ht
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go
index 19aa5bde5fd7..3e93b1c34786 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/postgresql/mgmt/2017-12-01/postgresql/virtualnetworkrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID stri
// virtualNetworkRuleName - the name of the virtual network rule.
// parameters - the requested virtual Network Rule Resource state.
func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false,
@@ -105,10 +116,6 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -133,6 +140,16 @@ func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Respo
// serverName - the name of the server.
// virtualNetworkRuleName - the name of the virtual network rule.
func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
@@ -179,10 +196,6 @@ func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -206,6 +219,16 @@ func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (re
// serverName - the name of the server.
// virtualNetworkRuleName - the name of the virtual network rule.
func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request")
@@ -275,6 +298,16 @@ func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (resul
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.vnrlr.Response.Response != nil {
+ sc = result.vnrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByServerNextResults
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
@@ -339,8 +372,8 @@ func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Respons
}
// listByServerNextResults retrieves the next set of results, if any.
-func (client VirtualNetworkRulesClient) listByServerNextResults(lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
- req, err := lastResults.virtualNetworkRuleListResultPreparer()
+func (client VirtualNetworkRulesClient) listByServerNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
+ req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "postgresql.VirtualNetworkRulesClient", "listByServerNextResults", nil, "Failure preparing next results request")
}
@@ -361,6 +394,16 @@ func (client VirtualNetworkRulesClient) listByServerNextResults(lastResults Virt
// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ 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.ListByServer(ctx, resourceGroupName, serverName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go
index be6c84fb59bb..330c97d56c77 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/api.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewAPIClientWithBaseURI(baseURI string, subscriptionID string) APIClient {
// parameters - create or update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters APICreateOrUpdateParameter, ifMatch string) (result APIContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -140,6 +151,16 @@ func (client APIClient) CreateOrUpdateResponder(resp *http.Response) (result API
// request or it should be * for unconditional update.
// deleteRevisions - delete all revisions of the Api.
func (client APIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string, deleteRevisions *bool) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -225,6 +246,16 @@ func (client APIClient) DeleteResponder(resp *http.Response) (result autorest.Re
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APIClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result APIContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -307,6 +338,16 @@ func (client APIClient) GetResponder(resp *http.Response) (result APIContract, e
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APIClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -396,6 +437,16 @@ func (client APIClient) GetEntityTagResponder(resp *http.Response) (result autor
// skip - number of records to skip.
// expandAPIVersionSet - include full ApiVersionSet resource in response
func (client APIClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result APICollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByService")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -488,8 +539,8 @@ func (client APIClient) ListByServiceResponder(resp *http.Response) (result APIC
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIClient) listByServiceNextResults(lastResults APICollection) (result APICollection, err error) {
- req, err := lastResults.aPICollectionPreparer()
+func (client APIClient) listByServiceNextResults(ctx context.Context, lastResults APICollection) (result APICollection, err error) {
+ req, err := lastResults.aPICollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -510,6 +561,16 @@ func (client APIClient) listByServiceNextResults(lastResults APICollection) (res
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandAPIVersionSet *bool) (result APICollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandAPIVersionSet)
return
}
@@ -530,7 +591,18 @@ func (client APIClient) ListByServiceComplete(ctx context.Context, resourceGroup
// | isCurrent | eq | substringof, contains, startswith, endswith |
// top - number of records to return.
// skip - number of records to skip.
-func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) {
+// includeNotTaggedApis - include not tagged apis in response
+func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result TagResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByTags")
+ defer func() {
+ sc := -1
+ if result.trc.Response.Response != nil {
+ sc = result.trc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -546,7 +618,7 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string
}
result.fn = client.listByTagsNextResults
- req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip)
+ req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedApis)
if err != nil {
err = autorest.NewErrorWithError(err, "apimanagement.APIClient", "ListByTags", nil, "Failure preparing request")
return
@@ -568,7 +640,7 @@ func (client APIClient) ListByTags(ctx context.Context, resourceGroupName string
}
// ListByTagsPreparer prepares the ListByTags request.
-func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) {
+func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"serviceName": autorest.Encode("path", serviceName),
@@ -588,6 +660,11 @@ func (client APIClient) ListByTagsPreparer(ctx context.Context, resourceGroupNam
if skip != nil {
queryParameters["$skip"] = autorest.Encode("query", *skip)
}
+ if includeNotTaggedApis != nil {
+ queryParameters["includeNotTaggedApis"] = autorest.Encode("query", *includeNotTaggedApis)
+ } else {
+ queryParameters["includeNotTaggedApis"] = autorest.Encode("query", false)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -618,8 +695,8 @@ func (client APIClient) ListByTagsResponder(resp *http.Response) (result TagReso
}
// listByTagsNextResults retrieves the next set of results, if any.
-func (client APIClient) listByTagsNextResults(lastResults TagResourceCollection) (result TagResourceCollection, err error) {
- req, err := lastResults.tagResourceCollectionPreparer()
+func (client APIClient) listByTagsNextResults(ctx context.Context, lastResults TagResourceCollection) (result TagResourceCollection, err error) {
+ req, err := lastResults.tagResourceCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIClient", "listByTagsNextResults", nil, "Failure preparing next results request")
}
@@ -639,8 +716,18 @@ func (client APIClient) listByTagsNextResults(lastResults TagResourceCollection)
}
// ListByTagsComplete enumerates all values, automatically crossing page boundaries as required.
-func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionIterator, err error) {
- result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip)
+func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedApis *bool) (result TagResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.ListByTags")
+ 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.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedApis)
return
}
@@ -654,6 +741,16 @@ func (client APIClient) ListByTagsComplete(ctx context.Context, resourceGroupNam
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters APIUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go
index ccd57cfc6bbe..4fbba76c689a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apidiagnostic.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewAPIDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) AP
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIDiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters DiagnosticContract, ifMatch string) (result DiagnosticContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -182,6 +193,16 @@ func (client APIDiagnosticClient) CreateOrUpdateResponder(resp *http.Response) (
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIDiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -269,6 +290,16 @@ func (client APIDiagnosticClient) DeleteResponder(resp *http.Response) (result a
// apiid - API identifier. Must be unique in the current API Management service instance.
// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance.
func (client APIDiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result DiagnosticContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -356,6 +387,16 @@ func (client APIDiagnosticClient) GetResponder(resp *http.Response) (result Diag
// apiid - API identifier. Must be unique in the current API Management service instance.
// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance.
func (client APIDiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -446,6 +487,16 @@ func (client APIDiagnosticClient) GetEntityTagResponder(resp *http.Response) (re
// top - number of records to return.
// skip - number of records to skip.
func (client APIDiagnosticClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result DiagnosticCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.dc.Response.Response != nil {
+ sc = result.dc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -538,8 +589,8 @@ func (client APIDiagnosticClient) ListByServiceResponder(resp *http.Response) (r
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIDiagnosticClient) listByServiceNextResults(lastResults DiagnosticCollection) (result DiagnosticCollection, err error) {
- req, err := lastResults.diagnosticCollectionPreparer()
+func (client APIDiagnosticClient) listByServiceNextResults(ctx context.Context, lastResults DiagnosticCollection) (result DiagnosticCollection, err error) {
+ req, err := lastResults.diagnosticCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIDiagnosticClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -560,6 +611,16 @@ func (client APIDiagnosticClient) listByServiceNextResults(lastResults Diagnosti
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIDiagnosticClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result DiagnosticCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
@@ -574,6 +635,16 @@ func (client APIDiagnosticClient) ListByServiceComplete(ctx context.Context, res
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIDiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, diagnosticID string, parameters DiagnosticContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIDiagnosticClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go
index 526e07f9b5bc..3af7d049f302 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiexport.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewAPIExportClientWithBaseURI(baseURI string, subscriptionID string) APIExp
// formatParameter - format in which to export the Api Details to the Storage Blob with Sas Key valid for 5
// minutes.
func (client APIExportClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, formatParameter ExportFormat) (result APIExportResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIExportClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go
index cd258e26544c..5e1f499c425a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissue.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewAPIIssueClientWithBaseURI(baseURI string, subscriptionID string) APIIssu
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters IssueContract, ifMatch string) (result IssueContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -151,6 +162,16 @@ func (client APIIssueClient) CreateOrUpdateResponder(resp *http.Response) (resul
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -238,6 +259,16 @@ func (client APIIssueClient) DeleteResponder(resp *http.Response) (result autore
// apiid - API identifier. Must be unique in the current API Management service instance.
// issueID - issue identifier. Must be unique in the current API Management service instance.
func (client APIIssueClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result IssueContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -325,6 +356,16 @@ func (client APIIssueClient) GetResponder(resp *http.Response) (result IssueCont
// apiid - API identifier. Must be unique in the current API Management service instance.
// issueID - issue identifier. Must be unique in the current API Management service instance.
func (client APIIssueClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -404,7 +445,7 @@ func (client APIIssueClient) GetEntityTagResponder(resp *http.Response) (result
return
}
-// ListByService lists all issues assosiated with the specified API.
+// ListByService lists all issues associated with the specified API.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -417,6 +458,16 @@ func (client APIIssueClient) GetEntityTagResponder(resp *http.Response) (result
// top - number of records to return.
// skip - number of records to skip.
func (client APIIssueClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result IssueCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.ic.Response.Response != nil {
+ sc = result.ic.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -509,8 +560,8 @@ func (client APIIssueClient) ListByServiceResponder(resp *http.Response) (result
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIIssueClient) listByServiceNextResults(lastResults IssueCollection) (result IssueCollection, err error) {
- req, err := lastResults.issueCollectionPreparer()
+func (client APIIssueClient) listByServiceNextResults(ctx context.Context, lastResults IssueCollection) (result IssueCollection, err error) {
+ req, err := lastResults.issueCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -531,6 +582,121 @@ func (client APIIssueClient) listByServiceNextResults(lastResults IssueCollectio
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIIssueClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result IssueCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
+
+// Update updates an existing issue for an API.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// serviceName - the name of the API Management service.
+// apiid - API identifier. Must be unique in the current API Management service instance.
+// issueID - issue identifier. Must be unique in the current API Management service instance.
+// parameters - update parameters.
+// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
+// the GET request or it should be * for unconditional update.
+func (client APIIssueClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters IssueUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: serviceName,
+ Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}},
+ {TargetValue: apiid,
+ Constraints: []validation.Constraint{{Target: "apiid", Name: validation.MaxLength, Rule: 80, Chain: nil},
+ {Target: "apiid", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "apiid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}},
+ {TargetValue: issueID,
+ Constraints: []validation.Constraint{{Target: "issueID", Name: validation.MaxLength, Rule: 256, Chain: nil},
+ {Target: "issueID", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "issueID", Name: validation.Pattern, Rule: `^[^*#&+:<>?]+$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("apimanagement.APIIssueClient", "Update", err.Error())
+ }
+
+ req, err := client.UpdatePreparer(ctx, resourceGroupName, serviceName, apiid, issueID, parameters, ifMatch)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "Update", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.UpdateSender(req)
+ if err != nil {
+ result.Response = resp
+ err = autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "Update", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.UpdateResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.APIIssueClient", "Update", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// UpdatePreparer prepares the Update request.
+func (client APIIssueClient) UpdatePreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, parameters IssueUpdateContract, ifMatch string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "apiId": autorest.Encode("path", apiid),
+ "issueId": autorest.Encode("path", issueID),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPatch(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ if len(ifMatch) > 0 {
+ preparer = autorest.DecoratePreparer(preparer,
+ autorest.WithHeader("If-Match", autorest.String(ifMatch)))
+ }
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// UpdateSender sends the Update request. The method will close the
+// http.Response Body if it receives an error.
+func (client APIIssueClient) UpdateSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// UpdateResponder handles the response to the Update request. The method always
+// closes the http.Response Body.
+func (client APIIssueClient) UpdateResponder(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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go
index cbb5f1fa7256..84a019968f90 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissueattachment.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewAPIIssueAttachmentClientWithBaseURI(baseURI string, subscriptionID strin
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueAttachmentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string, parameters IssueAttachmentContract, ifMatch string) (result IssueAttachmentContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -158,6 +169,16 @@ func (client APIIssueAttachmentClient) CreateOrUpdateResponder(resp *http.Respon
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueAttachmentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -251,6 +272,16 @@ func (client APIIssueAttachmentClient) DeleteResponder(resp *http.Response) (res
// issueID - issue identifier. Must be unique in the current API Management service instance.
// attachmentID - attachment identifier within an Issue. Must be unique in the current Issue.
func (client APIIssueAttachmentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result IssueAttachmentContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -344,6 +375,16 @@ func (client APIIssueAttachmentClient) GetResponder(resp *http.Response) (result
// issueID - issue identifier. Must be unique in the current API Management service instance.
// attachmentID - attachment identifier within an Issue. Must be unique in the current Issue.
func (client APIIssueAttachmentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, attachmentID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -428,7 +469,7 @@ func (client APIIssueAttachmentClient) GetEntityTagResponder(resp *http.Response
return
}
-// ListByService lists all comments for the Issue assosiated with the specified API.
+// ListByService lists all comments for the Issue associated with the specified API.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -441,6 +482,16 @@ func (client APIIssueAttachmentClient) GetEntityTagResponder(resp *http.Response
// top - number of records to return.
// skip - number of records to skip.
func (client APIIssueAttachmentClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueAttachmentCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.iac.Response.Response != nil {
+ sc = result.iac.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -538,8 +589,8 @@ func (client APIIssueAttachmentClient) ListByServiceResponder(resp *http.Respons
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIIssueAttachmentClient) listByServiceNextResults(lastResults IssueAttachmentCollection) (result IssueAttachmentCollection, err error) {
- req, err := lastResults.issueAttachmentCollectionPreparer()
+func (client APIIssueAttachmentClient) listByServiceNextResults(ctx context.Context, lastResults IssueAttachmentCollection) (result IssueAttachmentCollection, err error) {
+ req, err := lastResults.issueAttachmentCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIIssueAttachmentClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -560,6 +611,16 @@ func (client APIIssueAttachmentClient) listByServiceNextResults(lastResults Issu
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIIssueAttachmentClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueAttachmentCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueAttachmentClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, apiid, issueID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go
index 17798beb124f..e556b5bd91ba 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiissuecomment.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewAPIIssueCommentClientWithBaseURI(baseURI string, subscriptionID string)
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueCommentClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string, parameters IssueCommentContract, ifMatch string) (result IssueCommentContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -157,6 +168,16 @@ func (client APIIssueCommentClient) CreateOrUpdateResponder(resp *http.Response)
// ifMatch - eTag of the Issue Entity. ETag should match the current entity state from the header response of
// the GET request or it should be * for unconditional update.
func (client APIIssueCommentClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -250,6 +271,16 @@ func (client APIIssueCommentClient) DeleteResponder(resp *http.Response) (result
// issueID - issue identifier. Must be unique in the current API Management service instance.
// commentID - comment identifier within an Issue. Must be unique in the current Issue.
func (client APIIssueCommentClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result IssueCommentContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -343,6 +374,16 @@ func (client APIIssueCommentClient) GetResponder(resp *http.Response) (result Is
// issueID - issue identifier. Must be unique in the current API Management service instance.
// commentID - comment identifier within an Issue. Must be unique in the current Issue.
func (client APIIssueCommentClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, commentID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -427,7 +468,7 @@ func (client APIIssueCommentClient) GetEntityTagResponder(resp *http.Response) (
return
}
-// ListByService lists all comments for the Issue assosiated with the specified API.
+// ListByService lists all comments for the Issue associated with the specified API.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -440,6 +481,16 @@ func (client APIIssueCommentClient) GetEntityTagResponder(resp *http.Response) (
// top - number of records to return.
// skip - number of records to skip.
func (client APIIssueCommentClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueCommentCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.icc.Response.Response != nil {
+ sc = result.icc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -537,8 +588,8 @@ func (client APIIssueCommentClient) ListByServiceResponder(resp *http.Response)
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIIssueCommentClient) listByServiceNextResults(lastResults IssueCommentCollection) (result IssueCommentCollection, err error) {
- req, err := lastResults.issueCommentCollectionPreparer()
+func (client APIIssueCommentClient) listByServiceNextResults(ctx context.Context, lastResults IssueCommentCollection) (result IssueCommentCollection, err error) {
+ req, err := lastResults.issueCommentCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIIssueCommentClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -559,6 +610,16 @@ func (client APIIssueCommentClient) listByServiceNextResults(lastResults IssueCo
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIIssueCommentClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, issueID string, filter string, top *int32, skip *int32) (result IssueCommentCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIIssueCommentClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, apiid, issueID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go
index ff402bd3b2c1..3cebfc5580a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperation.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewAPIOperationClientWithBaseURI(baseURI string, subscriptionID string) API
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIOperationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters OperationContract, ifMatch string) (result OperationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -160,6 +171,16 @@ func (client APIOperationClient) CreateOrUpdateResponder(resp *http.Response) (r
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIOperationClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -249,6 +270,16 @@ func (client APIOperationClient) DeleteResponder(resp *http.Response) (result au
// operationID - operation identifier within an API. Must be unique in the current API Management service
// instance.
func (client APIOperationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result OperationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -338,6 +369,16 @@ func (client APIOperationClient) GetResponder(resp *http.Response) (result Opera
// operationID - operation identifier within an API. Must be unique in the current API Management service
// instance.
func (client APIOperationClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -432,6 +473,16 @@ func (client APIOperationClient) GetEntityTagResponder(resp *http.Response) (res
// top - number of records to return.
// skip - number of records to skip.
func (client APIOperationClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result OperationCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.ListByAPI")
+ defer func() {
+ sc := -1
+ if result.oc.Response.Response != nil {
+ sc = result.oc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -524,8 +575,8 @@ func (client APIOperationClient) ListByAPIResponder(resp *http.Response) (result
}
// listByAPINextResults retrieves the next set of results, if any.
-func (client APIOperationClient) listByAPINextResults(lastResults OperationCollection) (result OperationCollection, err error) {
- req, err := lastResults.operationCollectionPreparer()
+func (client APIOperationClient) listByAPINextResults(ctx context.Context, lastResults OperationCollection) (result OperationCollection, err error) {
+ req, err := lastResults.operationCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIOperationClient", "listByAPINextResults", nil, "Failure preparing next results request")
}
@@ -546,6 +597,16 @@ func (client APIOperationClient) listByAPINextResults(lastResults OperationColle
// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIOperationClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result OperationCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.ListByAPI")
+ 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.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
@@ -562,6 +623,16 @@ func (client APIOperationClient) ListByAPIComplete(ctx context.Context, resource
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIOperationClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters OperationUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go
index cb88f8c286c1..39d06d24776e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apioperationpolicy.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewAPIOperationPolicyClientWithBaseURI(baseURI string, subscriptionID strin
// parameters - the policy contents to apply.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIOperationPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, parameters PolicyContract, ifMatch string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -152,6 +163,16 @@ func (client APIOperationPolicyClient) CreateOrUpdateResponder(resp *http.Respon
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIOperationPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -242,6 +263,16 @@ func (client APIOperationPolicyClient) DeleteResponder(resp *http.Response) (res
// operationID - operation identifier within an API. Must be unique in the current API Management service
// instance.
func (client APIOperationPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -332,6 +363,16 @@ func (client APIOperationPolicyClient) GetResponder(resp *http.Response) (result
// operationID - operation identifier within an API. Must be unique in the current API Management service
// instance.
func (client APIOperationPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -421,6 +462,16 @@ func (client APIOperationPolicyClient) GetEntityTagResponder(resp *http.Response
// operationID - operation identifier within an API. Must be unique in the current API Management service
// instance.
func (client APIOperationPolicyClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string) (result PolicyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIOperationPolicyClient.ListByOperation")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go
index 67959ec761a4..17324ae755b5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apipolicy.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewAPIPolicyClientWithBaseURI(baseURI string, subscriptionID string) APIPol
// parameters - the policy contents to apply.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, parameters PolicyContract, ifMatch string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -143,6 +154,16 @@ func (client APIPolicyClient) CreateOrUpdateResponder(resp *http.Response) (resu
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -226,6 +247,16 @@ func (client APIPolicyClient) DeleteResponder(resp *http.Response) (result autor
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APIPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -309,6 +340,16 @@ func (client APIPolicyClient) GetResponder(resp *http.Response) (result PolicyCo
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APIPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -391,6 +432,16 @@ func (client APIPolicyClient) GetEntityTagResponder(resp *http.Response) (result
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APIPolicyClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result PolicyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIPolicyClient.ListByAPI")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go
index 98defef02e33..ee87a4bd53fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiproduct.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewAPIProductClientWithBaseURI(baseURI string, subscriptionID string) APIPr
// top - number of records to return.
// skip - number of records to skip.
func (client APIProductClient) ListByApis(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result ProductCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIProductClient.ListByApis")
+ defer func() {
+ sc := -1
+ if result.pc.Response.Response != nil {
+ sc = result.pc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -143,8 +154,8 @@ func (client APIProductClient) ListByApisResponder(resp *http.Response) (result
}
// listByApisNextResults retrieves the next set of results, if any.
-func (client APIProductClient) listByApisNextResults(lastResults ProductCollection) (result ProductCollection, err error) {
- req, err := lastResults.productCollectionPreparer()
+func (client APIProductClient) listByApisNextResults(ctx context.Context, lastResults ProductCollection) (result ProductCollection, err error) {
+ req, err := lastResults.productCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIProductClient", "listByApisNextResults", nil, "Failure preparing next results request")
}
@@ -165,6 +176,16 @@ func (client APIProductClient) listByApisNextResults(lastResults ProductCollecti
// ListByApisComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIProductClient) ListByApisComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result ProductCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIProductClient.ListByApis")
+ 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.ListByApis(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go
index f2a2d943948b..413e738e7f0e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirelease.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewAPIReleaseClientWithBaseURI(baseURI string, subscriptionID string) APIRe
// releaseID - release identifier within an API. Must be unique in the current API Management service instance.
// parameters - create parameters.
func (client APIReleaseClient) Create(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract) (result APIReleaseContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.Create")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -139,6 +150,16 @@ func (client APIReleaseClient) CreateResponder(resp *http.Response) (result APIR
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIReleaseClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -226,6 +247,16 @@ func (client APIReleaseClient) DeleteResponder(resp *http.Response) (result auto
// apiid - API identifier. Must be unique in the current API Management service instance.
// releaseID - release identifier within an API. Must be unique in the current API Management service instance.
func (client APIReleaseClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result APIReleaseContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -313,6 +344,16 @@ func (client APIReleaseClient) GetResponder(resp *http.Response) (result APIRele
// apiid - API identifier. Must be unique in the current API Management service instance.
// releaseID - release identifier within an API. Must be unique in the current API Management service instance.
func (client APIReleaseClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -406,6 +447,16 @@ func (client APIReleaseClient) GetEntityTagResponder(resp *http.Response) (resul
// top - number of records to return.
// skip - number of records to skip.
func (client APIReleaseClient) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.List")
+ defer func() {
+ sc := -1
+ if result.arc.Response.Response != nil {
+ sc = result.arc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -498,8 +549,8 @@ func (client APIReleaseClient) ListResponder(resp *http.Response) (result APIRel
}
// listNextResults retrieves the next set of results, if any.
-func (client APIReleaseClient) listNextResults(lastResults APIReleaseCollection) (result APIReleaseCollection, err error) {
- req, err := lastResults.aPIReleaseCollectionPreparer()
+func (client APIReleaseClient) listNextResults(ctx context.Context, lastResults APIReleaseCollection) (result APIReleaseCollection, err error) {
+ req, err := lastResults.aPIReleaseCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIReleaseClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -520,6 +571,16 @@ func (client APIReleaseClient) listNextResults(lastResults APIReleaseCollection)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIReleaseClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIReleaseCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.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, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
@@ -534,6 +595,16 @@ func (client APIReleaseClient) ListComplete(ctx context.Context, resourceGroupNa
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIReleaseClient) Update(ctx context.Context, resourceGroupName string, serviceName string, apiid string, releaseID string, parameters APIReleaseContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go
index 7f4468392671..9b7084e433a6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apirevisions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -52,6 +53,16 @@ func NewAPIRevisionsClientWithBaseURI(baseURI string, subscriptionID string) API
// top - number of records to return.
// skip - number of records to skip.
func (client APIRevisionsClient) List(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionsClient.List")
+ defer func() {
+ sc := -1
+ if result.arc.Response.Response != nil {
+ sc = result.arc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,8 +155,8 @@ func (client APIRevisionsClient) ListResponder(resp *http.Response) (result APIR
}
// listNextResults retrieves the next set of results, if any.
-func (client APIRevisionsClient) listNextResults(lastResults APIRevisionCollection) (result APIRevisionCollection, err error) {
- req, err := lastResults.aPIRevisionCollectionPreparer()
+func (client APIRevisionsClient) listNextResults(ctx context.Context, lastResults APIRevisionCollection) (result APIRevisionCollection, err error) {
+ req, err := lastResults.aPIRevisionCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIRevisionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -166,6 +177,16 @@ func (client APIRevisionsClient) listNextResults(lastResults APIRevisionCollecti
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIRevisionsClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result APIRevisionCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionsClient.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, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go
index 1d099efc0144..eb44c2669d27 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apischema.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewAPISchemaClientWithBaseURI(baseURI string, subscriptionID string) APISch
// parameters - the schema contents to apply.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APISchemaClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, parameters SchemaContract, ifMatch string) (result SchemaContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -149,6 +160,16 @@ func (client APISchemaClient) CreateOrUpdateResponder(resp *http.Response) (resu
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APISchemaClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -237,6 +258,16 @@ func (client APISchemaClient) DeleteResponder(resp *http.Response) (result autor
// revision has ;rev=n as a suffix where n is the revision number.
// schemaID - schema identifier within an API. Must be unique in the current API Management service instance.
func (client APISchemaClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result SchemaContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -325,6 +356,16 @@ func (client APISchemaClient) GetResponder(resp *http.Response) (result SchemaCo
// revision has ;rev=n as a suffix where n is the revision number.
// schemaID - schema identifier within an API. Must be unique in the current API Management service instance.
func (client APISchemaClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, apiid string, schemaID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -411,6 +452,16 @@ func (client APISchemaClient) GetEntityTagResponder(resp *http.Response) (result
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client APISchemaClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result SchemaCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.ListByAPI")
+ defer func() {
+ sc := -1
+ if result.sc.Response.Response != nil {
+ sc = result.sc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -488,8 +539,8 @@ func (client APISchemaClient) ListByAPIResponder(resp *http.Response) (result Sc
}
// listByAPINextResults retrieves the next set of results, if any.
-func (client APISchemaClient) listByAPINextResults(lastResults SchemaCollection) (result SchemaCollection, err error) {
- req, err := lastResults.schemaCollectionPreparer()
+func (client APISchemaClient) listByAPINextResults(ctx context.Context, lastResults SchemaCollection) (result SchemaCollection, err error) {
+ req, err := lastResults.schemaCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APISchemaClient", "listByAPINextResults", nil, "Failure preparing next results request")
}
@@ -510,6 +561,16 @@ func (client APISchemaClient) listByAPINextResults(lastResults SchemaCollection)
// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required.
func (client APISchemaClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string) (result SchemaCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APISchemaClient.ListByAPI")
+ 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.ListByAPI(ctx, resourceGroupName, serviceName, apiid)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go
index b82f1c2bc616..354c582d38be 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/apiversionset.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewAPIVersionSetClientWithBaseURI(baseURI string, subscriptionID string) AP
// parameters - create or update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client APIVersionSetClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters APIVersionSetContract, ifMatch string) (result APIVersionSetContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,6 +155,16 @@ func (client APIVersionSetClient) CreateOrUpdateResponder(resp *http.Response) (
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIVersionSetClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -225,6 +246,16 @@ func (client APIVersionSetClient) DeleteResponder(resp *http.Response) (result a
// serviceName - the name of the API Management service.
// versionSetID - api Version Set identifier. Must be unique in the current API Management service instance.
func (client APIVersionSetClient) Get(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result APIVersionSetContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -306,6 +337,16 @@ func (client APIVersionSetClient) GetResponder(resp *http.Response) (result APIV
// serviceName - the name of the API Management service.
// versionSetID - api Version Set identifier. Must be unique in the current API Management service instance.
func (client APIVersionSetClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -396,6 +437,16 @@ func (client APIVersionSetClient) GetEntityTagResponder(resp *http.Response) (re
// top - number of records to return.
// skip - number of records to skip.
func (client APIVersionSetClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result APIVersionSetCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.avsc.Response.Response != nil {
+ sc = result.avsc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -483,8 +534,8 @@ func (client APIVersionSetClient) ListByServiceResponder(resp *http.Response) (r
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client APIVersionSetClient) listByServiceNextResults(lastResults APIVersionSetCollection) (result APIVersionSetCollection, err error) {
- req, err := lastResults.aPIVersionSetCollectionPreparer()
+func (client APIVersionSetClient) listByServiceNextResults(ctx context.Context, lastResults APIVersionSetCollection) (result APIVersionSetCollection, err error) {
+ req, err := lastResults.aPIVersionSetCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.APIVersionSetClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -505,6 +556,16 @@ func (client APIVersionSetClient) listByServiceNextResults(lastResults APIVersio
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client APIVersionSetClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result APIVersionSetCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -518,6 +579,16 @@ func (client APIVersionSetClient) ListByServiceComplete(ctx context.Context, res
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client APIVersionSetClient) Update(ctx context.Context, resourceGroupName string, serviceName string, versionSetID string, parameters APIVersionSetUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go
index 81ada6c53c2c..47d2c107adee 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/authorizationserver.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewAuthorizationServerClientWithBaseURI(baseURI string, subscriptionID stri
// parameters - create or update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client AuthorizationServerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters AuthorizationServerContract, ifMatch string) (result AuthorizationServerContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -148,6 +159,16 @@ func (client AuthorizationServerClient) CreateOrUpdateResponder(resp *http.Respo
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client AuthorizationServerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, authsid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -229,6 +250,16 @@ func (client AuthorizationServerClient) DeleteResponder(resp *http.Response) (re
// serviceName - the name of the API Management service.
// authsid - identifier of the authorization server.
func (client AuthorizationServerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result AuthorizationServerContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -310,6 +341,16 @@ func (client AuthorizationServerClient) GetResponder(resp *http.Response) (resul
// serviceName - the name of the API Management service.
// authsid - identifier of the authorization server.
func (client AuthorizationServerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, authsid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -395,6 +436,16 @@ func (client AuthorizationServerClient) GetEntityTagResponder(resp *http.Respons
// top - number of records to return.
// skip - number of records to skip.
func (client AuthorizationServerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result AuthorizationServerCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.asc.Response.Response != nil {
+ sc = result.asc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -482,8 +533,8 @@ func (client AuthorizationServerClient) ListByServiceResponder(resp *http.Respon
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client AuthorizationServerClient) listByServiceNextResults(lastResults AuthorizationServerCollection) (result AuthorizationServerCollection, err error) {
- req, err := lastResults.authorizationServerCollectionPreparer()
+func (client AuthorizationServerClient) listByServiceNextResults(ctx context.Context, lastResults AuthorizationServerCollection) (result AuthorizationServerCollection, err error) {
+ req, err := lastResults.authorizationServerCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.AuthorizationServerClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -504,6 +555,16 @@ func (client AuthorizationServerClient) listByServiceNextResults(lastResults Aut
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client AuthorizationServerClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result AuthorizationServerCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -517,6 +578,16 @@ func (client AuthorizationServerClient) ListByServiceComplete(ctx context.Contex
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client AuthorizationServerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, authsid string, parameters AuthorizationServerUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go
index 322362e05d0b..ed3c96722918 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/backend.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewBackendClientWithBaseURI(baseURI string, subscriptionID string) BackendC
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client BackendClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendContract, ifMatch string) (result BackendContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,6 +155,16 @@ func (client BackendClient) CreateOrUpdateResponder(resp *http.Response) (result
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client BackendClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, backendid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -225,6 +246,16 @@ func (client BackendClient) DeleteResponder(resp *http.Response) (result autores
// serviceName - the name of the API Management service.
// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance.
func (client BackendClient) Get(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result BackendContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -306,6 +337,16 @@ func (client BackendClient) GetResponder(resp *http.Response) (result BackendCon
// serviceName - the name of the API Management service.
// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance.
func (client BackendClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, backendid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -391,6 +432,16 @@ func (client BackendClient) GetEntityTagResponder(resp *http.Response) (result a
// top - number of records to return.
// skip - number of records to skip.
func (client BackendClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result BackendCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.bc.Response.Response != nil {
+ sc = result.bc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -478,8 +529,8 @@ func (client BackendClient) ListByServiceResponder(resp *http.Response) (result
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client BackendClient) listByServiceNextResults(lastResults BackendCollection) (result BackendCollection, err error) {
- req, err := lastResults.backendCollectionPreparer()
+func (client BackendClient) listByServiceNextResults(ctx context.Context, lastResults BackendCollection) (result BackendCollection, err error) {
+ req, err := lastResults.backendCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.BackendClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -500,6 +551,16 @@ func (client BackendClient) listByServiceNextResults(lastResults BackendCollecti
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client BackendClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result BackendCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -512,6 +573,16 @@ func (client BackendClient) ListByServiceComplete(ctx context.Context, resourceG
// backendid - identifier of the Backend entity. Must be unique in the current API Management service instance.
// parameters - reconnect request parameters.
func (client BackendClient) Reconnect(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters *BackendReconnectContract) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Reconnect")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -600,6 +671,16 @@ func (client BackendClient) ReconnectResponder(resp *http.Response) (result auto
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client BackendClient) Update(ctx context.Context, resourceGroupName string, serviceName string, backendid string, parameters BackendUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go
index 239fbe59c6d1..f531c4589dda 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/certificate.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewCertificateClientWithBaseURI(baseURI string, subscriptionID string) Cert
// parameters - create or Update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client CertificateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, parameters CertificateCreateOrUpdateParameters, ifMatch string) (result CertificateContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,6 +155,16 @@ func (client CertificateClient) CreateOrUpdateResponder(resp *http.Response) (re
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client CertificateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, certificateID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -226,6 +247,16 @@ func (client CertificateClient) DeleteResponder(resp *http.Response) (result aut
// certificateID - identifier of the certificate entity. Must be unique in the current API Management service
// instance.
func (client CertificateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result CertificateContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -308,6 +339,16 @@ func (client CertificateClient) GetResponder(resp *http.Response) (result Certif
// certificateID - identifier of the certificate entity. Must be unique in the current API Management service
// instance.
func (client CertificateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, certificateID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -395,6 +436,16 @@ func (client CertificateClient) GetEntityTagResponder(resp *http.Response) (resu
// top - number of records to return.
// skip - number of records to skip.
func (client CertificateClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result CertificateCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.cc.Response.Response != nil {
+ sc = result.cc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -482,8 +533,8 @@ func (client CertificateClient) ListByServiceResponder(resp *http.Response) (res
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client CertificateClient) listByServiceNextResults(lastResults CertificateCollection) (result CertificateCollection, err error) {
- req, err := lastResults.certificateCollectionPreparer()
+func (client CertificateClient) listByServiceNextResults(ctx context.Context, lastResults CertificateCollection) (result CertificateCollection, err error) {
+ req, err := lastResults.certificateCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.CertificateClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -504,6 +555,16 @@ func (client CertificateClient) listByServiceNextResults(lastResults Certificate
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client CertificateClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result CertificateCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go
index e4dd04a2522b..586e3ce5c1c8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/delegationsettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewDelegationSettingsClientWithBaseURI(baseURI string, subscriptionID strin
// serviceName - the name of the API Management service.
// parameters - create or update parameters.
func (client DelegationSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings) (result PortalDelegationSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DelegationSettingsClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -123,6 +134,16 @@ func (client DelegationSettingsClient) CreateOrUpdateResponder(resp *http.Respon
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client DelegationSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PortalDelegationSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DelegationSettingsClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -198,6 +219,16 @@ func (client DelegationSettingsClient) GetResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client DelegationSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DelegationSettingsClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -275,6 +306,16 @@ func (client DelegationSettingsClient) GetEntityTagResponder(resp *http.Response
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client DelegationSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalDelegationSettings, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DelegationSettingsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go
index 97cba40b16cc..8a65d8bd17e0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/diagnostic.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewDiagnosticClientWithBaseURI(baseURI string, subscriptionID string) Diagn
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client DiagnosticClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters DiagnosticContract, ifMatch string) (result DiagnosticContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -175,6 +186,16 @@ func (client DiagnosticClient) CreateOrUpdateResponder(resp *http.Response) (res
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client DiagnosticClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -256,6 +277,16 @@ func (client DiagnosticClient) DeleteResponder(resp *http.Response) (result auto
// serviceName - the name of the API Management service.
// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance.
func (client DiagnosticClient) Get(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result DiagnosticContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -337,6 +368,16 @@ func (client DiagnosticClient) GetResponder(resp *http.Response) (result Diagnos
// serviceName - the name of the API Management service.
// diagnosticID - diagnostic identifier. Must be unique in the current API Management service instance.
func (client DiagnosticClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -421,6 +462,16 @@ func (client DiagnosticClient) GetEntityTagResponder(resp *http.Response) (resul
// top - number of records to return.
// skip - number of records to skip.
func (client DiagnosticClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result DiagnosticCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.dc.Response.Response != nil {
+ sc = result.dc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -508,8 +559,8 @@ func (client DiagnosticClient) ListByServiceResponder(resp *http.Response) (resu
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client DiagnosticClient) listByServiceNextResults(lastResults DiagnosticCollection) (result DiagnosticCollection, err error) {
- req, err := lastResults.diagnosticCollectionPreparer()
+func (client DiagnosticClient) listByServiceNextResults(ctx context.Context, lastResults DiagnosticCollection) (result DiagnosticCollection, err error) {
+ req, err := lastResults.diagnosticCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.DiagnosticClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -530,6 +581,16 @@ func (client DiagnosticClient) listByServiceNextResults(lastResults DiagnosticCo
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client DiagnosticClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result DiagnosticCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -543,6 +604,16 @@ func (client DiagnosticClient) ListByServiceComplete(ctx context.Context, resour
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client DiagnosticClient) Update(ctx context.Context, resourceGroupName string, serviceName string, diagnosticID string, parameters DiagnosticContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go
index d5d063297660..866f3c3e8571 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/emailtemplate.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewEmailTemplateClientWithBaseURI(baseURI string, subscriptionID string) Em
// parameters - email Template update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client EmailTemplateClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters, ifMatch string) (result EmailTemplateContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -142,6 +153,16 @@ func (client EmailTemplateClient) CreateOrUpdateResponder(resp *http.Response) (
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client EmailTemplateClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -219,6 +240,16 @@ func (client EmailTemplateClient) DeleteResponder(resp *http.Response) (result a
// serviceName - the name of the API Management service.
// templateName - email Template Name Identifier.
func (client EmailTemplateClient) Get(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName) (result EmailTemplateContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -296,6 +327,16 @@ func (client EmailTemplateClient) GetResponder(resp *http.Response) (result Emai
// serviceName - the name of the API Management service.
// templateName - email Template Name Identifier.
func (client EmailTemplateClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -373,6 +414,16 @@ func (client EmailTemplateClient) GetEntityTagResponder(resp *http.Response) (re
// top - number of records to return.
// skip - number of records to skip.
func (client EmailTemplateClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result EmailTemplateCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.etc.Response.Response != nil {
+ sc = result.etc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -457,8 +508,8 @@ func (client EmailTemplateClient) ListByServiceResponder(resp *http.Response) (r
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client EmailTemplateClient) listByServiceNextResults(lastResults EmailTemplateCollection) (result EmailTemplateCollection, err error) {
- req, err := lastResults.emailTemplateCollectionPreparer()
+func (client EmailTemplateClient) listByServiceNextResults(ctx context.Context, lastResults EmailTemplateCollection) (result EmailTemplateCollection, err error) {
+ req, err := lastResults.emailTemplateCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.EmailTemplateClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -479,6 +530,16 @@ func (client EmailTemplateClient) listByServiceNextResults(lastResults EmailTemp
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result EmailTemplateCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, top, skip)
return
}
@@ -490,6 +551,16 @@ func (client EmailTemplateClient) ListByServiceComplete(ctx context.Context, res
// templateName - email Template Name Identifier.
// parameters - update parameters.
func (client EmailTemplateClient) Update(ctx context.Context, resourceGroupName string, serviceName string, templateName TemplateName, parameters EmailTemplateUpdateParameters) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go
index 563c7e3ca489..c4d7aa5e48fd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/group.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewGroupClientWithBaseURI(baseURI string, subscriptionID string) GroupClien
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters GroupCreateParameters, ifMatch string) (result GroupContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,6 +155,16 @@ func (client GroupClient) CreateOrUpdateResponder(resp *http.Response) (result G
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client GroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -225,6 +246,16 @@ func (client GroupClient) DeleteResponder(resp *http.Response) (result autorest.
// serviceName - the name of the API Management service.
// groupID - group identifier. Must be unique in the current API Management service instance.
func (client GroupClient) Get(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result GroupContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -306,6 +337,16 @@ func (client GroupClient) GetResponder(resp *http.Response) (result GroupContrac
// serviceName - the name of the API Management service.
// groupID - group identifier. Must be unique in the current API Management service instance.
func (client GroupClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, groupID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -393,6 +434,16 @@ func (client GroupClient) GetEntityTagResponder(resp *http.Response) (result aut
// top - number of records to return.
// skip - number of records to skip.
func (client GroupClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.gc.Response.Response != nil {
+ sc = result.gc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -480,8 +531,8 @@ func (client GroupClient) ListByServiceResponder(resp *http.Response) (result Gr
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client GroupClient) listByServiceNextResults(lastResults GroupCollection) (result GroupCollection, err error) {
- req, err := lastResults.groupCollectionPreparer()
+func (client GroupClient) listByServiceNextResults(ctx context.Context, lastResults GroupCollection) (result GroupCollection, err error) {
+ req, err := lastResults.groupCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.GroupClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -502,6 +553,16 @@ func (client GroupClient) listByServiceNextResults(lastResults GroupCollection)
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client GroupClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result GroupCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -515,6 +576,16 @@ func (client GroupClient) ListByServiceComplete(ctx context.Context, resourceGro
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client GroupClient) Update(ctx context.Context, resourceGroupName string, serviceName string, groupID string, parameters GroupUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go
index 4c246c4e48cf..4bd921c7a549 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/groupuser.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewGroupUserClientWithBaseURI(baseURI string, subscriptionID string) GroupU
// groupID - group identifier. Must be unique in the current API Management service instance.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client GroupUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.CheckEntityExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -133,6 +144,16 @@ func (client GroupUserClient) CheckEntityExistsResponder(resp *http.Response) (r
// groupID - group identifier. Must be unique in the current API Management service instance.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client GroupUserClient) Create(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result UserContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.Create")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -220,6 +241,16 @@ func (client GroupUserClient) CreateResponder(resp *http.Response) (result UserC
// groupID - group identifier. Must be unique in the current API Management service instance.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client GroupUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, UID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -316,6 +347,16 @@ func (client GroupUserClient) DeleteResponder(resp *http.Response) (result autor
// top - number of records to return.
// skip - number of records to skip.
func (client GroupUserClient) List(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result UserCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.List")
+ defer func() {
+ sc := -1
+ if result.uc.Response.Response != nil {
+ sc = result.uc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -408,8 +449,8 @@ func (client GroupUserClient) ListResponder(resp *http.Response) (result UserCol
}
// listNextResults retrieves the next set of results, if any.
-func (client GroupUserClient) listNextResults(lastResults UserCollection) (result UserCollection, err error) {
- req, err := lastResults.userCollectionPreparer()
+func (client GroupUserClient) listNextResults(ctx context.Context, lastResults UserCollection) (result UserCollection, err error) {
+ req, err := lastResults.userCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.GroupUserClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -430,6 +471,16 @@ func (client GroupUserClient) listNextResults(lastResults UserCollection) (resul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client GroupUserClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, groupID string, filter string, top *int32, skip *int32) (result UserCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupUserClient.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, resourceGroupName, serviceName, groupID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go
index ee8945c379b0..8a5a174fef3f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/identityprovider.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewIdentityProviderClientWithBaseURI(baseURI string, subscriptionID string)
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client IdentityProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, parameters IdentityProviderContract, ifMatch string) (result IdentityProviderContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -140,6 +151,16 @@ func (client IdentityProviderClient) CreateOrUpdateResponder(resp *http.Response
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client IdentityProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -217,6 +238,16 @@ func (client IdentityProviderClient) DeleteResponder(resp *http.Response) (resul
// serviceName - the name of the API Management service.
// identityProviderName - identity Provider Type identifier.
func (client IdentityProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType) (result IdentityProviderContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -294,6 +325,16 @@ func (client IdentityProviderClient) GetResponder(resp *http.Response) (result I
// serviceName - the name of the API Management service.
// identityProviderName - identity Provider Type identifier.
func (client IdentityProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -369,6 +410,16 @@ func (client IdentityProviderClient) GetEntityTagResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client IdentityProviderClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result IdentityProviderListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.ipl.Response.Response != nil {
+ sc = result.ipl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -441,8 +492,8 @@ func (client IdentityProviderClient) ListByServiceResponder(resp *http.Response)
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client IdentityProviderClient) listByServiceNextResults(lastResults IdentityProviderList) (result IdentityProviderList, err error) {
- req, err := lastResults.identityProviderListPreparer()
+func (client IdentityProviderClient) listByServiceNextResults(ctx context.Context, lastResults IdentityProviderList) (result IdentityProviderList, err error) {
+ req, err := lastResults.identityProviderListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.IdentityProviderClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -463,6 +514,16 @@ func (client IdentityProviderClient) listByServiceNextResults(lastResults Identi
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client IdentityProviderClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result IdentityProviderListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName)
return
}
@@ -476,6 +537,16 @@ func (client IdentityProviderClient) ListByServiceComplete(ctx context.Context,
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client IdentityProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, identityProviderName IdentityProviderType, parameters IdentityProviderUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go
index 3a33baf86009..171c5f82f7c7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/logger.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewLoggerClientWithBaseURI(baseURI string, subscriptionID string) LoggerCli
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client LoggerClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerContract, ifMatch string) (result LoggerContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -142,6 +153,16 @@ func (client LoggerClient) CreateOrUpdateResponder(resp *http.Response) (result
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client LoggerClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -222,6 +243,16 @@ func (client LoggerClient) DeleteResponder(resp *http.Response) (result autorest
// serviceName - the name of the API Management service.
// loggerid - logger identifier. Must be unique in the API Management service instance.
func (client LoggerClient) Get(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result LoggerContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -302,6 +333,16 @@ func (client LoggerClient) GetResponder(resp *http.Response) (result LoggerContr
// serviceName - the name of the API Management service.
// loggerid - logger identifier. Must be unique in the API Management service instance.
func (client LoggerClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, loggerid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -386,6 +427,16 @@ func (client LoggerClient) GetEntityTagResponder(resp *http.Response) (result au
// top - number of records to return.
// skip - number of records to skip.
func (client LoggerClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result LoggerCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.lc.Response.Response != nil {
+ sc = result.lc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -473,8 +524,8 @@ func (client LoggerClient) ListByServiceResponder(resp *http.Response) (result L
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client LoggerClient) listByServiceNextResults(lastResults LoggerCollection) (result LoggerCollection, err error) {
- req, err := lastResults.loggerCollectionPreparer()
+func (client LoggerClient) listByServiceNextResults(ctx context.Context, lastResults LoggerCollection) (result LoggerCollection, err error) {
+ req, err := lastResults.loggerCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.LoggerClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -495,6 +546,16 @@ func (client LoggerClient) listByServiceNextResults(lastResults LoggerCollection
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client LoggerClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result LoggerCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -508,6 +569,16 @@ func (client LoggerClient) ListByServiceComplete(ctx context.Context, resourceGr
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client LoggerClient) Update(ctx context.Context, resourceGroupName string, serviceName string, loggerid string, parameters LoggerUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go
index 4b5092fdc1d9..6636fce4c046 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/models.go
@@ -18,15 +18,20 @@ package apimanagement
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement"
+
// AlwaysLog enumerates the values for always log.
type AlwaysLog string
@@ -131,6 +136,22 @@ func PossibleBearerTokenSendingMethodValues() []BearerTokenSendingMethod {
return []BearerTokenSendingMethod{AuthorizationHeader, Query}
}
+// BearerTokenSendingMethods enumerates the values for bearer token sending methods.
+type BearerTokenSendingMethods string
+
+const (
+ // BearerTokenSendingMethodsAuthorizationHeader Access token will be transmitted in the Authorization
+ // header using Bearer schema
+ BearerTokenSendingMethodsAuthorizationHeader BearerTokenSendingMethods = "authorizationHeader"
+ // BearerTokenSendingMethodsQuery Access token will be transmitted as query parameters.
+ BearerTokenSendingMethodsQuery BearerTokenSendingMethods = "query"
+)
+
+// PossibleBearerTokenSendingMethodsValues returns an array of possible values for the BearerTokenSendingMethods const type.
+func PossibleBearerTokenSendingMethodsValues() []BearerTokenSendingMethods {
+ return []BearerTokenSendingMethods{BearerTokenSendingMethodsAuthorizationHeader, BearerTokenSendingMethodsQuery}
+}
+
// ClientAuthenticationMethod enumerates the values for client authentication method.
type ClientAuthenticationMethod string
@@ -449,6 +470,23 @@ func PossibleProtocolValues() []Protocol {
return []Protocol{ProtocolHTTP, ProtocolHTTPS}
}
+// ResourceSkuCapacityScaleType enumerates the values for resource sku capacity scale type.
+type ResourceSkuCapacityScaleType string
+
+const (
+ // Automatic Supported scale type automatic.
+ Automatic ResourceSkuCapacityScaleType = "automatic"
+ // Manual Supported scale type manual.
+ Manual ResourceSkuCapacityScaleType = "manual"
+ // None Scaling not supported.
+ None ResourceSkuCapacityScaleType = "none"
+)
+
+// PossibleResourceSkuCapacityScaleTypeValues returns an array of possible values for the ResourceSkuCapacityScaleType const type.
+func PossibleResourceSkuCapacityScaleTypeValues() []ResourceSkuCapacityScaleType {
+ return []ResourceSkuCapacityScaleType{Automatic, Manual, None}
+}
+
// SamplingType enumerates the values for sampling type.
type SamplingType string
@@ -468,6 +506,8 @@ type SkuType string
const (
// SkuTypeBasic Basic SKU of Api Management.
SkuTypeBasic SkuType = "Basic"
+ // SkuTypeConsumption Consumption SKU of Api Management.
+ SkuTypeConsumption SkuType = "Consumption"
// SkuTypeDeveloper Developer SKU of Api Management.
SkuTypeDeveloper SkuType = "Developer"
// SkuTypePremium Premium SKU of Api Management.
@@ -478,7 +518,7 @@ const (
// PossibleSkuTypeValues returns an array of possible values for the SkuType const type.
func PossibleSkuTypeValues() []SkuType {
- return []SkuType{SkuTypeBasic, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard}
+ return []SkuType{SkuTypeBasic, SkuTypeConsumption, SkuTypeDeveloper, SkuTypePremium, SkuTypeStandard}
}
// SoapAPIType enumerates the values for soap api type.
@@ -678,7 +718,8 @@ type AccessInformationContract struct {
Enabled *bool `json:"enabled,omitempty"`
}
-// AccessInformationUpdateParameters tenant access information update parameters of the API Management service.
+// AccessInformationUpdateParameters tenant access information update parameters of the API Management
+// service.
type AccessInformationUpdateParameters struct {
// Enabled - Tenant access information of the API Management service.
Enabled *bool `json:"enabled,omitempty"`
@@ -715,14 +756,24 @@ type APICollectionIterator struct {
page APICollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *APICollectionIterator) Next() error {
+func (iter *APICollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -731,6 +782,13 @@ func (iter *APICollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *APICollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter APICollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -750,6 +808,11 @@ func (iter APICollectionIterator) Value() APIContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the APICollectionIterator type.
+func NewAPICollectionIterator(page APICollectionPage) APICollectionIterator {
+ return APICollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ac APICollection) IsEmpty() bool {
return ac.Value == nil || len(*ac.Value) == 0
@@ -757,11 +820,11 @@ func (ac APICollection) IsEmpty() bool {
// aPICollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ac APICollection) aPICollectionPreparer() (*http.Request, error) {
+func (ac APICollection) aPICollectionPreparer(ctx context.Context) (*http.Request, error) {
if ac.NextLink == nil || len(to.String(ac.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ac.NextLink)))
@@ -769,14 +832,24 @@ func (ac APICollection) aPICollectionPreparer() (*http.Request, error) {
// APICollectionPage contains a page of APIContract values.
type APICollectionPage struct {
- fn func(APICollection) (APICollection, error)
+ fn func(context.Context, APICollection) (APICollection, error)
ac APICollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *APICollectionPage) Next() error {
- next, err := page.fn(page.ac)
+func (page *APICollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APICollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ac)
if err != nil {
return err
}
@@ -784,6 +857,13 @@ func (page *APICollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *APICollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page APICollectionPage) NotDone() bool {
return !page.ac.IsEmpty()
@@ -802,6 +882,11 @@ func (page APICollectionPage) Values() []APIContract {
return *page.ac.Value
}
+// Creates a new instance of the APICollectionPage type.
+func NewAPICollectionPage(getNextPage func(context.Context, APICollection) (APICollection, error)) APICollectionPage {
+ return APICollectionPage{fn: getNextPage}
+}
+
// APIContract API details.
type APIContract struct {
autorest.Response `json:"-"`
@@ -917,6 +1002,8 @@ type APIContractProperties struct {
APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
// APIVersionSetID - A resource identifier for the related ApiVersionSet.
APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
+ // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
+ SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
}
// APIContractUpdateProperties API update contract properties.
@@ -951,6 +1038,8 @@ type APIContractUpdateProperties struct {
APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
// APIVersionSetID - A resource identifier for the related ApiVersionSet.
APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
+ // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
+ SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
}
// APICreateOrUpdateParameter API Create or Update Parameters.
@@ -1035,6 +1124,8 @@ type APICreateOrUpdateProperties struct {
APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
// APIVersionSetID - A resource identifier for the related ApiVersionSet.
APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
+ // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
+ SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
}
// APICreateOrUpdatePropertiesWsdlSelector criteria to limit import of WSDL to a subset of the document.
@@ -1069,6 +1160,8 @@ type APIEntityBaseContract struct {
APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
// APIVersionSetID - A resource identifier for the related ApiVersionSet.
APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
+ // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
+ SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
}
// APIExportResult API Export result Blob Uri.
@@ -1123,14 +1216,24 @@ type APIReleaseCollectionIterator struct {
page APIReleaseCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *APIReleaseCollectionIterator) Next() error {
+func (iter *APIReleaseCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1139,6 +1242,13 @@ func (iter *APIReleaseCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *APIReleaseCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter APIReleaseCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1158,6 +1268,11 @@ func (iter APIReleaseCollectionIterator) Value() APIReleaseContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the APIReleaseCollectionIterator type.
+func NewAPIReleaseCollectionIterator(page APIReleaseCollectionPage) APIReleaseCollectionIterator {
+ return APIReleaseCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (arc APIReleaseCollection) IsEmpty() bool {
return arc.Value == nil || len(*arc.Value) == 0
@@ -1165,11 +1280,11 @@ func (arc APIReleaseCollection) IsEmpty() bool {
// aPIReleaseCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (arc APIReleaseCollection) aPIReleaseCollectionPreparer() (*http.Request, error) {
+func (arc APIReleaseCollection) aPIReleaseCollectionPreparer(ctx context.Context) (*http.Request, error) {
if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(arc.NextLink)))
@@ -1177,14 +1292,24 @@ func (arc APIReleaseCollection) aPIReleaseCollectionPreparer() (*http.Request, e
// APIReleaseCollectionPage contains a page of APIReleaseContract values.
type APIReleaseCollectionPage struct {
- fn func(APIReleaseCollection) (APIReleaseCollection, error)
+ fn func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)
arc APIReleaseCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *APIReleaseCollectionPage) Next() error {
- next, err := page.fn(page.arc)
+func (page *APIReleaseCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIReleaseCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.arc)
if err != nil {
return err
}
@@ -1192,6 +1317,13 @@ func (page *APIReleaseCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *APIReleaseCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page APIReleaseCollectionPage) NotDone() bool {
return !page.arc.IsEmpty()
@@ -1210,6 +1342,11 @@ func (page APIReleaseCollectionPage) Values() []APIReleaseContract {
return *page.arc.Value
}
+// Creates a new instance of the APIReleaseCollectionPage type.
+func NewAPIReleaseCollectionPage(getNextPage func(context.Context, APIReleaseCollection) (APIReleaseCollection, error)) APIReleaseCollectionPage {
+ return APIReleaseCollectionPage{fn: getNextPage}
+}
+
// APIReleaseContract api Release details.
type APIReleaseContract struct {
autorest.Response `json:"-"`
@@ -1319,14 +1456,24 @@ type APIRevisionCollectionIterator struct {
page APIRevisionCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *APIRevisionCollectionIterator) Next() error {
+func (iter *APIRevisionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1335,6 +1482,13 @@ func (iter *APIRevisionCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *APIRevisionCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter APIRevisionCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1354,6 +1508,11 @@ func (iter APIRevisionCollectionIterator) Value() APIRevisionContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the APIRevisionCollectionIterator type.
+func NewAPIRevisionCollectionIterator(page APIRevisionCollectionPage) APIRevisionCollectionIterator {
+ return APIRevisionCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (arc APIRevisionCollection) IsEmpty() bool {
return arc.Value == nil || len(*arc.Value) == 0
@@ -1361,11 +1520,11 @@ func (arc APIRevisionCollection) IsEmpty() bool {
// aPIRevisionCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (arc APIRevisionCollection) aPIRevisionCollectionPreparer() (*http.Request, error) {
+func (arc APIRevisionCollection) aPIRevisionCollectionPreparer(ctx context.Context) (*http.Request, error) {
if arc.NextLink == nil || len(to.String(arc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(arc.NextLink)))
@@ -1373,14 +1532,24 @@ func (arc APIRevisionCollection) aPIRevisionCollectionPreparer() (*http.Request,
// APIRevisionCollectionPage contains a page of APIRevisionContract values.
type APIRevisionCollectionPage struct {
- fn func(APIRevisionCollection) (APIRevisionCollection, error)
+ fn func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)
arc APIRevisionCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *APIRevisionCollectionPage) Next() error {
- next, err := page.fn(page.arc)
+func (page *APIRevisionCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIRevisionCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.arc)
if err != nil {
return err
}
@@ -1388,6 +1557,13 @@ func (page *APIRevisionCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *APIRevisionCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page APIRevisionCollectionPage) NotDone() bool {
return !page.arc.IsEmpty()
@@ -1406,6 +1582,11 @@ func (page APIRevisionCollectionPage) Values() []APIRevisionContract {
return *page.arc.Value
}
+// Creates a new instance of the APIRevisionCollectionPage type.
+func NewAPIRevisionCollectionPage(getNextPage func(context.Context, APIRevisionCollection) (APIRevisionCollection, error)) APIRevisionCollectionPage {
+ return APIRevisionCollectionPage{fn: getNextPage}
+}
+
// APIRevisionContract summary of revision metadata.
type APIRevisionContract struct {
// APIID - Identifier of the API Revision.
@@ -1426,7 +1607,8 @@ type APIRevisionContract struct {
IsCurrent *bool `json:"isCurrent,omitempty"`
}
-// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API Revision
+// APIRevisionInfoContract object used to create an API Revision or Version based on an existing API
+// Revision
type APIRevisionInfoContract struct {
// SourceAPIID - Resource identifier of API to be used to create the revision from.
SourceAPIID *string `json:"sourceApiId,omitempty"`
@@ -1472,6 +1654,8 @@ type APITagResourceContractProperties struct {
APIVersionDescription *string `json:"apiVersionDescription,omitempty"`
// APIVersionSetID - A resource identifier for the related ApiVersionSet.
APIVersionSetID *string `json:"apiVersionSetId,omitempty"`
+ // SubscriptionRequired - Specifies whether an API or Product subscription is required for accessing the API.
+ SubscriptionRequired *bool `json:"subscriptionRequired,omitempty"`
}
// APIUpdateContract API update contract details.
@@ -1528,14 +1712,24 @@ type APIVersionSetCollectionIterator struct {
page APIVersionSetCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *APIVersionSetCollectionIterator) Next() error {
+func (iter *APIVersionSetCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1544,6 +1738,13 @@ func (iter *APIVersionSetCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *APIVersionSetCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter APIVersionSetCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1563,6 +1764,11 @@ func (iter APIVersionSetCollectionIterator) Value() APIVersionSetContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the APIVersionSetCollectionIterator type.
+func NewAPIVersionSetCollectionIterator(page APIVersionSetCollectionPage) APIVersionSetCollectionIterator {
+ return APIVersionSetCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (avsc APIVersionSetCollection) IsEmpty() bool {
return avsc.Value == nil || len(*avsc.Value) == 0
@@ -1570,11 +1776,11 @@ func (avsc APIVersionSetCollection) IsEmpty() bool {
// aPIVersionSetCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer() (*http.Request, error) {
+func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer(ctx context.Context) (*http.Request, error) {
if avsc.NextLink == nil || len(to.String(avsc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(avsc.NextLink)))
@@ -1582,14 +1788,24 @@ func (avsc APIVersionSetCollection) aPIVersionSetCollectionPreparer() (*http.Req
// APIVersionSetCollectionPage contains a page of APIVersionSetContract values.
type APIVersionSetCollectionPage struct {
- fn func(APIVersionSetCollection) (APIVersionSetCollection, error)
+ fn func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)
avsc APIVersionSetCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *APIVersionSetCollectionPage) Next() error {
- next, err := page.fn(page.avsc)
+func (page *APIVersionSetCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/APIVersionSetCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.avsc)
if err != nil {
return err
}
@@ -1597,6 +1813,13 @@ func (page *APIVersionSetCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *APIVersionSetCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page APIVersionSetCollectionPage) NotDone() bool {
return !page.avsc.IsEmpty()
@@ -1615,6 +1838,11 @@ func (page APIVersionSetCollectionPage) Values() []APIVersionSetContract {
return *page.avsc.Value
}
+// Creates a new instance of the APIVersionSetCollectionPage type.
+func NewAPIVersionSetCollectionPage(getNextPage func(context.Context, APIVersionSetCollection) (APIVersionSetCollection, error)) APIVersionSetCollectionPage {
+ return APIVersionSetCollectionPage{fn: getNextPage}
+}
+
// APIVersionSetContract api Version Set Contract details.
type APIVersionSetContract struct {
autorest.Response `json:"-"`
@@ -1697,8 +1925,8 @@ func (avsc *APIVersionSetContract) UnmarshalJSON(body []byte) error {
return nil
}
-// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API Versions
-// relating
+// APIVersionSetContractDetails an API Version Set contains the common configuration for a set of API
+// Versions relating
type APIVersionSetContractDetails struct {
// ID - Identifier for existing API Version Set. Omit this value to create a new Version Set.
ID *string `json:"id,omitempty"`
@@ -1793,6 +2021,10 @@ type APIVersionSetUpdateParametersProperties struct {
type AuthenticationSettingsContract struct {
// OAuth2 - OAuth2 Authentication settings
OAuth2 *OAuth2AuthenticationSettingsContract `json:"oAuth2,omitempty"`
+ // Openid - OpenID Connect Authentication Settings
+ Openid *OpenIDAuthenticationSettingsContract `json:"openid,omitempty"`
+ // SubscriptionKeyRequired - Specifies whether subscription key is required during call to this API, true - API is included into closed products only, false - API is included into open products alone, null - there is a mix of products.
+ SubscriptionKeyRequired *bool `json:"subscriptionKeyRequired,omitempty"`
}
// AuthorizationServerCollection paged OAuth2 Authorization Servers list representation.
@@ -1806,21 +2038,31 @@ type AuthorizationServerCollection struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// AuthorizationServerCollectionIterator provides access to a complete listing of AuthorizationServerContract
-// values.
+// AuthorizationServerCollectionIterator provides access to a complete listing of
+// AuthorizationServerContract values.
type AuthorizationServerCollectionIterator struct {
i int
page AuthorizationServerCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AuthorizationServerCollectionIterator) Next() error {
+func (iter *AuthorizationServerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1829,6 +2071,13 @@ func (iter *AuthorizationServerCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AuthorizationServerCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AuthorizationServerCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1848,6 +2097,11 @@ func (iter AuthorizationServerCollectionIterator) Value() AuthorizationServerCon
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AuthorizationServerCollectionIterator type.
+func NewAuthorizationServerCollectionIterator(page AuthorizationServerCollectionPage) AuthorizationServerCollectionIterator {
+ return AuthorizationServerCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (asc AuthorizationServerCollection) IsEmpty() bool {
return asc.Value == nil || len(*asc.Value) == 0
@@ -1855,11 +2109,11 @@ func (asc AuthorizationServerCollection) IsEmpty() bool {
// authorizationServerCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer() (*http.Request, error) {
+func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer(ctx context.Context) (*http.Request, error) {
if asc.NextLink == nil || len(to.String(asc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(asc.NextLink)))
@@ -1867,14 +2121,24 @@ func (asc AuthorizationServerCollection) authorizationServerCollectionPreparer()
// AuthorizationServerCollectionPage contains a page of AuthorizationServerContract values.
type AuthorizationServerCollectionPage struct {
- fn func(AuthorizationServerCollection) (AuthorizationServerCollection, error)
+ fn func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)
asc AuthorizationServerCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AuthorizationServerCollectionPage) Next() error {
- next, err := page.fn(page.asc)
+func (page *AuthorizationServerCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AuthorizationServerCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.asc)
if err != nil {
return err
}
@@ -1882,6 +2146,13 @@ func (page *AuthorizationServerCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AuthorizationServerCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AuthorizationServerCollectionPage) NotDone() bool {
return !page.asc.IsEmpty()
@@ -1900,6 +2171,11 @@ func (page AuthorizationServerCollectionPage) Values() []AuthorizationServerCont
return *page.asc.Value
}
+// Creates a new instance of the AuthorizationServerCollectionPage type.
+func NewAuthorizationServerCollectionPage(getNextPage func(context.Context, AuthorizationServerCollection) (AuthorizationServerCollection, error)) AuthorizationServerCollectionPage {
+ return AuthorizationServerCollectionPage{fn: getNextPage}
+}
+
// AuthorizationServerContract external OAuth authorization server settings.
type AuthorizationServerContract struct {
autorest.Response `json:"-"`
@@ -2125,7 +2401,8 @@ func (asuc *AuthorizationServerUpdateContract) UnmarshalJSON(body []byte) error
return nil
}
-// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings contract.
+// AuthorizationServerUpdateContractProperties external OAuth authorization server Update settings
+// contract.
type AuthorizationServerUpdateContractProperties struct {
// DisplayName - User-friendly authorization server name.
DisplayName *string `json:"displayName,omitempty"`
@@ -2202,14 +2479,24 @@ type BackendCollectionIterator struct {
page BackendCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *BackendCollectionIterator) Next() error {
+func (iter *BackendCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2218,6 +2505,13 @@ func (iter *BackendCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *BackendCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter BackendCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2237,6 +2531,11 @@ func (iter BackendCollectionIterator) Value() BackendContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the BackendCollectionIterator type.
+func NewBackendCollectionIterator(page BackendCollectionPage) BackendCollectionIterator {
+ return BackendCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (bc BackendCollection) IsEmpty() bool {
return bc.Value == nil || len(*bc.Value) == 0
@@ -2244,11 +2543,11 @@ func (bc BackendCollection) IsEmpty() bool {
// backendCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (bc BackendCollection) backendCollectionPreparer() (*http.Request, error) {
+func (bc BackendCollection) backendCollectionPreparer(ctx context.Context) (*http.Request, error) {
if bc.NextLink == nil || len(to.String(bc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(bc.NextLink)))
@@ -2256,14 +2555,24 @@ func (bc BackendCollection) backendCollectionPreparer() (*http.Request, error) {
// BackendCollectionPage contains a page of BackendContract values.
type BackendCollectionPage struct {
- fn func(BackendCollection) (BackendCollection, error)
+ fn func(context.Context, BackendCollection) (BackendCollection, error)
bc BackendCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *BackendCollectionPage) Next() error {
- next, err := page.fn(page.bc)
+func (page *BackendCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackendCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.bc)
if err != nil {
return err
}
@@ -2271,6 +2580,13 @@ func (page *BackendCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *BackendCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page BackendCollectionPage) NotDone() bool {
return !page.bc.IsEmpty()
@@ -2289,6 +2605,11 @@ func (page BackendCollectionPage) Values() []BackendContract {
return *page.bc.Value
}
+// Creates a new instance of the BackendCollectionPage type.
+func NewBackendCollectionPage(getNextPage func(context.Context, BackendCollection) (BackendCollection, error)) BackendCollectionPage {
+ return BackendCollectionPage{fn: getNextPage}
+}
+
// BackendContract backend details.
type BackendContract struct {
autorest.Response `json:"-"`
@@ -2522,7 +2843,7 @@ func (brc *BackendReconnectContract) UnmarshalJSON(body []byte) error {
// BackendReconnectProperties properties to control reconnect requests.
type BackendReconnectProperties struct {
- // After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconect is PT2M.
+ // After - Duration in ISO8601 format after which reconnect will be initiated. Minimum duration of the Reconnect is PT2M.
After *string `json:"after,omitempty"`
}
@@ -2530,7 +2851,7 @@ type BackendReconnectProperties struct {
type BackendServiceFabricClusterProperties struct {
// ClientCertificatethumbprint - The client certificate thumbprint for the management endpoint.
ClientCertificatethumbprint *string `json:"clientCertificatethumbprint,omitempty"`
- // MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the parition.
+ // MaxPartitionResolutionRetries - Maximum number of retries while attempting resolve the partition.
MaxPartitionResolutionRetries *int32 `json:"maxPartitionResolutionRetries,omitempty"`
// ManagementEndpoints - The cluster management endpoint.
ManagementEndpoints *[]string `json:"managementEndpoints,omitempty"`
@@ -2630,14 +2951,24 @@ type CertificateCollectionIterator struct {
page CertificateCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *CertificateCollectionIterator) Next() error {
+func (iter *CertificateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2646,6 +2977,13 @@ func (iter *CertificateCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *CertificateCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter CertificateCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2665,6 +3003,11 @@ func (iter CertificateCollectionIterator) Value() CertificateContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the CertificateCollectionIterator type.
+func NewCertificateCollectionIterator(page CertificateCollectionPage) CertificateCollectionIterator {
+ return CertificateCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cc CertificateCollection) IsEmpty() bool {
return cc.Value == nil || len(*cc.Value) == 0
@@ -2672,11 +3015,11 @@ func (cc CertificateCollection) IsEmpty() bool {
// certificateCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cc CertificateCollection) certificateCollectionPreparer() (*http.Request, error) {
+func (cc CertificateCollection) certificateCollectionPreparer(ctx context.Context) (*http.Request, error) {
if cc.NextLink == nil || len(to.String(cc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cc.NextLink)))
@@ -2684,14 +3027,24 @@ func (cc CertificateCollection) certificateCollectionPreparer() (*http.Request,
// CertificateCollectionPage contains a page of CertificateContract values.
type CertificateCollectionPage struct {
- fn func(CertificateCollection) (CertificateCollection, error)
+ fn func(context.Context, CertificateCollection) (CertificateCollection, error)
cc CertificateCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *CertificateCollectionPage) Next() error {
- next, err := page.fn(page.cc)
+func (page *CertificateCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CertificateCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cc)
if err != nil {
return err
}
@@ -2699,6 +3052,13 @@ func (page *CertificateCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *CertificateCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page CertificateCollectionPage) NotDone() bool {
return !page.cc.IsEmpty()
@@ -2717,6 +3077,11 @@ func (page CertificateCollectionPage) Values() []CertificateContract {
return *page.cc.Value
}
+// Creates a new instance of the CertificateCollectionPage type.
+func NewCertificateCollectionPage(getNextPage func(context.Context, CertificateCollection) (CertificateCollection, error)) CertificateCollectionPage {
+ return CertificateCollectionPage{fn: getNextPage}
+}
+
// CertificateConfiguration certificate configuration which consist of non-trusted intermediates and root
// certificates.
type CertificateConfiguration struct {
@@ -2724,7 +3089,7 @@ type CertificateConfiguration struct {
EncodedCertificate *string `json:"encodedCertificate,omitempty"`
// CertificatePassword - Certificate Password.
CertificatePassword *string `json:"certificatePassword,omitempty"`
- // StoreName - The System.Security.Cryptography.x509certificates.Storename certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root'
+ // StoreName - The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only Root and CertificateAuthority are valid locations. Possible values include: 'CertificateAuthority', 'Root'
StoreName StoreName `json:"storeName,omitempty"`
// Certificate - Certificate information.
Certificate *CertificateInformation `json:"certificate,omitempty"`
@@ -2894,6 +3259,13 @@ type ConnectivityStatusContract struct {
LastStatusChange *date.Time `json:"lastStatusChange,omitempty"`
}
+// CurrentUserIdentity ...
+type CurrentUserIdentity struct {
+ autorest.Response `json:"-"`
+ // ID - API Management service user id.
+ ID *string `json:"id,omitempty"`
+}
+
// DeployConfigurationParameters parameters supplied to the Deploy Configuration operation.
type DeployConfigurationParameters struct {
// Branch - The name of the Git branch from which the configuration is to be deployed to the configuration database.
@@ -2917,14 +3289,24 @@ type DiagnosticCollectionIterator struct {
page DiagnosticCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DiagnosticCollectionIterator) Next() error {
+func (iter *DiagnosticCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2933,6 +3315,13 @@ func (iter *DiagnosticCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiagnosticCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DiagnosticCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2952,6 +3341,11 @@ func (iter DiagnosticCollectionIterator) Value() DiagnosticContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DiagnosticCollectionIterator type.
+func NewDiagnosticCollectionIterator(page DiagnosticCollectionPage) DiagnosticCollectionIterator {
+ return DiagnosticCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dc DiagnosticCollection) IsEmpty() bool {
return dc.Value == nil || len(*dc.Value) == 0
@@ -2959,11 +3353,11 @@ func (dc DiagnosticCollection) IsEmpty() bool {
// diagnosticCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dc DiagnosticCollection) diagnosticCollectionPreparer() (*http.Request, error) {
+func (dc DiagnosticCollection) diagnosticCollectionPreparer(ctx context.Context) (*http.Request, error) {
if dc.NextLink == nil || len(to.String(dc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dc.NextLink)))
@@ -2971,14 +3365,24 @@ func (dc DiagnosticCollection) diagnosticCollectionPreparer() (*http.Request, er
// DiagnosticCollectionPage contains a page of DiagnosticContract values.
type DiagnosticCollectionPage struct {
- fn func(DiagnosticCollection) (DiagnosticCollection, error)
+ fn func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)
dc DiagnosticCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DiagnosticCollectionPage) Next() error {
- next, err := page.fn(page.dc)
+func (page *DiagnosticCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dc)
if err != nil {
return err
}
@@ -2986,6 +3390,13 @@ func (page *DiagnosticCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiagnosticCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DiagnosticCollectionPage) NotDone() bool {
return !page.dc.IsEmpty()
@@ -3004,6 +3415,11 @@ func (page DiagnosticCollectionPage) Values() []DiagnosticContract {
return *page.dc.Value
}
+// Creates a new instance of the DiagnosticCollectionPage type.
+func NewDiagnosticCollectionPage(getNextPage func(context.Context, DiagnosticCollection) (DiagnosticCollection, error)) DiagnosticCollectionPage {
+ return DiagnosticCollectionPage{fn: getNextPage}
+}
+
// DiagnosticContract diagnostic details.
type DiagnosticContract struct {
autorest.Response `json:"-"`
@@ -3094,10 +3510,12 @@ type DiagnosticContractProperties struct {
LoggerID *string `json:"loggerId,omitempty"`
// Sampling - Sampling settings for Diagnostic.
Sampling *SamplingSettings `json:"sampling,omitempty"`
- // Frontend - Diagnostic settings for incoming/outcoming HTTP messages to the Gateway.
+ // Frontend - Diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
Frontend *PipelineDiagnosticSettings `json:"frontend,omitempty"`
- // Backend - Diagnostic settings for incoming/outcoming HTTP messages to the Backend
+ // Backend - Diagnostic settings for incoming/outgoing HTTP messages to the Backend
Backend *PipelineDiagnosticSettings `json:"backend,omitempty"`
+ // EnableHTTPCorrelationHeaders - Whether to process Correlation Headers coming to Api Management Service. Only applicable to Application Insights diagnostics. Default is true.
+ EnableHTTPCorrelationHeaders *bool `json:"enableHttpCorrelationHeaders,omitempty"`
}
// EmailTemplateCollection paged email template list representation.
@@ -3115,14 +3533,24 @@ type EmailTemplateCollectionIterator struct {
page EmailTemplateCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EmailTemplateCollectionIterator) Next() error {
+func (iter *EmailTemplateCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3131,6 +3559,13 @@ func (iter *EmailTemplateCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EmailTemplateCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EmailTemplateCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3150,6 +3585,11 @@ func (iter EmailTemplateCollectionIterator) Value() EmailTemplateContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EmailTemplateCollectionIterator type.
+func NewEmailTemplateCollectionIterator(page EmailTemplateCollectionPage) EmailTemplateCollectionIterator {
+ return EmailTemplateCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (etc EmailTemplateCollection) IsEmpty() bool {
return etc.Value == nil || len(*etc.Value) == 0
@@ -3157,11 +3597,11 @@ func (etc EmailTemplateCollection) IsEmpty() bool {
// emailTemplateCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (etc EmailTemplateCollection) emailTemplateCollectionPreparer() (*http.Request, error) {
+func (etc EmailTemplateCollection) emailTemplateCollectionPreparer(ctx context.Context) (*http.Request, error) {
if etc.NextLink == nil || len(to.String(etc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(etc.NextLink)))
@@ -3169,14 +3609,24 @@ func (etc EmailTemplateCollection) emailTemplateCollectionPreparer() (*http.Requ
// EmailTemplateCollectionPage contains a page of EmailTemplateContract values.
type EmailTemplateCollectionPage struct {
- fn func(EmailTemplateCollection) (EmailTemplateCollection, error)
+ fn func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)
etc EmailTemplateCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EmailTemplateCollectionPage) Next() error {
- next, err := page.fn(page.etc)
+func (page *EmailTemplateCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EmailTemplateCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.etc)
if err != nil {
return err
}
@@ -3184,6 +3634,13 @@ func (page *EmailTemplateCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EmailTemplateCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EmailTemplateCollectionPage) NotDone() bool {
return !page.etc.IsEmpty()
@@ -3202,6 +3659,11 @@ func (page EmailTemplateCollectionPage) Values() []EmailTemplateContract {
return *page.etc.Value
}
+// Creates a new instance of the EmailTemplateCollectionPage type.
+func NewEmailTemplateCollectionPage(getNextPage func(context.Context, EmailTemplateCollection) (EmailTemplateCollection, error)) EmailTemplateCollectionPage {
+ return EmailTemplateCollectionPage{fn: getNextPage}
+}
+
// EmailTemplateContract email Template details.
type EmailTemplateContract struct {
autorest.Response `json:"-"`
@@ -3444,14 +3906,24 @@ type GroupCollectionIterator struct {
page GroupCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *GroupCollectionIterator) Next() error {
+func (iter *GroupCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3460,6 +3932,13 @@ func (iter *GroupCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *GroupCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter GroupCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3479,6 +3958,11 @@ func (iter GroupCollectionIterator) Value() GroupContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the GroupCollectionIterator type.
+func NewGroupCollectionIterator(page GroupCollectionPage) GroupCollectionIterator {
+ return GroupCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (gc GroupCollection) IsEmpty() bool {
return gc.Value == nil || len(*gc.Value) == 0
@@ -3486,11 +3970,11 @@ func (gc GroupCollection) IsEmpty() bool {
// groupCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (gc GroupCollection) groupCollectionPreparer() (*http.Request, error) {
+func (gc GroupCollection) groupCollectionPreparer(ctx context.Context) (*http.Request, error) {
if gc.NextLink == nil || len(to.String(gc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(gc.NextLink)))
@@ -3498,14 +3982,24 @@ func (gc GroupCollection) groupCollectionPreparer() (*http.Request, error) {
// GroupCollectionPage contains a page of GroupContract values.
type GroupCollectionPage struct {
- fn func(GroupCollection) (GroupCollection, error)
+ fn func(context.Context, GroupCollection) (GroupCollection, error)
gc GroupCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *GroupCollectionPage) Next() error {
- next, err := page.fn(page.gc)
+func (page *GroupCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GroupCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.gc)
if err != nil {
return err
}
@@ -3513,6 +4007,13 @@ func (page *GroupCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *GroupCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page GroupCollectionPage) NotDone() bool {
return !page.gc.IsEmpty()
@@ -3531,6 +4032,11 @@ func (page GroupCollectionPage) Values() []GroupContract {
return *page.gc.Value
}
+// Creates a new instance of the GroupCollectionPage type.
+func NewGroupCollectionPage(getNextPage func(context.Context, GroupCollection) (GroupCollection, error)) GroupCollectionPage {
+ return GroupCollectionPage{fn: getNextPage}
+}
+
// GroupContract contract details.
type GroupContract struct {
autorest.Response `json:"-"`
@@ -3865,9 +4371,9 @@ func (ipc *IdentityProviderContract) UnmarshalJSON(body []byte) error {
return nil
}
-// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft, Twitter or
-// Azure Active Directory which can be used to enable access to the API Management service developer portal for all
-// users.
+// IdentityProviderContractProperties the external Identity Providers like Facebook, Google, Microsoft,
+// Twitter or Azure Active Directory which can be used to enable access to the API Management service
+// developer portal for all users.
type IdentityProviderContractProperties struct {
// ClientID - Client Id of the Application in the external Identity Provider. It is App ID for Facebook login, Client ID for Google login, App ID for Microsoft.
ClientID *string `json:"clientId,omitempty"`
@@ -3902,14 +4408,24 @@ type IdentityProviderListIterator struct {
page IdentityProviderListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IdentityProviderListIterator) Next() error {
+func (iter *IdentityProviderListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3918,6 +4434,13 @@ func (iter *IdentityProviderListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IdentityProviderListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IdentityProviderListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3937,6 +4460,11 @@ func (iter IdentityProviderListIterator) Value() IdentityProviderContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IdentityProviderListIterator type.
+func NewIdentityProviderListIterator(page IdentityProviderListPage) IdentityProviderListIterator {
+ return IdentityProviderListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ipl IdentityProviderList) IsEmpty() bool {
return ipl.Value == nil || len(*ipl.Value) == 0
@@ -3944,11 +4472,11 @@ func (ipl IdentityProviderList) IsEmpty() bool {
// identityProviderListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ipl IdentityProviderList) identityProviderListPreparer() (*http.Request, error) {
+func (ipl IdentityProviderList) identityProviderListPreparer(ctx context.Context) (*http.Request, error) {
if ipl.NextLink == nil || len(to.String(ipl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ipl.NextLink)))
@@ -3956,14 +4484,24 @@ func (ipl IdentityProviderList) identityProviderListPreparer() (*http.Request, e
// IdentityProviderListPage contains a page of IdentityProviderContract values.
type IdentityProviderListPage struct {
- fn func(IdentityProviderList) (IdentityProviderList, error)
+ fn func(context.Context, IdentityProviderList) (IdentityProviderList, error)
ipl IdentityProviderList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IdentityProviderListPage) Next() error {
- next, err := page.fn(page.ipl)
+func (page *IdentityProviderListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IdentityProviderListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ipl)
if err != nil {
return err
}
@@ -3971,6 +4509,13 @@ func (page *IdentityProviderListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IdentityProviderListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IdentityProviderListPage) NotDone() bool {
return !page.ipl.IsEmpty()
@@ -3989,6 +4534,11 @@ func (page IdentityProviderListPage) Values() []IdentityProviderContract {
return *page.ipl.Value
}
+// Creates a new instance of the IdentityProviderListPage type.
+func NewIdentityProviderListPage(getNextPage func(context.Context, IdentityProviderList) (IdentityProviderList, error)) IdentityProviderListPage {
+ return IdentityProviderListPage{fn: getNextPage}
+}
+
// IdentityProviderUpdateParameters parameters supplied to update Identity Provider
type IdentityProviderUpdateParameters struct {
// IdentityProviderUpdateProperties - Identity Provider update properties.
@@ -4057,20 +4607,31 @@ type IssueAttachmentCollection struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract values.
+// IssueAttachmentCollectionIterator provides access to a complete listing of IssueAttachmentContract
+// values.
type IssueAttachmentCollectionIterator struct {
i int
page IssueAttachmentCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IssueAttachmentCollectionIterator) Next() error {
+func (iter *IssueAttachmentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4079,6 +4640,13 @@ func (iter *IssueAttachmentCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IssueAttachmentCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IssueAttachmentCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4098,6 +4666,11 @@ func (iter IssueAttachmentCollectionIterator) Value() IssueAttachmentContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IssueAttachmentCollectionIterator type.
+func NewIssueAttachmentCollectionIterator(page IssueAttachmentCollectionPage) IssueAttachmentCollectionIterator {
+ return IssueAttachmentCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (iac IssueAttachmentCollection) IsEmpty() bool {
return iac.Value == nil || len(*iac.Value) == 0
@@ -4105,11 +4678,11 @@ func (iac IssueAttachmentCollection) IsEmpty() bool {
// issueAttachmentCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer() (*http.Request, error) {
+func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer(ctx context.Context) (*http.Request, error) {
if iac.NextLink == nil || len(to.String(iac.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(iac.NextLink)))
@@ -4117,14 +4690,24 @@ func (iac IssueAttachmentCollection) issueAttachmentCollectionPreparer() (*http.
// IssueAttachmentCollectionPage contains a page of IssueAttachmentContract values.
type IssueAttachmentCollectionPage struct {
- fn func(IssueAttachmentCollection) (IssueAttachmentCollection, error)
+ fn func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)
iac IssueAttachmentCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IssueAttachmentCollectionPage) Next() error {
- next, err := page.fn(page.iac)
+func (page *IssueAttachmentCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueAttachmentCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.iac)
if err != nil {
return err
}
@@ -4132,6 +4715,13 @@ func (page *IssueAttachmentCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IssueAttachmentCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IssueAttachmentCollectionPage) NotDone() bool {
return !page.iac.IsEmpty()
@@ -4150,6 +4740,11 @@ func (page IssueAttachmentCollectionPage) Values() []IssueAttachmentContract {
return *page.iac.Value
}
+// Creates a new instance of the IssueAttachmentCollectionPage type.
+func NewIssueAttachmentCollectionPage(getNextPage func(context.Context, IssueAttachmentCollection) (IssueAttachmentCollection, error)) IssueAttachmentCollectionPage {
+ return IssueAttachmentCollectionPage{fn: getNextPage}
+}
+
// IssueAttachmentContract issue Attachment Contract details.
type IssueAttachmentContract struct {
autorest.Response `json:"-"`
@@ -4257,14 +4852,24 @@ type IssueCollectionIterator struct {
page IssueCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IssueCollectionIterator) Next() error {
+func (iter *IssueCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4273,6 +4878,13 @@ func (iter *IssueCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IssueCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IssueCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4292,6 +4904,11 @@ func (iter IssueCollectionIterator) Value() IssueContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IssueCollectionIterator type.
+func NewIssueCollectionIterator(page IssueCollectionPage) IssueCollectionIterator {
+ return IssueCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ic IssueCollection) IsEmpty() bool {
return ic.Value == nil || len(*ic.Value) == 0
@@ -4299,11 +4916,11 @@ func (ic IssueCollection) IsEmpty() bool {
// issueCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ic IssueCollection) issueCollectionPreparer() (*http.Request, error) {
+func (ic IssueCollection) issueCollectionPreparer(ctx context.Context) (*http.Request, error) {
if ic.NextLink == nil || len(to.String(ic.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ic.NextLink)))
@@ -4311,14 +4928,24 @@ func (ic IssueCollection) issueCollectionPreparer() (*http.Request, error) {
// IssueCollectionPage contains a page of IssueContract values.
type IssueCollectionPage struct {
- fn func(IssueCollection) (IssueCollection, error)
+ fn func(context.Context, IssueCollection) (IssueCollection, error)
ic IssueCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IssueCollectionPage) Next() error {
- next, err := page.fn(page.ic)
+func (page *IssueCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ic)
if err != nil {
return err
}
@@ -4326,6 +4953,13 @@ func (page *IssueCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IssueCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IssueCollectionPage) NotDone() bool {
return !page.ic.IsEmpty()
@@ -4344,6 +4978,11 @@ func (page IssueCollectionPage) Values() []IssueContract {
return *page.ic.Value
}
+// Creates a new instance of the IssueCollectionPage type.
+func NewIssueCollectionPage(getNextPage func(context.Context, IssueCollection) (IssueCollection, error)) IssueCollectionPage {
+ return IssueCollectionPage{fn: getNextPage}
+}
+
// IssueCommentCollection paged Issue Comment list representation.
type IssueCommentCollection struct {
autorest.Response `json:"-"`
@@ -4359,14 +4998,24 @@ type IssueCommentCollectionIterator struct {
page IssueCommentCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *IssueCommentCollectionIterator) Next() error {
+func (iter *IssueCommentCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4375,6 +5024,13 @@ func (iter *IssueCommentCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *IssueCommentCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter IssueCommentCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4394,6 +5050,11 @@ func (iter IssueCommentCollectionIterator) Value() IssueCommentContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the IssueCommentCollectionIterator type.
+func NewIssueCommentCollectionIterator(page IssueCommentCollectionPage) IssueCommentCollectionIterator {
+ return IssueCommentCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (icc IssueCommentCollection) IsEmpty() bool {
return icc.Value == nil || len(*icc.Value) == 0
@@ -4401,11 +5062,11 @@ func (icc IssueCommentCollection) IsEmpty() bool {
// issueCommentCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (icc IssueCommentCollection) issueCommentCollectionPreparer() (*http.Request, error) {
+func (icc IssueCommentCollection) issueCommentCollectionPreparer(ctx context.Context) (*http.Request, error) {
if icc.NextLink == nil || len(to.String(icc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(icc.NextLink)))
@@ -4413,14 +5074,24 @@ func (icc IssueCommentCollection) issueCommentCollectionPreparer() (*http.Reques
// IssueCommentCollectionPage contains a page of IssueCommentContract values.
type IssueCommentCollectionPage struct {
- fn func(IssueCommentCollection) (IssueCommentCollection, error)
+ fn func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)
icc IssueCommentCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *IssueCommentCollectionPage) Next() error {
- next, err := page.fn(page.icc)
+func (page *IssueCommentCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/IssueCommentCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.icc)
if err != nil {
return err
}
@@ -4428,6 +5099,13 @@ func (page *IssueCommentCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *IssueCommentCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page IssueCommentCollectionPage) NotDone() bool {
return !page.icc.IsEmpty()
@@ -4446,6 +5124,11 @@ func (page IssueCommentCollectionPage) Values() []IssueCommentContract {
return *page.icc.Value
}
+// Creates a new instance of the IssueCommentCollectionPage type.
+func NewIssueCommentCollectionPage(getNextPage func(context.Context, IssueCommentCollection) (IssueCommentCollection, error)) IssueCommentCollectionPage {
+ return IssueCommentCollectionPage{fn: getNextPage}
+}
+
// IssueCommentContract issue Comment Contract details.
type IssueCommentContract struct {
autorest.Response `json:"-"`
@@ -4620,18 +5303,83 @@ func (ic *IssueContract) UnmarshalJSON(body []byte) error {
return nil
}
+// IssueContractBaseProperties issue contract Base Properties.
+type IssueContractBaseProperties struct {
+ // CreatedDate - Date and time when the issue was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
+ State State `json:"state,omitempty"`
+ // APIID - A resource identifier for the API the issue was created for.
+ APIID *string `json:"apiId,omitempty"`
+}
+
// IssueContractProperties issue contract Properties.
type IssueContractProperties struct {
// Title - The issue title.
Title *string `json:"title,omitempty"`
// Description - Text describing the issue.
Description *string `json:"description,omitempty"`
+ // UserID - A resource identifier for the user created the issue.
+ UserID *string `json:"userId,omitempty"`
// CreatedDate - Date and time when the issue was created.
CreatedDate *date.Time `json:"createdDate,omitempty"`
// State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
State State `json:"state,omitempty"`
+ // APIID - A resource identifier for the API the issue was created for.
+ APIID *string `json:"apiId,omitempty"`
+}
+
+// IssueUpdateContract issue update Parameters.
+type IssueUpdateContract struct {
+ // IssueUpdateContractProperties - Issue entity Update contract properties.
+ *IssueUpdateContractProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for IssueUpdateContract.
+func (iuc IssueUpdateContract) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if iuc.IssueUpdateContractProperties != nil {
+ objectMap["properties"] = iuc.IssueUpdateContractProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for IssueUpdateContract struct.
+func (iuc *IssueUpdateContract) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var issueUpdateContractProperties IssueUpdateContractProperties
+ err = json.Unmarshal(*v, &issueUpdateContractProperties)
+ if err != nil {
+ return err
+ }
+ iuc.IssueUpdateContractProperties = &issueUpdateContractProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// IssueUpdateContractProperties issue contract Update Properties.
+type IssueUpdateContractProperties struct {
+ // Title - The issue title.
+ Title *string `json:"title,omitempty"`
+ // Description - Text describing the issue.
+ Description *string `json:"description,omitempty"`
// UserID - A resource identifier for the user created the issue.
UserID *string `json:"userId,omitempty"`
+ // CreatedDate - Date and time when the issue was created.
+ CreatedDate *date.Time `json:"createdDate,omitempty"`
+ // State - Status of the issue. Possible values include: 'Proposed', 'Open', 'Removed', 'Resolved', 'Closed'
+ State State `json:"state,omitempty"`
// APIID - A resource identifier for the API the issue was created for.
APIID *string `json:"apiId,omitempty"`
}
@@ -4659,14 +5407,24 @@ type LoggerCollectionIterator struct {
page LoggerCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *LoggerCollectionIterator) Next() error {
+func (iter *LoggerCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4675,6 +5433,13 @@ func (iter *LoggerCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *LoggerCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter LoggerCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4694,6 +5459,11 @@ func (iter LoggerCollectionIterator) Value() LoggerContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the LoggerCollectionIterator type.
+func NewLoggerCollectionIterator(page LoggerCollectionPage) LoggerCollectionIterator {
+ return LoggerCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lc LoggerCollection) IsEmpty() bool {
return lc.Value == nil || len(*lc.Value) == 0
@@ -4701,11 +5471,11 @@ func (lc LoggerCollection) IsEmpty() bool {
// loggerCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lc LoggerCollection) loggerCollectionPreparer() (*http.Request, error) {
+func (lc LoggerCollection) loggerCollectionPreparer(ctx context.Context) (*http.Request, error) {
if lc.NextLink == nil || len(to.String(lc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lc.NextLink)))
@@ -4713,14 +5483,24 @@ func (lc LoggerCollection) loggerCollectionPreparer() (*http.Request, error) {
// LoggerCollectionPage contains a page of LoggerContract values.
type LoggerCollectionPage struct {
- fn func(LoggerCollection) (LoggerCollection, error)
+ fn func(context.Context, LoggerCollection) (LoggerCollection, error)
lc LoggerCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *LoggerCollectionPage) Next() error {
- next, err := page.fn(page.lc)
+func (page *LoggerCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LoggerCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lc)
if err != nil {
return err
}
@@ -4728,6 +5508,13 @@ func (page *LoggerCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *LoggerCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page LoggerCollectionPage) NotDone() bool {
return !page.lc.IsEmpty()
@@ -4746,6 +5533,11 @@ func (page LoggerCollectionPage) Values() []LoggerContract {
return *page.lc.Value
}
+// Creates a new instance of the LoggerCollectionPage type.
+func NewLoggerCollectionPage(getNextPage func(context.Context, LoggerCollection) (LoggerCollection, error)) LoggerCollectionPage {
+ return LoggerCollectionPage{fn: getNextPage}
+}
+
// LoggerContract logger details.
type LoggerContract struct {
autorest.Response `json:"-"`
@@ -4828,8 +5620,9 @@ func (lc *LoggerContract) UnmarshalJSON(body []byte) error {
return nil
}
-// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use to log
-// API Management events. Currently the Logger entity supports logging API Management events to Azure Event Hubs.
+// LoggerContractProperties the Logger entity in API Management represents an event sink that you can use
+// to log API Management events. Currently the Logger entity supports logging API Management events to
+// Azure Event Hubs.
type LoggerContractProperties struct {
// LoggerType - Logger type. Possible values include: 'AzureEventHub', 'ApplicationInsights'
LoggerType LoggerType `json:"loggerType,omitempty"`
@@ -4966,14 +5759,24 @@ type NotificationCollectionIterator struct {
page NotificationCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *NotificationCollectionIterator) Next() error {
+func (iter *NotificationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4982,6 +5785,13 @@ func (iter *NotificationCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *NotificationCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter NotificationCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5001,6 +5811,11 @@ func (iter NotificationCollectionIterator) Value() NotificationContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the NotificationCollectionIterator type.
+func NewNotificationCollectionIterator(page NotificationCollectionPage) NotificationCollectionIterator {
+ return NotificationCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (nc NotificationCollection) IsEmpty() bool {
return nc.Value == nil || len(*nc.Value) == 0
@@ -5008,11 +5823,11 @@ func (nc NotificationCollection) IsEmpty() bool {
// notificationCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (nc NotificationCollection) notificationCollectionPreparer() (*http.Request, error) {
+func (nc NotificationCollection) notificationCollectionPreparer(ctx context.Context) (*http.Request, error) {
if nc.NextLink == nil || len(to.String(nc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(nc.NextLink)))
@@ -5020,14 +5835,24 @@ func (nc NotificationCollection) notificationCollectionPreparer() (*http.Request
// NotificationCollectionPage contains a page of NotificationContract values.
type NotificationCollectionPage struct {
- fn func(NotificationCollection) (NotificationCollection, error)
+ fn func(context.Context, NotificationCollection) (NotificationCollection, error)
nc NotificationCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *NotificationCollectionPage) Next() error {
- next, err := page.fn(page.nc)
+func (page *NotificationCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.nc)
if err != nil {
return err
}
@@ -5035,6 +5860,13 @@ func (page *NotificationCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *NotificationCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page NotificationCollectionPage) NotDone() bool {
return !page.nc.IsEmpty()
@@ -5053,6 +5885,11 @@ func (page NotificationCollectionPage) Values() []NotificationContract {
return *page.nc.Value
}
+// Creates a new instance of the NotificationCollectionPage type.
+func NewNotificationCollectionPage(getNextPage func(context.Context, NotificationCollection) (NotificationCollection, error)) NotificationCollectionPage {
+ return NotificationCollectionPage{fn: getNextPage}
+}
+
// NotificationContract notification details.
type NotificationContract struct {
autorest.Response `json:"-"`
@@ -5153,6 +5990,14 @@ type OAuth2AuthenticationSettingsContract struct {
Scope *string `json:"scope,omitempty"`
}
+// OpenIDAuthenticationSettingsContract API OAuth2 Authentication settings details.
+type OpenIDAuthenticationSettingsContract struct {
+ // OpenidProviderID - OAuth authorization server identifier.
+ OpenidProviderID *string `json:"openidProviderId,omitempty"`
+ // BearerTokenSendingMethods - How to send token to the server.
+ BearerTokenSendingMethods *[]BearerTokenSendingMethods `json:"bearerTokenSendingMethods,omitempty"`
+}
+
// OpenIDConnectProviderCollection paged OpenIdProviders list representation.
type OpenIDConnectProviderCollection struct {
autorest.Response `json:"-"`
@@ -5162,21 +6007,31 @@ type OpenIDConnectProviderCollection struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// OpenIDConnectProviderCollectionIterator provides access to a complete listing of OpenidConnectProviderContract
-// values.
+// OpenIDConnectProviderCollectionIterator provides access to a complete listing of
+// OpenidConnectProviderContract values.
type OpenIDConnectProviderCollectionIterator struct {
i int
page OpenIDConnectProviderCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
+func (iter *OpenIDConnectProviderCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5185,6 +6040,13 @@ func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OpenIDConnectProviderCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OpenIDConnectProviderCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5204,6 +6066,11 @@ func (iter OpenIDConnectProviderCollectionIterator) Value() OpenidConnectProvide
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OpenIDConnectProviderCollectionIterator type.
+func NewOpenIDConnectProviderCollectionIterator(page OpenIDConnectProviderCollectionPage) OpenIDConnectProviderCollectionIterator {
+ return OpenIDConnectProviderCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool {
return oicpc.Value == nil || len(*oicpc.Value) == 0
@@ -5211,11 +6078,11 @@ func (oicpc OpenIDConnectProviderCollection) IsEmpty() bool {
// openIDConnectProviderCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer() (*http.Request, error) {
+func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPreparer(ctx context.Context) (*http.Request, error) {
if oicpc.NextLink == nil || len(to.String(oicpc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(oicpc.NextLink)))
@@ -5223,14 +6090,24 @@ func (oicpc OpenIDConnectProviderCollection) openIDConnectProviderCollectionPrep
// OpenIDConnectProviderCollectionPage contains a page of OpenidConnectProviderContract values.
type OpenIDConnectProviderCollectionPage struct {
- fn func(OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)
+ fn func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)
oicpc OpenIDConnectProviderCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OpenIDConnectProviderCollectionPage) Next() error {
- next, err := page.fn(page.oicpc)
+func (page *OpenIDConnectProviderCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.oicpc)
if err != nil {
return err
}
@@ -5238,6 +6115,13 @@ func (page *OpenIDConnectProviderCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OpenIDConnectProviderCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OpenIDConnectProviderCollectionPage) NotDone() bool {
return !page.oicpc.IsEmpty()
@@ -5256,6 +6140,11 @@ func (page OpenIDConnectProviderCollectionPage) Values() []OpenidConnectProvider
return *page.oicpc.Value
}
+// Creates a new instance of the OpenIDConnectProviderCollectionPage type.
+func NewOpenIDConnectProviderCollectionPage(getNextPage func(context.Context, OpenIDConnectProviderCollection) (OpenIDConnectProviderCollection, error)) OpenIDConnectProviderCollectionPage {
+ return OpenIDConnectProviderCollectionPage{fn: getNextPage}
+}
+
// OpenidConnectProviderContract openId Connect Provider details.
type OpenidConnectProviderContract struct {
autorest.Response `json:"-"`
@@ -5433,14 +6322,24 @@ type OperationCollectionIterator struct {
page OperationCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationCollectionIterator) Next() error {
+func (iter *OperationCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5449,6 +6348,13 @@ func (iter *OperationCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5468,6 +6374,11 @@ func (iter OperationCollectionIterator) Value() OperationContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationCollectionIterator type.
+func NewOperationCollectionIterator(page OperationCollectionPage) OperationCollectionIterator {
+ return OperationCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (oc OperationCollection) IsEmpty() bool {
return oc.Value == nil || len(*oc.Value) == 0
@@ -5475,11 +6386,11 @@ func (oc OperationCollection) IsEmpty() bool {
// operationCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (oc OperationCollection) operationCollectionPreparer() (*http.Request, error) {
+func (oc OperationCollection) operationCollectionPreparer(ctx context.Context) (*http.Request, error) {
if oc.NextLink == nil || len(to.String(oc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(oc.NextLink)))
@@ -5487,14 +6398,24 @@ func (oc OperationCollection) operationCollectionPreparer() (*http.Request, erro
// OperationCollectionPage contains a page of OperationContract values.
type OperationCollectionPage struct {
- fn func(OperationCollection) (OperationCollection, error)
+ fn func(context.Context, OperationCollection) (OperationCollection, error)
oc OperationCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationCollectionPage) Next() error {
- next, err := page.fn(page.oc)
+func (page *OperationCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.oc)
if err != nil {
return err
}
@@ -5502,6 +6423,13 @@ func (page *OperationCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationCollectionPage) NotDone() bool {
return !page.oc.IsEmpty()
@@ -5520,6 +6448,11 @@ func (page OperationCollectionPage) Values() []OperationContract {
return *page.oc.Value
}
+// Creates a new instance of the OperationCollectionPage type.
+func NewOperationCollectionPage(getNextPage func(context.Context, OperationCollection) (OperationCollection, error)) OperationCollectionPage {
+ return OperationCollectionPage{fn: getNextPage}
+}
+
// OperationContract api Operation details.
type OperationContract struct {
autorest.Response `json:"-"`
@@ -5648,8 +6581,8 @@ type OperationEntityBaseContract struct {
Policies *string `json:"policies,omitempty"`
}
-// OperationListResult result of the request to list REST API operations. It contains a list of operations and a
-// URL nextLink to get the next set of results.
+// OperationListResult result of the request to list REST API operations. It contains a list of operations
+// and a URL nextLink to get the next set of results.
type OperationListResult struct {
autorest.Response `json:"-"`
// Value - List of operations supported by the resource provider.
@@ -5664,14 +6597,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -5680,6 +6623,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -5699,6 +6649,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -5706,11 +6661,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -5718,14 +6673,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -5733,6 +6698,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -5751,6 +6723,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationResultContract operation Result.
type OperationResultContract struct {
autorest.Response `json:"-"`
@@ -5875,7 +6852,7 @@ type ParameterContract struct {
Values *[]string `json:"values,omitempty"`
}
-// PipelineDiagnosticSettings diagnostic settings for incoming/outcoming HTTP messages to the Gateway.
+// PipelineDiagnosticSettings diagnostic settings for incoming/outgoing HTTP messages to the Gateway.
type PipelineDiagnosticSettings struct {
// Request - Diagnostic settings for request.
Request *HTTPMessageDiagnostic `json:"request,omitempty"`
@@ -6288,14 +7265,24 @@ type ProductCollectionIterator struct {
page ProductCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ProductCollectionIterator) Next() error {
+func (iter *ProductCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6304,6 +7291,13 @@ func (iter *ProductCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProductCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProductCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6323,6 +7317,11 @@ func (iter ProductCollectionIterator) Value() ProductContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ProductCollectionIterator type.
+func NewProductCollectionIterator(page ProductCollectionPage) ProductCollectionIterator {
+ return ProductCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pc ProductCollection) IsEmpty() bool {
return pc.Value == nil || len(*pc.Value) == 0
@@ -6330,11 +7329,11 @@ func (pc ProductCollection) IsEmpty() bool {
// productCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pc ProductCollection) productCollectionPreparer() (*http.Request, error) {
+func (pc ProductCollection) productCollectionPreparer(ctx context.Context) (*http.Request, error) {
if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pc.NextLink)))
@@ -6342,14 +7341,24 @@ func (pc ProductCollection) productCollectionPreparer() (*http.Request, error) {
// ProductCollectionPage contains a page of ProductContract values.
type ProductCollectionPage struct {
- fn func(ProductCollection) (ProductCollection, error)
+ fn func(context.Context, ProductCollection) (ProductCollection, error)
pc ProductCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ProductCollectionPage) Next() error {
- next, err := page.fn(page.pc)
+func (page *ProductCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pc)
if err != nil {
return err
}
@@ -6357,6 +7366,13 @@ func (page *ProductCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProductCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProductCollectionPage) NotDone() bool {
return !page.pc.IsEmpty()
@@ -6375,6 +7391,11 @@ func (page ProductCollectionPage) Values() []ProductContract {
return *page.pc.Value
}
+// Creates a new instance of the ProductCollectionPage type.
+func NewProductCollectionPage(getNextPage func(context.Context, ProductCollection) (ProductCollection, error)) ProductCollectionPage {
+ return ProductCollectionPage{fn: getNextPage}
+}
+
// ProductContract product details.
type ProductContract struct {
autorest.Response `json:"-"`
@@ -6583,14 +7604,24 @@ type PropertyCollectionIterator struct {
page PropertyCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *PropertyCollectionIterator) Next() error {
+func (iter *PropertyCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -6599,6 +7630,13 @@ func (iter *PropertyCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PropertyCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PropertyCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -6618,6 +7656,11 @@ func (iter PropertyCollectionIterator) Value() PropertyContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the PropertyCollectionIterator type.
+func NewPropertyCollectionIterator(page PropertyCollectionPage) PropertyCollectionIterator {
+ return PropertyCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pc PropertyCollection) IsEmpty() bool {
return pc.Value == nil || len(*pc.Value) == 0
@@ -6625,11 +7668,11 @@ func (pc PropertyCollection) IsEmpty() bool {
// propertyCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pc PropertyCollection) propertyCollectionPreparer() (*http.Request, error) {
+func (pc PropertyCollection) propertyCollectionPreparer(ctx context.Context) (*http.Request, error) {
if pc.NextLink == nil || len(to.String(pc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pc.NextLink)))
@@ -6637,14 +7680,24 @@ func (pc PropertyCollection) propertyCollectionPreparer() (*http.Request, error)
// PropertyCollectionPage contains a page of PropertyContract values.
type PropertyCollectionPage struct {
- fn func(PropertyCollection) (PropertyCollection, error)
+ fn func(context.Context, PropertyCollection) (PropertyCollection, error)
pc PropertyCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *PropertyCollectionPage) Next() error {
- next, err := page.fn(page.pc)
+func (page *PropertyCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pc)
if err != nil {
return err
}
@@ -6652,6 +7705,13 @@ func (page *PropertyCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PropertyCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PropertyCollectionPage) NotDone() bool {
return !page.pc.IsEmpty()
@@ -6670,6 +7730,11 @@ func (page PropertyCollectionPage) Values() []PropertyContract {
return *page.pc.Value
}
+// Creates a new instance of the PropertyCollectionPage type.
+func NewPropertyCollectionPage(getNextPage func(context.Context, PropertyCollection) (PropertyCollection, error)) PropertyCollectionPage {
+ return PropertyCollectionPage{fn: getNextPage}
+}
+
// PropertyContract property details.
type PropertyContract struct {
autorest.Response `json:"-"`
@@ -7125,14 +8190,24 @@ type RegionListResultIterator struct {
page RegionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RegionListResultIterator) Next() error {
+func (iter *RegionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7141,6 +8216,13 @@ func (iter *RegionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RegionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RegionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7160,6 +8242,11 @@ func (iter RegionListResultIterator) Value() RegionContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RegionListResultIterator type.
+func NewRegionListResultIterator(page RegionListResultPage) RegionListResultIterator {
+ return RegionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rlr RegionListResult) IsEmpty() bool {
return rlr.Value == nil || len(*rlr.Value) == 0
@@ -7167,11 +8254,11 @@ func (rlr RegionListResult) IsEmpty() bool {
// regionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rlr RegionListResult) regionListResultPreparer() (*http.Request, error) {
+func (rlr RegionListResult) regionListResultPreparer(ctx context.Context) (*http.Request, error) {
if rlr.NextLink == nil || len(to.String(rlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rlr.NextLink)))
@@ -7179,14 +8266,24 @@ func (rlr RegionListResult) regionListResultPreparer() (*http.Request, error) {
// RegionListResultPage contains a page of RegionContract values.
type RegionListResultPage struct {
- fn func(RegionListResult) (RegionListResult, error)
+ fn func(context.Context, RegionListResult) (RegionListResult, error)
rlr RegionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RegionListResultPage) Next() error {
- next, err := page.fn(page.rlr)
+func (page *RegionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rlr)
if err != nil {
return err
}
@@ -7194,6 +8291,13 @@ func (page *RegionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RegionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RegionListResultPage) NotDone() bool {
return !page.rlr.IsEmpty()
@@ -7212,6 +8316,11 @@ func (page RegionListResultPage) Values() []RegionContract {
return *page.rlr.Value
}
+// Creates a new instance of the RegionListResultPage type.
+func NewRegionListResultPage(getNextPage func(context.Context, RegionListResult) (RegionListResult, error)) RegionListResultPage {
+ return RegionListResultPage{fn: getNextPage}
+}
+
// RegistrationDelegationSettingsProperties user registration delegation settings properties.
type RegistrationDelegationSettingsProperties struct {
// Enabled - Enable or disable delegation for user registration.
@@ -7235,14 +8344,24 @@ type ReportCollectionIterator struct {
page ReportCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ReportCollectionIterator) Next() error {
+func (iter *ReportCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7251,6 +8370,13 @@ func (iter *ReportCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ReportCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ReportCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7270,6 +8396,11 @@ func (iter ReportCollectionIterator) Value() ReportRecordContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ReportCollectionIterator type.
+func NewReportCollectionIterator(page ReportCollectionPage) ReportCollectionIterator {
+ return ReportCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rc ReportCollection) IsEmpty() bool {
return rc.Value == nil || len(*rc.Value) == 0
@@ -7277,11 +8408,11 @@ func (rc ReportCollection) IsEmpty() bool {
// reportCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rc ReportCollection) reportCollectionPreparer() (*http.Request, error) {
+func (rc ReportCollection) reportCollectionPreparer(ctx context.Context) (*http.Request, error) {
if rc.NextLink == nil || len(to.String(rc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rc.NextLink)))
@@ -7289,14 +8420,24 @@ func (rc ReportCollection) reportCollectionPreparer() (*http.Request, error) {
// ReportCollectionPage contains a page of ReportRecordContract values.
type ReportCollectionPage struct {
- fn func(ReportCollection) (ReportCollection, error)
+ fn func(context.Context, ReportCollection) (ReportCollection, error)
rc ReportCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ReportCollectionPage) Next() error {
- next, err := page.fn(page.rc)
+func (page *ReportCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rc)
if err != nil {
return err
}
@@ -7304,6 +8445,13 @@ func (page *ReportCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ReportCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ReportCollectionPage) NotDone() bool {
return !page.rc.IsEmpty()
@@ -7322,13 +8470,18 @@ func (page ReportCollectionPage) Values() []ReportRecordContract {
return *page.rc.Value
}
+// Creates a new instance of the ReportCollectionPage type.
+func NewReportCollectionPage(getNextPage func(context.Context, ReportCollection) (ReportCollection, error)) ReportCollectionPage {
+ return ReportCollectionPage{fn: getNextPage}
+}
+
// ReportRecordContract report data.
type ReportRecordContract struct {
// Name - Name depending on report endpoint specifies product, API, operation or developer name.
Name *string `json:"name,omitempty"`
// Timestamp - Start of aggregation period. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
Timestamp *date.Time `json:"timestamp,omitempty"`
- // Interval - Length of agregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
+ // Interval - Length of aggregation period. Interval must be multiple of 15 minutes and may not be zero. The value should be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).
Interval *string `json:"interval,omitempty"`
// Country - Country to which this record data is related.
Country *string `json:"country,omitempty"`
@@ -7348,9 +8501,9 @@ type ReportRecordContract struct {
APIRegion *string `json:"apiRegion,omitempty"`
// SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
SubscriptionID *string `json:"subscriptionId,omitempty"`
- // CallCountSuccess - Number of succesful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
+ // CallCountSuccess - Number of successful calls. This includes calls returning HttpStatusCode <= 301 and HttpStatusCode.NotModified and HttpStatusCode.TemporaryRedirect
CallCountSuccess *int32 `json:"callCountSuccess,omitempty"`
- // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorize and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
+ // CallCountBlocked - Number of calls blocked due to invalid credentials. This includes calls returning HttpStatusCode.Unauthorized and HttpStatusCode.Forbidden and HttpStatusCode.TooManyRequests
CallCountBlocked *int32 `json:"callCountBlocked,omitempty"`
// CallCountFailed - Number of calls failed due to proxy or backend errors. This includes calls returning HttpStatusCode.BadRequest(400) and any Code between HttpStatusCode.InternalServerError (500) and 600
CallCountFailed *int32 `json:"callCountFailed,omitempty"`
@@ -7404,63 +8557,237 @@ type RequestContract struct {
Representations *[]RepresentationContract `json:"representations,omitempty"`
}
-// RequestReportCollection paged Report records list representation.
-type RequestReportCollection struct {
- autorest.Response `json:"-"`
- // Value - Page values.
- Value *[]RequestReportRecordContract `json:"value,omitempty"`
- // Count - Total record count number across all pages.
- Count *int64 `json:"count,omitempty"`
+// RequestReportCollection paged Report records list representation.
+type RequestReportCollection struct {
+ autorest.Response `json:"-"`
+ // Value - Page values.
+ Value *[]RequestReportRecordContract `json:"value,omitempty"`
+ // Count - Total record count number across all pages.
+ Count *int64 `json:"count,omitempty"`
+}
+
+// RequestReportRecordContract request Report data.
+type RequestReportRecordContract struct {
+ // APIID - API identifier path. /apis/{apiId}
+ APIID *string `json:"apiId,omitempty"`
+ // OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
+ OperationID *string `json:"operationId,omitempty"`
+ // ProductID - Product identifier path. /products/{productId}
+ ProductID *string `json:"productId,omitempty"`
+ // UserID - User identifier path. /users/{userId}
+ UserID *string `json:"userId,omitempty"`
+ // Method - The HTTP method associated with this request..
+ Method *string `json:"method,omitempty"`
+ // URL - The full URL associated with this request.
+ URL *string `json:"url,omitempty"`
+ // IPAddress - The client IP address associated with this request.
+ IPAddress *string `json:"ipAddress,omitempty"`
+ // BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend.
+ BackendResponseCode *string `json:"backendResponseCode,omitempty"`
+ // ResponseCode - The HTTP status code returned by the gateway.
+ ResponseCode *int32 `json:"responseCode,omitempty"`
+ // ResponseSize - The size of the response returned by the gateway.
+ ResponseSize *int32 `json:"responseSize,omitempty"`
+ // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format.
+ Timestamp *date.Time `json:"timestamp,omitempty"`
+ // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fulfilled by the backend.
+ Cache *string `json:"cache,omitempty"`
+ // APITime - The total time it took to process this request.
+ APITime *float64 `json:"apiTime,omitempty"`
+ // ServiceTime - he time it took to forward this request to the backend and get the response back.
+ ServiceTime *float64 `json:"serviceTime,omitempty"`
+ // APIRegion - Azure region where the gateway that processed this request is located.
+ APIRegion *string `json:"apiRegion,omitempty"`
+ // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
+ SubscriptionID *string `json:"subscriptionId,omitempty"`
+ // RequestID - Request Identifier.
+ RequestID *string `json:"requestId,omitempty"`
+ // RequestSize - The size of this request..
+ RequestSize *int32 `json:"requestSize,omitempty"`
+}
+
+// Resource the Resource definition.
+type Resource struct {
+ // ID - Resource ID.
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type for API Management resource.
+ Type *string `json:"type,omitempty"`
+}
+
+// ResourceSku describes an available API Management SKU.
+type ResourceSku struct {
+ // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
+ Name SkuType `json:"name,omitempty"`
+}
+
+// ResourceSkuCapacity describes scaling information of a SKU.
+type ResourceSkuCapacity struct {
+ // Minimum - The minimum capacity.
+ Minimum *int32 `json:"minimum,omitempty"`
+ // Maximum - The maximum capacity that can be set.
+ Maximum *int32 `json:"maximum,omitempty"`
+ // Default - The default capacity.
+ Default *int32 `json:"default,omitempty"`
+ // ScaleType - The scale type applicable to the sku. Possible values include: 'Automatic', 'Manual', 'None'
+ ScaleType ResourceSkuCapacityScaleType `json:"scaleType,omitempty"`
+}
+
+// ResourceSkuResult describes an available API Management service SKU.
+type ResourceSkuResult struct {
+ // ResourceType - The type of resource the SKU applies to.
+ ResourceType *string `json:"resourceType,omitempty"`
+ // Sku - Specifies API Management SKU.
+ Sku *ResourceSku `json:"sku,omitempty"`
+ // Capacity - Specifies the number of API Management units.
+ Capacity *ResourceSkuCapacity `json:"capacity,omitempty"`
+}
+
+// ResourceSkuResults the API Management service SKUs operation response.
+type ResourceSkuResults struct {
+ autorest.Response `json:"-"`
+ // Value - The list of skus available for the service.
+ Value *[]ResourceSkuResult `json:"value,omitempty"`
+ // NextLink - The uri to fetch the next page of API Management service Skus.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// ResourceSkuResultsIterator provides access to a complete listing of ResourceSkuResult values.
+type ResourceSkuResultsIterator struct {
+ i int
+ page ResourceSkuResultsPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *ResourceSkuResultsIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceSkuResultsIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter ResourceSkuResultsIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter ResourceSkuResultsIterator) Response() ResourceSkuResults {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter ResourceSkuResultsIterator) Value() ResourceSkuResult {
+ if !iter.page.NotDone() {
+ return ResourceSkuResult{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the ResourceSkuResultsIterator type.
+func NewResourceSkuResultsIterator(page ResourceSkuResultsPage) ResourceSkuResultsIterator {
+ return ResourceSkuResultsIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (rsr ResourceSkuResults) IsEmpty() bool {
+ return rsr.Value == nil || len(*rsr.Value) == 0
+}
+
+// resourceSkuResultsPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (rsr ResourceSkuResults) resourceSkuResultsPreparer(ctx context.Context) (*http.Request, error) {
+ if rsr.NextLink == nil || len(to.String(rsr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(rsr.NextLink)))
+}
+
+// ResourceSkuResultsPage contains a page of ResourceSkuResult values.
+type ResourceSkuResultsPage struct {
+ fn func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)
+ rsr ResourceSkuResults
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *ResourceSkuResultsPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceSkuResultsPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rsr)
+ if err != nil {
+ return err
+ }
+ page.rsr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceSkuResultsPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page ResourceSkuResultsPage) NotDone() bool {
+ return !page.rsr.IsEmpty()
}
-// RequestReportRecordContract request Report data.
-type RequestReportRecordContract struct {
- // APIID - API identifier path. /apis/{apiId}
- APIID *string `json:"apiId,omitempty"`
- // OperationID - Operation identifier path. /apis/{apiId}/operations/{operationId}
- OperationID *string `json:"operationId,omitempty"`
- // ProductID - Product identifier path. /products/{productId}
- ProductID *string `json:"productId,omitempty"`
- // UserID - User identifier path. /users/{userId}
- UserID *string `json:"userId,omitempty"`
- // Method - The HTTP method associated with this request..
- Method *string `json:"method,omitempty"`
- // URL - The full URL associated with this request.
- URL *string `json:"url,omitempty"`
- // IPAddress - The client IP address associated with this request.
- IPAddress *string `json:"ipAddress,omitempty"`
- // BackendResponseCode - The HTTP status code received by the gateway as a result of forwarding this request to the backend.
- BackendResponseCode *string `json:"backendResponseCode,omitempty"`
- // ResponseCode - The HTTP status code returned by the gateway.
- ResponseCode *int32 `json:"responseCode,omitempty"`
- // ResponseSize - The size of the response returned by the gateway.
- ResponseSize *int32 `json:"responseSize,omitempty"`
- // Timestamp - The date and time when this request was received by the gateway in ISO 8601 format.
- Timestamp *date.Time `json:"timestamp,omitempty"`
- // Cache - Specifies if response cache was involved in generating the response. If the value is none, the cache was not used. If the value is hit, cached response was returned. If the value is miss, the cache was used but lookup resulted in a miss and request was fullfilled by the backend.
- Cache *string `json:"cache,omitempty"`
- // APITime - The total time it took to process this request.
- APITime *float64 `json:"apiTime,omitempty"`
- // ServiceTime - he time it took to forward this request to the backend and get the response back.
- ServiceTime *float64 `json:"serviceTime,omitempty"`
- // APIRegion - Azure region where the gateway that processed this request is located.
- APIRegion *string `json:"apiRegion,omitempty"`
- // SubscriptionID - Subscription identifier path. /subscriptions/{subscriptionId}
- SubscriptionID *string `json:"subscriptionId,omitempty"`
- // RequestID - Request Identifier.
- RequestID *string `json:"requestId,omitempty"`
- // RequestSize - The size of this request..
- RequestSize *int32 `json:"requestSize,omitempty"`
+// Response returns the raw server response from the last page request.
+func (page ResourceSkuResultsPage) Response() ResourceSkuResults {
+ return page.rsr
}
-// Resource the Resource definition.
-type Resource struct {
- // ID - Resource ID.
- ID *string `json:"id,omitempty"`
- // Name - Resource name.
- Name *string `json:"name,omitempty"`
- // Type - Resource type for API Management resource.
- Type *string `json:"type,omitempty"`
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page ResourceSkuResultsPage) Values() []ResourceSkuResult {
+ if page.rsr.IsEmpty() {
+ return nil
+ }
+ return *page.rsr.Value
+}
+
+// Creates a new instance of the ResourceSkuResultsPage type.
+func NewResourceSkuResultsPage(getNextPage func(context.Context, ResourceSkuResults) (ResourceSkuResults, error)) ResourceSkuResultsPage {
+ return ResourceSkuResultsPage{fn: getNextPage}
}
// ResponseContract operation response details.
@@ -7506,14 +8833,24 @@ type SchemaCollectionIterator struct {
page SchemaCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SchemaCollectionIterator) Next() error {
+func (iter *SchemaCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7522,6 +8859,13 @@ func (iter *SchemaCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SchemaCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SchemaCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -7541,6 +8885,11 @@ func (iter SchemaCollectionIterator) Value() SchemaContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SchemaCollectionIterator type.
+func NewSchemaCollectionIterator(page SchemaCollectionPage) SchemaCollectionIterator {
+ return SchemaCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sc SchemaCollection) IsEmpty() bool {
return sc.Value == nil || len(*sc.Value) == 0
@@ -7548,11 +8897,11 @@ func (sc SchemaCollection) IsEmpty() bool {
// schemaCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sc SchemaCollection) schemaCollectionPreparer() (*http.Request, error) {
+func (sc SchemaCollection) schemaCollectionPreparer(ctx context.Context) (*http.Request, error) {
if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sc.NextLink)))
@@ -7560,14 +8909,24 @@ func (sc SchemaCollection) schemaCollectionPreparer() (*http.Request, error) {
// SchemaCollectionPage contains a page of SchemaContract values.
type SchemaCollectionPage struct {
- fn func(SchemaCollection) (SchemaCollection, error)
+ fn func(context.Context, SchemaCollection) (SchemaCollection, error)
sc SchemaCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SchemaCollectionPage) Next() error {
- next, err := page.fn(page.sc)
+func (page *SchemaCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SchemaCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sc)
if err != nil {
return err
}
@@ -7575,6 +8934,13 @@ func (page *SchemaCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SchemaCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SchemaCollectionPage) NotDone() bool {
return !page.sc.IsEmpty()
@@ -7593,6 +8959,11 @@ func (page SchemaCollectionPage) Values() []SchemaContract {
return *page.sc.Value
}
+// Creates a new instance of the SchemaCollectionPage type.
+func NewSchemaCollectionPage(getNextPage func(context.Context, SchemaCollection) (SchemaCollection, error)) SchemaCollectionPage {
+ return SchemaCollectionPage{fn: getNextPage}
+}
+
// SchemaContract schema Contract details.
type SchemaContract struct {
autorest.Response `json:"-"`
@@ -7734,14 +9105,15 @@ type SchemaDocumentProperties struct {
Value *string `json:"value,omitempty"`
}
-// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration operation.
+// ServiceApplyNetworkConfigurationParameters parameter supplied to the Apply Network configuration
+// operation.
type ServiceApplyNetworkConfigurationParameters struct {
// Location - Location of the Api Management service to update for a multi-region service. For a service deployed in a single region, this parameter is not required.
Location *string `json:"location,omitempty"`
}
-// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServiceApplyNetworkConfigurationUpdatesFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ServiceApplyNetworkConfigurationUpdatesFuture struct {
azure.Future
}
@@ -7769,7 +9141,8 @@ func (future *ServiceApplyNetworkConfigurationUpdatesFuture) Result(client Servi
return
}
-// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServiceBackupFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServiceBackupFuture struct {
azure.Future
}
@@ -7797,7 +9170,8 @@ func (future *ServiceBackupFuture) Result(client ServiceClient) (sr ServiceResou
return
}
-// ServiceBackupRestoreParameters parameters supplied to the Backup/Restore of an API Management service operation.
+// ServiceBackupRestoreParameters parameters supplied to the Backup/Restore of an API Management service
+// operation.
type ServiceBackupRestoreParameters struct {
// StorageAccount - Azure Cloud Storage account (used to place/retrieve the backup) name.
StorageAccount *string `json:"storageAccount,omitempty"`
@@ -7843,7 +9217,7 @@ type ServiceBaseProperties struct {
CustomProperties map[string]*string `json:"customProperties"`
// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
- // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
+ // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
}
@@ -7971,14 +9345,24 @@ type ServiceListResultIterator struct {
page ServiceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ServiceListResultIterator) Next() error {
+func (iter *ServiceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -7987,6 +9371,13 @@ func (iter *ServiceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ServiceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ServiceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -8006,6 +9397,11 @@ func (iter ServiceListResultIterator) Value() ServiceResource {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ServiceListResultIterator type.
+func NewServiceListResultIterator(page ServiceListResultPage) ServiceListResultIterator {
+ return ServiceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (slr ServiceListResult) IsEmpty() bool {
return slr.Value == nil || len(*slr.Value) == 0
@@ -8013,11 +9409,11 @@ func (slr ServiceListResult) IsEmpty() bool {
// serviceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (slr ServiceListResult) serviceListResultPreparer() (*http.Request, error) {
+func (slr ServiceListResult) serviceListResultPreparer(ctx context.Context) (*http.Request, error) {
if slr.NextLink == nil || len(to.String(slr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(slr.NextLink)))
@@ -8025,14 +9421,24 @@ func (slr ServiceListResult) serviceListResultPreparer() (*http.Request, error)
// ServiceListResultPage contains a page of ServiceResource values.
type ServiceListResultPage struct {
- fn func(ServiceListResult) (ServiceListResult, error)
+ fn func(context.Context, ServiceListResult) (ServiceListResult, error)
slr ServiceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ServiceListResultPage) Next() error {
- next, err := page.fn(page.slr)
+func (page *ServiceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.slr)
if err != nil {
return err
}
@@ -8040,6 +9446,13 @@ func (page *ServiceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ServiceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ServiceListResultPage) NotDone() bool {
return !page.slr.IsEmpty()
@@ -8058,6 +9471,11 @@ func (page ServiceListResultPage) Values() []ServiceResource {
return *page.slr.Value
}
+// Creates a new instance of the ServiceListResultPage type.
+func NewServiceListResultPage(getNextPage func(context.Context, ServiceListResult) (ServiceListResult, error)) ServiceListResultPage {
+ return ServiceListResultPage{fn: getNextPage}
+}
+
// ServiceNameAvailabilityResult response of the CheckNameAvailability operation.
type ServiceNameAvailabilityResult struct {
autorest.Response `json:"-"`
@@ -8107,7 +9525,7 @@ type ServiceProperties struct {
CustomProperties map[string]*string `json:"customProperties"`
// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
- // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
+ // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
}
@@ -8326,7 +9744,8 @@ func (sr *ServiceResource) UnmarshalJSON(body []byte) error {
return nil
}
-// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServiceRestoreFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServiceRestoreFuture struct {
azure.Future
}
@@ -8356,13 +9775,14 @@ func (future *ServiceRestoreFuture) Result(client ServiceClient) (sr ServiceReso
// ServiceSkuProperties API Management service resource SKU properties.
type ServiceSkuProperties struct {
- // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic'
+ // Name - Name of the Sku. Possible values include: 'SkuTypeDeveloper', 'SkuTypeStandard', 'SkuTypePremium', 'SkuTypeBasic', 'SkuTypeConsumption'
Name SkuType `json:"name,omitempty"`
// Capacity - Capacity of the SKU (number of deployed units of the SKU). The default value is 1.
Capacity *int32 `json:"capacity,omitempty"`
}
-// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServiceUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServiceUpdateFuture struct {
azure.Future
}
@@ -8602,7 +10022,7 @@ type ServiceUpdateProperties struct {
CustomProperties map[string]*string `json:"customProperties"`
// Certificates - List of Certificates that need to be installed in the API Management service. Max supported certificates that can be installed is 10.
Certificates *[]CertificateConfiguration `json:"certificates,omitempty"`
- // VirtualNetworkType - The type of VPN in which API Managemet service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
+ // VirtualNetworkType - The type of VPN in which API Management service needs to be configured in. None (Default Value) means the API Management service is not part of any Virtual Network, External means the API Management deployment is set up inside a Virtual Network having an Internet Facing Endpoint, and Internal means that API Management deployment is setup inside a Virtual Network having an Intranet Facing Endpoint only. Possible values include: 'VirtualNetworkTypeNone', 'VirtualNetworkTypeExternal', 'VirtualNetworkTypeInternal'
VirtualNetworkType VirtualNetworkType `json:"virtualNetworkType,omitempty"`
}
@@ -8669,8 +10089,8 @@ func (sup ServiceUpdateProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// ServiceUploadCertificateParameters parameters supplied to the Upload SSL certificate for an API Management
-// service operation.
+// ServiceUploadCertificateParameters parameters supplied to the Upload SSL certificate for an API
+// Management service operation.
type ServiceUploadCertificateParameters struct {
// Type - Hostname type. Possible values include: 'Proxy', 'Portal', 'Management', 'Scm'
Type HostnameType `json:"type,omitempty"`
@@ -8695,14 +10115,24 @@ type SubscriptionCollectionIterator struct {
page SubscriptionCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SubscriptionCollectionIterator) Next() error {
+func (iter *SubscriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -8711,6 +10141,13 @@ func (iter *SubscriptionCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SubscriptionCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SubscriptionCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -8730,6 +10167,11 @@ func (iter SubscriptionCollectionIterator) Value() SubscriptionContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SubscriptionCollectionIterator type.
+func NewSubscriptionCollectionIterator(page SubscriptionCollectionPage) SubscriptionCollectionIterator {
+ return SubscriptionCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sc SubscriptionCollection) IsEmpty() bool {
return sc.Value == nil || len(*sc.Value) == 0
@@ -8737,11 +10179,11 @@ func (sc SubscriptionCollection) IsEmpty() bool {
// subscriptionCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sc SubscriptionCollection) subscriptionCollectionPreparer() (*http.Request, error) {
+func (sc SubscriptionCollection) subscriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
if sc.NextLink == nil || len(to.String(sc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sc.NextLink)))
@@ -8749,14 +10191,24 @@ func (sc SubscriptionCollection) subscriptionCollectionPreparer() (*http.Request
// SubscriptionCollectionPage contains a page of SubscriptionContract values.
type SubscriptionCollectionPage struct {
- fn func(SubscriptionCollection) (SubscriptionCollection, error)
+ fn func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)
sc SubscriptionCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SubscriptionCollectionPage) Next() error {
- next, err := page.fn(page.sc)
+func (page *SubscriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sc)
if err != nil {
return err
}
@@ -8764,6 +10216,13 @@ func (page *SubscriptionCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SubscriptionCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SubscriptionCollectionPage) NotDone() bool {
return !page.sc.IsEmpty()
@@ -8782,6 +10241,11 @@ func (page SubscriptionCollectionPage) Values() []SubscriptionContract {
return *page.sc.Value
}
+// Creates a new instance of the SubscriptionCollectionPage type.
+func NewSubscriptionCollectionPage(getNextPage func(context.Context, SubscriptionCollection) (SubscriptionCollection, error)) SubscriptionCollectionPage {
+ return SubscriptionCollectionPage{fn: getNextPage}
+}
+
// SubscriptionContract subscription details.
type SubscriptionContract struct {
autorest.Response `json:"-"`
@@ -8866,10 +10330,10 @@ func (sc *SubscriptionContract) UnmarshalJSON(body []byte) error {
// SubscriptionContractProperties subscription details.
type SubscriptionContractProperties struct {
- // UserID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier.
- UserID *string `json:"userId,omitempty"`
- // ProductID - The product resource identifier of the subscribed product. The value is a valid relative URL in the format of /products/{productId} where {productId} is a product identifier.
- ProductID *string `json:"productId,omitempty"`
+ // OwnerID - The user resource identifier of the subscription owner. The value is a valid relative URL in the format of /users/{uid} where {uid} is a user identifier.
+ OwnerID *string `json:"ownerId,omitempty"`
+ // Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
+ Scope *string `json:"scope,omitempty"`
// DisplayName - The name of the subscription, or null if the subscription has no name.
DisplayName *string `json:"displayName,omitempty"`
// State - Subscription state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
@@ -8890,14 +10354,16 @@ type SubscriptionContractProperties struct {
SecondaryKey *string `json:"secondaryKey,omitempty"`
// StateComment - Optional subscription comment added by an administrator.
StateComment *string `json:"stateComment,omitempty"`
+ // AllowTracing - Determines whether tracing is enabled
+ AllowTracing *bool `json:"allowTracing,omitempty"`
}
// SubscriptionCreateParameterProperties parameters supplied to the Create subscription operation.
type SubscriptionCreateParameterProperties struct {
- // UserID - User (user id path) for whom subscription is being created in form /users/{uid}
- UserID *string `json:"userId,omitempty"`
- // ProductID - Product (product id path) for which subscription is being created in form /products/{productid}
- ProductID *string `json:"productId,omitempty"`
+ // OwnerID - User (user id path) for whom subscription is being created in form /users/{uid}
+ OwnerID *string `json:"ownerId,omitempty"`
+ // Scope - Scope like /products/{productId} or /apis or /apis/{apiId}.
+ Scope *string `json:"scope,omitempty"`
// DisplayName - Subscription name.
DisplayName *string `json:"displayName,omitempty"`
// PrimaryKey - Primary subscription key. If not specified during request key will be generated automatically.
@@ -8906,6 +10372,8 @@ type SubscriptionCreateParameterProperties struct {
SecondaryKey *string `json:"secondaryKey,omitempty"`
// State - Initial subscription state. If no value is specified, subscription is created with Submitted state. Possible states are * active – the subscription is active, * suspended – the subscription is blocked, and the subscriber cannot call any APIs of the product, * submitted – the subscription request has been made by the developer, but has not yet been approved or rejected, * rejected – the subscription request has been denied by an administrator, * cancelled – the subscription has been cancelled by the developer or administrator, * expired – the subscription reached its expiration date and was deactivated. Possible values include: 'Suspended', 'Active', 'Expired', 'Submitted', 'Rejected', 'Cancelled'
State SubscriptionState `json:"state,omitempty"`
+ // AllowTracing - Determines whether tracing can be enabled
+ AllowTracing *bool `json:"allowTracing,omitempty"`
}
// SubscriptionCreateParameters subscription create details.
@@ -8963,10 +10431,10 @@ type SubscriptionsDelegationSettingsProperties struct {
// SubscriptionUpdateParameterProperties parameters supplied to the Update subscription operation.
type SubscriptionUpdateParameterProperties struct {
- // UserID - User identifier path: /users/{uid}
- UserID *string `json:"userId,omitempty"`
- // ProductID - Product identifier path: /products/{productId}
- ProductID *string `json:"productId,omitempty"`
+ // OwnerID - User identifier path: /users/{uid}
+ OwnerID *string `json:"ownerId,omitempty"`
+ // Scope - Scope like /products/{productId} or /apis or /apis/{apiId}
+ Scope *string `json:"scope,omitempty"`
// ExpirationDate - Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by using the `state` property. The date conforms to the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard.
ExpirationDate *date.Time `json:"expirationDate,omitempty"`
// DisplayName - Subscription name.
@@ -8979,6 +10447,8 @@ type SubscriptionUpdateParameterProperties struct {
State SubscriptionState `json:"state,omitempty"`
// StateComment - Comments describing subscription state change by the administrator.
StateComment *string `json:"stateComment,omitempty"`
+ // AllowTracing - Determines whether tracing can be enabled
+ AllowTracing *bool `json:"allowTracing,omitempty"`
}
// SubscriptionUpdateParameters subscription update details.
@@ -9035,14 +10505,24 @@ type TagCollectionIterator struct {
page TagCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TagCollectionIterator) Next() error {
+func (iter *TagCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9051,6 +10531,13 @@ func (iter *TagCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TagCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TagCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9070,6 +10557,11 @@ func (iter TagCollectionIterator) Value() TagContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TagCollectionIterator type.
+func NewTagCollectionIterator(page TagCollectionPage) TagCollectionIterator {
+ return TagCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (tc TagCollection) IsEmpty() bool {
return tc.Value == nil || len(*tc.Value) == 0
@@ -9077,11 +10569,11 @@ func (tc TagCollection) IsEmpty() bool {
// tagCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (tc TagCollection) tagCollectionPreparer() (*http.Request, error) {
+func (tc TagCollection) tagCollectionPreparer(ctx context.Context) (*http.Request, error) {
if tc.NextLink == nil || len(to.String(tc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(tc.NextLink)))
@@ -9089,14 +10581,24 @@ func (tc TagCollection) tagCollectionPreparer() (*http.Request, error) {
// TagCollectionPage contains a page of TagContract values.
type TagCollectionPage struct {
- fn func(TagCollection) (TagCollection, error)
+ fn func(context.Context, TagCollection) (TagCollection, error)
tc TagCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TagCollectionPage) Next() error {
- next, err := page.fn(page.tc)
+func (page *TagCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tc)
if err != nil {
return err
}
@@ -9104,6 +10606,13 @@ func (page *TagCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TagCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TagCollectionPage) NotDone() bool {
return !page.tc.IsEmpty()
@@ -9122,6 +10631,11 @@ func (page TagCollectionPage) Values() []TagContract {
return *page.tc.Value
}
+// Creates a new instance of the TagCollectionPage type.
+func NewTagCollectionPage(getNextPage func(context.Context, TagCollection) (TagCollection, error)) TagCollectionPage {
+ return TagCollectionPage{fn: getNextPage}
+}
+
// TagContract tag Contract details.
type TagContract struct {
autorest.Response `json:"-"`
@@ -9274,14 +10788,24 @@ type TagDescriptionCollectionIterator struct {
page TagDescriptionCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TagDescriptionCollectionIterator) Next() error {
+func (iter *TagDescriptionCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9290,6 +10814,13 @@ func (iter *TagDescriptionCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TagDescriptionCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TagDescriptionCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9309,6 +10840,11 @@ func (iter TagDescriptionCollectionIterator) Value() TagDescriptionContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TagDescriptionCollectionIterator type.
+func NewTagDescriptionCollectionIterator(page TagDescriptionCollectionPage) TagDescriptionCollectionIterator {
+ return TagDescriptionCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (tdc TagDescriptionCollection) IsEmpty() bool {
return tdc.Value == nil || len(*tdc.Value) == 0
@@ -9316,11 +10852,11 @@ func (tdc TagDescriptionCollection) IsEmpty() bool {
// tagDescriptionCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer() (*http.Request, error) {
+func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer(ctx context.Context) (*http.Request, error) {
if tdc.NextLink == nil || len(to.String(tdc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(tdc.NextLink)))
@@ -9328,14 +10864,24 @@ func (tdc TagDescriptionCollection) tagDescriptionCollectionPreparer() (*http.Re
// TagDescriptionCollectionPage contains a page of TagDescriptionContract values.
type TagDescriptionCollectionPage struct {
- fn func(TagDescriptionCollection) (TagDescriptionCollection, error)
+ fn func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)
tdc TagDescriptionCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TagDescriptionCollectionPage) Next() error {
- next, err := page.fn(page.tdc)
+func (page *TagDescriptionCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tdc)
if err != nil {
return err
}
@@ -9343,6 +10889,13 @@ func (page *TagDescriptionCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TagDescriptionCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TagDescriptionCollectionPage) NotDone() bool {
return !page.tdc.IsEmpty()
@@ -9361,6 +10914,11 @@ func (page TagDescriptionCollectionPage) Values() []TagDescriptionContract {
return *page.tdc.Value
}
+// Creates a new instance of the TagDescriptionCollectionPage type.
+func NewTagDescriptionCollectionPage(getNextPage func(context.Context, TagDescriptionCollection) (TagDescriptionCollection, error)) TagDescriptionCollectionPage {
+ return TagDescriptionCollectionPage{fn: getNextPage}
+}
+
// TagDescriptionContract contract details.
type TagDescriptionContract struct {
autorest.Response `json:"-"`
@@ -9511,14 +11069,24 @@ type TagResourceCollectionIterator struct {
page TagResourceCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TagResourceCollectionIterator) Next() error {
+func (iter *TagResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9527,6 +11095,13 @@ func (iter *TagResourceCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TagResourceCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TagResourceCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9546,6 +11121,11 @@ func (iter TagResourceCollectionIterator) Value() TagResourceContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TagResourceCollectionIterator type.
+func NewTagResourceCollectionIterator(page TagResourceCollectionPage) TagResourceCollectionIterator {
+ return TagResourceCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (trc TagResourceCollection) IsEmpty() bool {
return trc.Value == nil || len(*trc.Value) == 0
@@ -9553,11 +11133,11 @@ func (trc TagResourceCollection) IsEmpty() bool {
// tagResourceCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (trc TagResourceCollection) tagResourceCollectionPreparer() (*http.Request, error) {
+func (trc TagResourceCollection) tagResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
if trc.NextLink == nil || len(to.String(trc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(trc.NextLink)))
@@ -9565,14 +11145,24 @@ func (trc TagResourceCollection) tagResourceCollectionPreparer() (*http.Request,
// TagResourceCollectionPage contains a page of TagResourceContract values.
type TagResourceCollectionPage struct {
- fn func(TagResourceCollection) (TagResourceCollection, error)
+ fn func(context.Context, TagResourceCollection) (TagResourceCollection, error)
trc TagResourceCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TagResourceCollectionPage) Next() error {
- next, err := page.fn(page.trc)
+func (page *TagResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.trc)
if err != nil {
return err
}
@@ -9580,6 +11170,13 @@ func (page *TagResourceCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TagResourceCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TagResourceCollectionPage) NotDone() bool {
return !page.trc.IsEmpty()
@@ -9598,6 +11195,11 @@ func (page TagResourceCollectionPage) Values() []TagResourceContract {
return *page.trc.Value
}
+// Creates a new instance of the TagResourceCollectionPage type.
+func NewTagResourceCollectionPage(getNextPage func(context.Context, TagResourceCollection) (TagResourceCollection, error)) TagResourceCollectionPage {
+ return TagResourceCollectionPage{fn: getNextPage}
+}
+
// TagResourceContract tagResource contract properties.
type TagResourceContract struct {
// Tag - Tag associated with the resource.
@@ -9618,8 +11220,8 @@ type TagTagResourceContractProperties struct {
Name *string `json:"name,omitempty"`
}
-// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// TenantConfigurationDeployFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type TenantConfigurationDeployFuture struct {
azure.Future
}
@@ -9695,8 +11297,8 @@ type TenantConfigurationSyncStateContract struct {
ConfigurationChangeDate *date.Time `json:"configurationChangeDate,omitempty"`
}
-// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// TenantConfigurationValidateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type TenantConfigurationValidateFuture struct {
azure.Future
}
@@ -9757,14 +11359,24 @@ type UserCollectionIterator struct {
page UserCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UserCollectionIterator) Next() error {
+func (iter *UserCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -9773,6 +11385,13 @@ func (iter *UserCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UserCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UserCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -9792,6 +11411,11 @@ func (iter UserCollectionIterator) Value() UserContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UserCollectionIterator type.
+func NewUserCollectionIterator(page UserCollectionPage) UserCollectionIterator {
+ return UserCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (uc UserCollection) IsEmpty() bool {
return uc.Value == nil || len(*uc.Value) == 0
@@ -9799,11 +11423,11 @@ func (uc UserCollection) IsEmpty() bool {
// userCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (uc UserCollection) userCollectionPreparer() (*http.Request, error) {
+func (uc UserCollection) userCollectionPreparer(ctx context.Context) (*http.Request, error) {
if uc.NextLink == nil || len(to.String(uc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(uc.NextLink)))
@@ -9811,14 +11435,24 @@ func (uc UserCollection) userCollectionPreparer() (*http.Request, error) {
// UserCollectionPage contains a page of UserContract values.
type UserCollectionPage struct {
- fn func(UserCollection) (UserCollection, error)
+ fn func(context.Context, UserCollection) (UserCollection, error)
uc UserCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UserCollectionPage) Next() error {
- next, err := page.fn(page.uc)
+func (page *UserCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.uc)
if err != nil {
return err
}
@@ -9826,6 +11460,13 @@ func (page *UserCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UserCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UserCollectionPage) NotDone() bool {
return !page.uc.IsEmpty()
@@ -9844,6 +11485,11 @@ func (page UserCollectionPage) Values() []UserContract {
return *page.uc.Value
}
+// Creates a new instance of the UserCollectionPage type.
+func NewUserCollectionPage(getNextPage func(context.Context, UserCollection) (UserCollection, error)) UserCollectionPage {
+ return UserCollectionPage{fn: getNextPage}
+}
+
// UserContract user details.
type UserContract struct {
autorest.Response `json:"-"`
@@ -10032,14 +11678,24 @@ type UserIdentityCollectionIterator struct {
page UserIdentityCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UserIdentityCollectionIterator) Next() error {
+func (iter *UserIdentityCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -10048,6 +11704,13 @@ func (iter *UserIdentityCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UserIdentityCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UserIdentityCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -10067,6 +11730,11 @@ func (iter UserIdentityCollectionIterator) Value() UserIdentityContract {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UserIdentityCollectionIterator type.
+func NewUserIdentityCollectionIterator(page UserIdentityCollectionPage) UserIdentityCollectionIterator {
+ return UserIdentityCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (uic UserIdentityCollection) IsEmpty() bool {
return uic.Value == nil || len(*uic.Value) == 0
@@ -10074,11 +11742,11 @@ func (uic UserIdentityCollection) IsEmpty() bool {
// userIdentityCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (uic UserIdentityCollection) userIdentityCollectionPreparer() (*http.Request, error) {
+func (uic UserIdentityCollection) userIdentityCollectionPreparer(ctx context.Context) (*http.Request, error) {
if uic.NextLink == nil || len(to.String(uic.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(uic.NextLink)))
@@ -10086,14 +11754,24 @@ func (uic UserIdentityCollection) userIdentityCollectionPreparer() (*http.Reques
// UserIdentityCollectionPage contains a page of UserIdentityContract values.
type UserIdentityCollectionPage struct {
- fn func(UserIdentityCollection) (UserIdentityCollection, error)
+ fn func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)
uic UserIdentityCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UserIdentityCollectionPage) Next() error {
- next, err := page.fn(page.uic)
+func (page *UserIdentityCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentityCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.uic)
if err != nil {
return err
}
@@ -10101,6 +11779,13 @@ func (page *UserIdentityCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UserIdentityCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UserIdentityCollectionPage) NotDone() bool {
return !page.uic.IsEmpty()
@@ -10119,6 +11804,11 @@ func (page UserIdentityCollectionPage) Values() []UserIdentityContract {
return *page.uic.Value
}
+// Creates a new instance of the UserIdentityCollectionPage type.
+func NewUserIdentityCollectionPage(getNextPage func(context.Context, UserIdentityCollection) (UserIdentityCollection, error)) UserIdentityCollectionPage {
+ return UserIdentityCollectionPage{fn: getNextPage}
+}
+
// UserIdentityContract user identity details.
type UserIdentityContract struct {
// Provider - Identity provider name.
@@ -10199,7 +11889,8 @@ type UserUpdateParametersProperties struct {
Identities *[]UserIdentityContract `json:"identities,omitempty"`
}
-// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is deployed.
+// VirtualNetworkConfiguration configuration of a virtual network to which API Management service is
+// deployed.
type VirtualNetworkConfiguration struct {
// Vnetid - The virtual network ID. This is typically a GUID. Expect a null GUID by default.
Vnetid *string `json:"vnetid,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go
index 292afc598d8b..a9e9f19b7e0d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/networkstatus.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewNetworkStatusClientWithBaseURI(baseURI string, subscriptionID string) Ne
// locationName - location in which the API Management service is deployed. This is one of the Azure Regions
// like West US, East US, South Central US.
func (client NetworkStatusClient) ListByLocation(ctx context.Context, resourceGroupName string, serviceName string, locationName string) (result NetworkStatusContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NetworkStatusClient.ListByLocation")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -127,6 +138,16 @@ func (client NetworkStatusClient) ListByLocationResponder(resp *http.Response) (
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client NetworkStatusClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result ListNetworkStatusContractByLocation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NetworkStatusClient.ListByService")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go
index 61c347f32452..66b6186e2a6a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notification.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewNotificationClientWithBaseURI(baseURI string, subscriptionID string) Not
// notificationName - notification Name Identifier.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client NotificationClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, ifMatch string) (result NotificationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -128,6 +139,16 @@ func (client NotificationClient) CreateOrUpdateResponder(resp *http.Response) (r
// serviceName - the name of the API Management service.
// notificationName - notification Name Identifier.
func (client NotificationClient) Get(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName) (result NotificationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -206,6 +227,16 @@ func (client NotificationClient) GetResponder(resp *http.Response) (result Notif
// top - number of records to return.
// skip - number of records to skip.
func (client NotificationClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result NotificationCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.nc.Response.Response != nil {
+ sc = result.nc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -290,8 +321,8 @@ func (client NotificationClient) ListByServiceResponder(resp *http.Response) (re
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client NotificationClient) listByServiceNextResults(lastResults NotificationCollection) (result NotificationCollection, err error) {
- req, err := lastResults.notificationCollectionPreparer()
+func (client NotificationClient) listByServiceNextResults(ctx context.Context, lastResults NotificationCollection) (result NotificationCollection, err error) {
+ req, err := lastResults.notificationCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.NotificationClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -312,6 +343,16 @@ func (client NotificationClient) listByServiceNextResults(lastResults Notificati
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client NotificationClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, top *int32, skip *int32) (result NotificationCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go
index 79dc89378530..17940b3fcb1a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientemail.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewNotificationRecipientEmailClientWithBaseURI(baseURI string, subscription
// notificationName - notification Name Identifier.
// email - email identifier.
func (client NotificationRecipientEmailClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientEmailClient.CheckEntityExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -125,6 +136,16 @@ func (client NotificationRecipientEmailClient) CheckEntityExistsResponder(resp *
// notificationName - notification Name Identifier.
// email - email identifier.
func (client NotificationRecipientEmailClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string) (result RecipientEmailContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientEmailClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -204,6 +225,16 @@ func (client NotificationRecipientEmailClient) CreateOrUpdateResponder(resp *htt
// notificationName - notification Name Identifier.
// email - email identifier.
func (client NotificationRecipientEmailClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, email string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientEmailClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -281,6 +312,16 @@ func (client NotificationRecipientEmailClient) DeleteResponder(resp *http.Respon
// serviceName - the name of the API Management service.
// notificationName - notification Name Identifier.
func (client NotificationRecipientEmailClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName) (result RecipientEmailCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientEmailClient.ListByNotification")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go
index 10a381906bb6..030c5ac4ebc2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/notificationrecipientuser.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewNotificationRecipientUserClientWithBaseURI(baseURI string, subscriptionI
// notificationName - notification Name Identifier.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client NotificationRecipientUserClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.CheckEntityExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -129,6 +140,16 @@ func (client NotificationRecipientUserClient) CheckEntityExistsResponder(resp *h
// notificationName - notification Name Identifier.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client NotificationRecipientUserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result RecipientUserContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -212,6 +233,16 @@ func (client NotificationRecipientUserClient) CreateOrUpdateResponder(resp *http
// notificationName - notification Name Identifier.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client NotificationRecipientUserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName, UID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -293,6 +324,16 @@ func (client NotificationRecipientUserClient) DeleteResponder(resp *http.Respons
// serviceName - the name of the API Management service.
// notificationName - notification Name Identifier.
func (client NotificationRecipientUserClient) ListByNotification(ctx context.Context, resourceGroupName string, serviceName string, notificationName NotificationName) (result RecipientUserCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/NotificationRecipientUserClient.ListByNotification")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go
index ba48ba87dca5..bbaed9f315d6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/openidconnectprovider.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewOpenIDConnectProviderClientWithBaseURI(baseURI string, subscriptionID st
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client OpenIDConnectProviderClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters OpenidConnectProviderContract, ifMatch string) (result OpenidConnectProviderContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -143,6 +154,16 @@ func (client OpenIDConnectProviderClient) CreateOrUpdateResponder(resp *http.Res
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client OpenIDConnectProviderClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, opid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -223,6 +244,16 @@ func (client OpenIDConnectProviderClient) DeleteResponder(resp *http.Response) (
// serviceName - the name of the API Management service.
// opid - identifier of the OpenID Connect Provider.
func (client OpenIDConnectProviderClient) Get(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result OpenidConnectProviderContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -303,6 +334,16 @@ func (client OpenIDConnectProviderClient) GetResponder(resp *http.Response) (res
// serviceName - the name of the API Management service.
// opid - identifier of the OpenID Connect Provider.
func (client OpenIDConnectProviderClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, opid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -387,6 +428,16 @@ func (client OpenIDConnectProviderClient) GetEntityTagResponder(resp *http.Respo
// top - number of records to return.
// skip - number of records to skip.
func (client OpenIDConnectProviderClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result OpenIDConnectProviderCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.oicpc.Response.Response != nil {
+ sc = result.oicpc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -474,8 +525,8 @@ func (client OpenIDConnectProviderClient) ListByServiceResponder(resp *http.Resp
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client OpenIDConnectProviderClient) listByServiceNextResults(lastResults OpenIDConnectProviderCollection) (result OpenIDConnectProviderCollection, err error) {
- req, err := lastResults.openIDConnectProviderCollectionPreparer()
+func (client OpenIDConnectProviderClient) listByServiceNextResults(ctx context.Context, lastResults OpenIDConnectProviderCollection) (result OpenIDConnectProviderCollection, err error) {
+ req, err := lastResults.openIDConnectProviderCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.OpenIDConnectProviderClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -496,6 +547,16 @@ func (client OpenIDConnectProviderClient) listByServiceNextResults(lastResults O
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client OpenIDConnectProviderClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result OpenIDConnectProviderCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -509,6 +570,16 @@ func (client OpenIDConnectProviderClient) ListByServiceComplete(ctx context.Cont
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client OpenIDConnectProviderClient) Update(ctx context.Context, resourceGroupName string, serviceName string, opid string, parameters OpenidConnectProviderUpdateContract, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OpenIDConnectProviderClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go
index 9d066c25f715..7db02be7c67e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operation.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -56,7 +57,18 @@ func NewOperationClientWithBaseURI(baseURI string, subscriptionID string) Operat
// | urlTemplate | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return.
// skip - number of records to skip.
-func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) {
+// includeNotTaggedOperations - include not tagged operations in response
+func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result TagResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationClient.ListByTags")
+ defer func() {
+ sc := -1
+ if result.trc.Response.Response != nil {
+ sc = result.trc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -76,7 +88,7 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName
}
result.fn = client.listByTagsNextResults
- req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
+ req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, includeNotTaggedOperations)
if err != nil {
err = autorest.NewErrorWithError(err, "apimanagement.OperationClient", "ListByTags", nil, "Failure preparing request")
return
@@ -98,7 +110,7 @@ func (client OperationClient) ListByTags(ctx context.Context, resourceGroupName
}
// ListByTagsPreparer prepares the ListByTags request.
-func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (*http.Request, error) {
+func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (*http.Request, error) {
pathParameters := map[string]interface{}{
"apiId": autorest.Encode("path", apiid),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
@@ -119,6 +131,11 @@ func (client OperationClient) ListByTagsPreparer(ctx context.Context, resourceGr
if skip != nil {
queryParameters["$skip"] = autorest.Encode("query", *skip)
}
+ if includeNotTaggedOperations != nil {
+ queryParameters["includeNotTaggedOperations"] = autorest.Encode("query", *includeNotTaggedOperations)
+ } else {
+ queryParameters["includeNotTaggedOperations"] = autorest.Encode("query", false)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -149,8 +166,8 @@ func (client OperationClient) ListByTagsResponder(resp *http.Response) (result T
}
// listByTagsNextResults retrieves the next set of results, if any.
-func (client OperationClient) listByTagsNextResults(lastResults TagResourceCollection) (result TagResourceCollection, err error) {
- req, err := lastResults.tagResourceCollectionPreparer()
+func (client OperationClient) listByTagsNextResults(ctx context.Context, lastResults TagResourceCollection) (result TagResourceCollection, err error) {
+ req, err := lastResults.tagResourceCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.OperationClient", "listByTagsNextResults", nil, "Failure preparing next results request")
}
@@ -170,7 +187,17 @@ func (client OperationClient) listByTagsNextResults(lastResults TagResourceColle
}
// ListByTagsComplete enumerates all values, automatically crossing page boundaries as required.
-func (client OperationClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagResourceCollectionIterator, err error) {
- result.page, err = client.ListByTags(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
+func (client OperationClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32, includeNotTaggedOperations *bool) (result TagResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationClient.ListByTags")
+ 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.ListByTags(ctx, resourceGroupName, serviceName, apiid, filter, top, skip, includeNotTaggedOperations)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go
index 036c3ce117d9..81401d9a5d1c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available REST API operations of the Microsoft.ApiManagement provider.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go
index 70f6acdf3859..26ad01e234e7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policy.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewPolicyClientWithBaseURI(baseURI string, subscriptionID string) PolicyCli
// serviceName - the name of the API Management service.
// parameters - the policy contents to apply.
func (client PolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PolicyContract) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -129,6 +140,16 @@ func (client PolicyClient) CreateOrUpdateResponder(resp *http.Response) (result
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client PolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -205,6 +226,16 @@ func (client PolicyClient) DeleteResponder(resp *http.Response) (result autorest
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client PolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -281,6 +312,16 @@ func (client PolicyClient) GetResponder(resp *http.Response) (result PolicyContr
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client PolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -357,6 +398,16 @@ func (client PolicyClient) GetEntityTagResponder(resp *http.Response) (result au
// serviceName - the name of the API Management service.
// scope - policy scope.
func (client PolicyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (result PolicyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicyClient.ListByService")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go
index 5737d5ba85bf..9feea61ed4ac 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/policysnippets.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewPolicySnippetsClientWithBaseURI(baseURI string, subscriptionID string) P
// serviceName - the name of the API Management service.
// scope - policy scope.
func (client PolicySnippetsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, scope PolicyScopeContract) (result PolicySnippetsCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PolicySnippetsClient.ListByService")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go
index 92a3ea46fda0..9adbc03fef7d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/product.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewProductClientWithBaseURI(baseURI string, subscriptionID string) ProductC
// parameters - create or update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client ProductClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters ProductContract, ifMatch string) (result ProductContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -145,6 +156,16 @@ func (client ProductClient) CreateOrUpdateResponder(resp *http.Response) (result
// request or it should be * for unconditional update.
// deleteSubscriptions - delete existing subscriptions associated with the product or not.
func (client ProductClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string, deleteSubscriptions *bool) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -229,6 +250,16 @@ func (client ProductClient) DeleteResponder(resp *http.Response) (result autores
// serviceName - the name of the API Management service.
// productID - product identifier. Must be unique in the current API Management service instance.
func (client ProductClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result ProductContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -310,6 +341,16 @@ func (client ProductClient) GetResponder(resp *http.Response) (result ProductCon
// serviceName - the name of the API Management service.
// productID - product identifier. Must be unique in the current API Management service instance.
func (client ProductClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -400,6 +441,16 @@ func (client ProductClient) GetEntityTagResponder(resp *http.Response) (result a
// expandGroups - when set to true, the response contains an array of groups that have visibility to the
// product. The default is false.
func (client ProductClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result ProductCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.pc.Response.Response != nil {
+ sc = result.pc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -490,8 +541,8 @@ func (client ProductClient) ListByServiceResponder(resp *http.Response) (result
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client ProductClient) listByServiceNextResults(lastResults ProductCollection) (result ProductCollection, err error) {
- req, err := lastResults.productCollectionPreparer()
+func (client ProductClient) listByServiceNextResults(ctx context.Context, lastResults ProductCollection) (result ProductCollection, err error) {
+ req, err := lastResults.productCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -512,10 +563,173 @@ func (client ProductClient) listByServiceNextResults(lastResults ProductCollecti
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, expandGroups *bool) (result ProductCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, expandGroups)
return
}
+// ListByTags lists a collection of products associated with tags.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// serviceName - the name of the API Management service.
+// filter - | Field | Supported operators | Supported functions |
+// |-------------|------------------------|---------------------------------------------|
+// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | description | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | terms | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | state | eq | substringof, contains, startswith, endswith |
+// top - number of records to return.
+// skip - number of records to skip.
+// includeNotTaggedProducts - include not tagged products in response
+func (client ProductClient) ListByTags(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result TagResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByTags")
+ defer func() {
+ sc := -1
+ if result.trc.Response.Response != nil {
+ sc = result.trc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: serviceName,
+ Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}},
+ {TargetValue: top,
+ Constraints: []validation.Constraint{{Target: "top", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "top", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil}}}}},
+ {TargetValue: skip,
+ Constraints: []validation.Constraint{{Target: "skip", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "skip", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("apimanagement.ProductClient", "ListByTags", err.Error())
+ }
+
+ result.fn = client.listByTagsNextResults
+ req, err := client.ListByTagsPreparer(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedProducts)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByTagsSender(req)
+ if err != nil {
+ result.trc.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", resp, "Failure sending request")
+ return
+ }
+
+ result.trc, err = client.ListByTagsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "ListByTags", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByTagsPreparer prepares the ListByTags request.
+func (client ProductClient) ListByTagsPreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+ if len(filter) > 0 {
+ queryParameters["$filter"] = autorest.Encode("query", filter)
+ }
+ if top != nil {
+ queryParameters["$top"] = autorest.Encode("query", *top)
+ }
+ if skip != nil {
+ queryParameters["$skip"] = autorest.Encode("query", *skip)
+ }
+ if includeNotTaggedProducts != nil {
+ queryParameters["includeNotTaggedProducts"] = autorest.Encode("query", *includeNotTaggedProducts)
+ } else {
+ queryParameters["includeNotTaggedProducts"] = autorest.Encode("query", false)
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/productsByTags", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByTagsSender sends the ListByTags request. The method will close the
+// http.Response Body if it receives an error.
+func (client ProductClient) ListByTagsSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByTagsResponder handles the response to the ListByTags request. The method always
+// closes the http.Response Body.
+func (client ProductClient) ListByTagsResponder(resp *http.Response) (result TagResourceCollection, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByTagsNextResults retrieves the next set of results, if any.
+func (client ProductClient) listByTagsNextResults(ctx context.Context, lastResults TagResourceCollection) (result TagResourceCollection, err error) {
+ req, err := lastResults.tagResourceCollectionPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByTagsSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByTagsResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ProductClient", "listByTagsNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByTagsComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ProductClient) ListByTagsComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, includeNotTaggedProducts *bool) (result TagResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.ListByTags")
+ 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.ListByTags(ctx, resourceGroupName, serviceName, filter, top, skip, includeNotTaggedProducts)
+ return
+}
+
// Update update product.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -525,6 +739,16 @@ func (client ProductClient) ListByServiceComplete(ctx context.Context, resourceG
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client ProductClient) Update(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters ProductUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go
index 3d3311579a8e..e6e1eb98da44 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productapi.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewProductAPIClientWithBaseURI(baseURI string, subscriptionID string) Produ
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client ProductAPIClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductAPIClient.CheckEntityExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -135,6 +146,16 @@ func (client ProductAPIClient) CheckEntityExistsResponder(resp *http.Response) (
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client ProductAPIClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result APIContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductAPIClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -223,6 +244,16 @@ func (client ProductAPIClient) CreateOrUpdateResponder(resp *http.Response) (res
// apiid - API revision identifier. Must be unique in the current API Management service instance. Non-current
// revision has ;rev=n as a suffix where n is the revision number.
func (client ProductAPIClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, apiid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductAPIClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -317,6 +348,16 @@ func (client ProductAPIClient) DeleteResponder(resp *http.Response) (result auto
// top - number of records to return.
// skip - number of records to skip.
func (client ProductAPIClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result APICollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductAPIClient.ListByProduct")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -409,8 +450,8 @@ func (client ProductAPIClient) ListByProductResponder(resp *http.Response) (resu
}
// listByProductNextResults retrieves the next set of results, if any.
-func (client ProductAPIClient) listByProductNextResults(lastResults APICollection) (result APICollection, err error) {
- req, err := lastResults.aPICollectionPreparer()
+func (client ProductAPIClient) listByProductNextResults(ctx context.Context, lastResults APICollection) (result APICollection, err error) {
+ req, err := lastResults.aPICollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ProductAPIClient", "listByProductNextResults", nil, "Failure preparing next results request")
}
@@ -431,6 +472,16 @@ func (client ProductAPIClient) listByProductNextResults(lastResults APICollectio
// ListByProductComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductAPIClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result APICollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductAPIClient.ListByProduct")
+ 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.ListByProduct(ctx, resourceGroupName, serviceName, productID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go
index 482bbe6f49a7..8532b3a37167 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productgroup.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewProductGroupClientWithBaseURI(baseURI string, subscriptionID string) Pro
// productID - product identifier. Must be unique in the current API Management service instance.
// groupID - group identifier. Must be unique in the current API Management service instance.
func (client ProductGroupClient) CheckEntityExists(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductGroupClient.CheckEntityExists")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -133,6 +144,16 @@ func (client ProductGroupClient) CheckEntityExistsResponder(resp *http.Response)
// productID - product identifier. Must be unique in the current API Management service instance.
// groupID - group identifier. Must be unique in the current API Management service instance.
func (client ProductGroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result GroupContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductGroupClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -220,6 +241,16 @@ func (client ProductGroupClient) CreateOrUpdateResponder(resp *http.Response) (r
// productID - product identifier. Must be unique in the current API Management service instance.
// groupID - group identifier. Must be unique in the current API Management service instance.
func (client ProductGroupClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, groupID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductGroupClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -313,6 +344,16 @@ func (client ProductGroupClient) DeleteResponder(resp *http.Response) (result au
// top - number of records to return.
// skip - number of records to skip.
func (client ProductGroupClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductGroupClient.ListByProduct")
+ defer func() {
+ sc := -1
+ if result.gc.Response.Response != nil {
+ sc = result.gc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -405,8 +446,8 @@ func (client ProductGroupClient) ListByProductResponder(resp *http.Response) (re
}
// listByProductNextResults retrieves the next set of results, if any.
-func (client ProductGroupClient) listByProductNextResults(lastResults GroupCollection) (result GroupCollection, err error) {
- req, err := lastResults.groupCollectionPreparer()
+func (client ProductGroupClient) listByProductNextResults(ctx context.Context, lastResults GroupCollection) (result GroupCollection, err error) {
+ req, err := lastResults.groupCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ProductGroupClient", "listByProductNextResults", nil, "Failure preparing next results request")
}
@@ -427,6 +468,16 @@ func (client ProductGroupClient) listByProductNextResults(lastResults GroupColle
// ListByProductComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductGroupClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result GroupCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductGroupClient.ListByProduct")
+ 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.ListByProduct(ctx, resourceGroupName, serviceName, productID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go
index 490f44715bca..2fdb5266813d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productpolicy.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewProductPolicyClientWithBaseURI(baseURI string, subscriptionID string) Pr
// parameters - the policy contents to apply.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client ProductPolicyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, productID string, parameters PolicyContract, ifMatch string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -141,6 +152,16 @@ func (client ProductPolicyClient) CreateOrUpdateResponder(resp *http.Response) (
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client ProductPolicyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, productID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -223,6 +244,16 @@ func (client ProductPolicyClient) DeleteResponder(resp *http.Response) (result a
// serviceName - the name of the API Management service.
// productID - product identifier. Must be unique in the current API Management service instance.
func (client ProductPolicyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result PolicyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -305,6 +336,16 @@ func (client ProductPolicyClient) GetResponder(resp *http.Response) (result Poli
// serviceName - the name of the API Management service.
// productID - product identifier. Must be unique in the current API Management service instance.
func (client ProductPolicyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -386,6 +427,16 @@ func (client ProductPolicyClient) GetEntityTagResponder(resp *http.Response) (re
// serviceName - the name of the API Management service.
// productID - product identifier. Must be unique in the current API Management service instance.
func (client ProductPolicyClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string) (result PolicyCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductPolicyClient.ListByProduct")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go
index f8d8171a35d7..ccb6204778e2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/productsubscriptions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -56,6 +57,16 @@ func NewProductSubscriptionsClientWithBaseURI(baseURI string, subscriptionID str
// top - number of records to return.
// skip - number of records to skip.
func (client ProductSubscriptionsClient) List(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductSubscriptionsClient.List")
+ defer func() {
+ sc := -1
+ if result.sc.Response.Response != nil {
+ sc = result.sc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -148,8 +159,8 @@ func (client ProductSubscriptionsClient) ListResponder(resp *http.Response) (res
}
// listNextResults retrieves the next set of results, if any.
-func (client ProductSubscriptionsClient) listNextResults(lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
- req, err := lastResults.subscriptionCollectionPreparer()
+func (client ProductSubscriptionsClient) listNextResults(ctx context.Context, lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
+ req, err := lastResults.subscriptionCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ProductSubscriptionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -170,6 +181,16 @@ func (client ProductSubscriptionsClient) listNextResults(lastResults Subscriptio
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProductSubscriptionsClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProductSubscriptionsClient.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, resourceGroupName, serviceName, productID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go
index 67a80a5c05b2..3cd4dc95fa80 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/property.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewPropertyClientWithBaseURI(baseURI string, subscriptionID string) Propert
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client PropertyClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters PropertyContract, ifMatch string) (result PropertyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -140,7 +151,7 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul
return
}
-// Delete deletes specific property from the the API Management service instance.
+// Delete deletes specific property from the API Management service instance.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -148,6 +159,16 @@ func (client PropertyClient) CreateOrUpdateResponder(resp *http.Response) (resul
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client PropertyClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, propID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -228,6 +249,16 @@ func (client PropertyClient) DeleteResponder(resp *http.Response) (result autore
// serviceName - the name of the API Management service.
// propID - identifier of the property.
func (client PropertyClient) Get(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result PropertyContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -308,6 +339,16 @@ func (client PropertyClient) GetResponder(resp *http.Response) (result PropertyC
// serviceName - the name of the API Management service.
// propID - identifier of the property.
func (client PropertyClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, propID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -392,6 +433,16 @@ func (client PropertyClient) GetEntityTagResponder(resp *http.Response) (result
// top - number of records to return.
// skip - number of records to skip.
func (client PropertyClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result PropertyCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.pc.Response.Response != nil {
+ sc = result.pc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -479,8 +530,8 @@ func (client PropertyClient) ListByServiceResponder(resp *http.Response) (result
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client PropertyClient) listByServiceNextResults(lastResults PropertyCollection) (result PropertyCollection, err error) {
- req, err := lastResults.propertyCollectionPreparer()
+func (client PropertyClient) listByServiceNextResults(ctx context.Context, lastResults PropertyCollection) (result PropertyCollection, err error) {
+ req, err := lastResults.propertyCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.PropertyClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -501,6 +552,16 @@ func (client PropertyClient) listByServiceNextResults(lastResults PropertyCollec
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client PropertyClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result PropertyCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -514,6 +575,16 @@ func (client PropertyClient) ListByServiceComplete(ctx context.Context, resource
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client PropertyClient) Update(ctx context.Context, resourceGroupName string, serviceName string, propID string, parameters PropertyUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PropertyClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go
index 1feada368d3e..eeb1fbb7d8a3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabycounterkeys.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewQuotaByCounterKeysClientWithBaseURI(baseURI string, subscriptionID strin
// accessible by "boo" counter key. But if it’s defined as counter-key="@("b"+"a")" then it will be accessible
// by "ba" key
func (client QuotaByCounterKeysClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string) (result QuotaCounterCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotaByCounterKeysClient.ListByService")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -132,6 +143,16 @@ func (client QuotaByCounterKeysClient) ListByServiceResponder(resp *http.Respons
// by "ba" key
// parameters - the value of the quota counter to be applied to all quota counter periods.
func (client QuotaByCounterKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, parameters QuotaCounterValueContractProperties) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotaByCounterKeysClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go
index 60b29ea2caad..c15370f122a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/quotabyperiodkeys.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewQuotaByPeriodKeysClientWithBaseURI(baseURI string, subscriptionID string
// by "ba" key
// quotaPeriodKey - quota period key identifier.
func (client QuotaByPeriodKeysClient) Get(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string) (result QuotaCounterContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotaByPeriodKeysClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -134,6 +145,16 @@ func (client QuotaByPeriodKeysClient) GetResponder(resp *http.Response) (result
// quotaPeriodKey - quota period key identifier.
// parameters - the value of the Quota counter to be applied on the specified period.
func (client QuotaByPeriodKeysClient) Update(ctx context.Context, resourceGroupName string, serviceName string, quotaCounterKey string, quotaPeriodKey string, parameters QuotaCounterValueContractProperties) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/QuotaByPeriodKeysClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/regions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/regions.go
index b8cd2d706db1..4902f6db5a45 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/regions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/regions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewRegionsClientWithBaseURI(baseURI string, subscriptionID string) RegionsC
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client RegionsClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.rlr.Response.Response != nil {
+ sc = result.rlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -117,8 +128,8 @@ func (client RegionsClient) ListByServiceResponder(resp *http.Response) (result
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client RegionsClient) listByServiceNextResults(lastResults RegionListResult) (result RegionListResult, err error) {
- req, err := lastResults.regionListResultPreparer()
+func (client RegionsClient) listByServiceNextResults(ctx context.Context, lastResults RegionListResult) (result RegionListResult, err error) {
+ req, err := lastResults.regionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.RegionsClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -139,6 +150,16 @@ func (client RegionsClient) listByServiceNextResults(lastResults RegionListResul
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client RegionsClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string) (result RegionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RegionsClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go
index ca18484bc101..5ae24f08cd3b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/reports.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewReportsClientWithBaseURI(baseURI string, subscriptionID string) ReportsC
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByAPI")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -133,8 +144,8 @@ func (client ReportsClient) ListByAPIResponder(resp *http.Response) (result Repo
}
// listByAPINextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByAPINextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByAPINextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByAPINextResults", nil, "Failure preparing next results request")
}
@@ -155,11 +166,21 @@ func (client ReportsClient) listByAPINextResults(lastResults ReportCollection) (
// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByAPI")
+ 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.ListByAPI(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
-// ListByGeo lists report records by GeoGraphy.
+// ListByGeo lists report records by geography.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -167,6 +188,16 @@ func (client ReportsClient) ListByAPIComplete(ctx context.Context, resourceGroup
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByGeo(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByGeo")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -254,8 +285,8 @@ func (client ReportsClient) ListByGeoResponder(resp *http.Response) (result Repo
}
// listByGeoNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByGeoNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByGeoNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByGeoNextResults", nil, "Failure preparing next results request")
}
@@ -276,6 +307,16 @@ func (client ReportsClient) listByGeoNextResults(lastResults ReportCollection) (
// ListByGeoComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByGeoComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByGeo")
+ 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.ListByGeo(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -288,6 +329,16 @@ func (client ReportsClient) ListByGeoComplete(ctx context.Context, resourceGroup
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByOperation")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -373,8 +424,8 @@ func (client ReportsClient) ListByOperationResponder(resp *http.Response) (resul
}
// listByOperationNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByOperationNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByOperationNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByOperationNextResults", nil, "Failure preparing next results request")
}
@@ -395,6 +446,16 @@ func (client ReportsClient) listByOperationNextResults(lastResults ReportCollect
// ListByOperationComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByOperation")
+ 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.ListByOperation(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -407,6 +468,16 @@ func (client ReportsClient) ListByOperationComplete(ctx context.Context, resourc
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByProduct")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -492,8 +563,8 @@ func (client ReportsClient) ListByProductResponder(resp *http.Response) (result
}
// listByProductNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByProductNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByProductNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByProductNextResults", nil, "Failure preparing next results request")
}
@@ -514,6 +585,16 @@ func (client ReportsClient) listByProductNextResults(lastResults ReportCollectio
// ListByProductComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByProduct")
+ 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.ListByProduct(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -526,6 +607,16 @@ func (client ReportsClient) ListByProductComplete(ctx context.Context, resourceG
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByRequest(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result RequestReportCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByRequest")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -617,6 +708,16 @@ func (client ReportsClient) ListByRequestResponder(resp *http.Response) (result
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListBySubscription(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListBySubscription")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -704,8 +805,8 @@ func (client ReportsClient) ListBySubscriptionResponder(resp *http.Response) (re
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listBySubscriptionNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listBySubscriptionNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -726,6 +827,16 @@ func (client ReportsClient) listBySubscriptionNextResults(lastResults ReportColl
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListBySubscription")
+ 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.ListBySubscription(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -736,11 +847,21 @@ func (client ReportsClient) ListBySubscriptionComplete(ctx context.Context, reso
// serviceName - the name of the API Management service.
// interval - by time interval. Interval must be multiple of 15 minutes and may not be zero. The value should
// be in ISO 8601 format (http://en.wikipedia.org/wiki/ISO_8601#Durations).This code can be used to convert
-// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, secconds))
+// TimeSpan to a valid interval string: XmlConvert.ToString(new TimeSpan(hours, minutes, seconds))
// filter - the filter to apply on the operation.
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByTime(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByTime")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -829,8 +950,8 @@ func (client ReportsClient) ListByTimeResponder(resp *http.Response) (result Rep
}
// listByTimeNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByTimeNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByTimeNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByTimeNextResults", nil, "Failure preparing next results request")
}
@@ -851,6 +972,16 @@ func (client ReportsClient) listByTimeNextResults(lastResults ReportCollection)
// ListByTimeComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGroupName string, serviceName string, interval string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByTime")
+ 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.ListByTime(ctx, resourceGroupName, serviceName, interval, filter, top, skip)
return
}
@@ -863,6 +994,16 @@ func (client ReportsClient) ListByTimeComplete(ctx context.Context, resourceGrou
// top - number of records to return.
// skip - number of records to skip.
func (client ReportsClient) ListByUser(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByUser")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -948,8 +1089,8 @@ func (client ReportsClient) ListByUserResponder(resp *http.Response) (result Rep
}
// listByUserNextResults retrieves the next set of results, if any.
-func (client ReportsClient) listByUserNextResults(lastResults ReportCollection) (result ReportCollection, err error) {
- req, err := lastResults.reportCollectionPreparer()
+func (client ReportsClient) listByUserNextResults(ctx context.Context, lastResults ReportCollection) (result ReportCollection, err error) {
+ req, err := lastResults.reportCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ReportsClient", "listByUserNextResults", nil, "Failure preparing next results request")
}
@@ -970,6 +1111,16 @@ func (client ReportsClient) listByUserNextResults(lastResults ReportCollection)
// ListByUserComplete enumerates all values, automatically crossing page boundaries as required.
func (client ReportsClient) ListByUserComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result ReportCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ReportsClient.ListByUser")
+ 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.ListByUser(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go
index 05459a906db5..96746a886f4b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/service.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewServiceClientWithBaseURI(baseURI string, subscriptionID string) ServiceC
// all the regions in which the Api Management service is deployed will be updated sequentially without
// incurring downtime in the region.
func (client ServiceClient) ApplyNetworkConfigurationUpdates(ctx context.Context, resourceGroupName string, serviceName string, parameters *ServiceApplyNetworkConfigurationParameters) (result ServiceApplyNetworkConfigurationUpdatesFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.ApplyNetworkConfigurationUpdates")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -107,10 +118,6 @@ func (client ServiceClient) ApplyNetworkConfigurationUpdatesSender(req *http.Req
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -135,6 +142,16 @@ func (client ServiceClient) ApplyNetworkConfigurationUpdatesResponder(resp *http
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the ApiManagementService_Backup operation.
func (client ServiceClient) Backup(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters) (result ServiceBackupFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Backup")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -195,10 +212,6 @@ func (client ServiceClient) BackupSender(req *http.Request) (future ServiceBacku
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -220,6 +233,16 @@ func (client ServiceClient) BackupResponder(resp *http.Response) (result Service
// Parameters:
// parameters - parameters supplied to the CheckNameAvailability operation.
func (client ServiceClient) CheckNameAvailability(ctx context.Context, parameters ServiceCheckNameAvailabilityParameters) (result ServiceNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -295,6 +318,16 @@ func (client ServiceClient) CheckNameAvailabilityResponder(resp *http.Response)
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the CreateOrUpdate API Management service operation.
func (client ServiceClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceResource) (result ServiceCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -361,10 +394,6 @@ func (client ServiceClient) CreateOrUpdateSender(req *http.Request) (future Serv
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -387,6 +416,16 @@ func (client ServiceClient) CreateOrUpdateResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client ServiceClient) Delete(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -461,6 +500,16 @@ func (client ServiceClient) DeleteResponder(resp *http.Response) (result autores
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client ServiceClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result ServiceResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -536,6 +585,16 @@ func (client ServiceClient) GetResponder(resp *http.Response) (result ServiceRes
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client ServiceClient) GetSsoToken(ctx context.Context, resourceGroupName string, serviceName string) (result ServiceGetSsoTokenResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.GetSsoToken")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -608,6 +667,16 @@ func (client ServiceClient) GetSsoTokenResponder(resp *http.Response) (result Se
// List lists all API Management services within an Azure subscription.
func (client ServiceClient) List(ctx context.Context) (result ServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.List")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -670,8 +739,8 @@ func (client ServiceClient) ListResponder(resp *http.Response) (result ServiceLi
}
// listNextResults retrieves the next set of results, if any.
-func (client ServiceClient) listNextResults(lastResults ServiceListResult) (result ServiceListResult, err error) {
- req, err := lastResults.serviceListResultPreparer()
+func (client ServiceClient) listNextResults(ctx context.Context, lastResults ServiceListResult) (result ServiceListResult, err error) {
+ req, err := lastResults.serviceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -692,6 +761,16 @@ func (client ServiceClient) listNextResults(lastResults ServiceListResult) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceClient) ListComplete(ctx context.Context) (result ServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.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
}
@@ -700,6 +779,16 @@ func (client ServiceClient) ListComplete(ctx context.Context) (result ServiceLis
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ServiceClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServiceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.slr.Response.Response != nil {
+ sc = result.slr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -763,8 +852,8 @@ func (client ServiceClient) ListByResourceGroupResponder(resp *http.Response) (r
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ServiceClient) listByResourceGroupNextResults(lastResults ServiceListResult) (result ServiceListResult, err error) {
- req, err := lastResults.serviceListResultPreparer()
+func (client ServiceClient) listByResourceGroupNextResults(ctx context.Context, lastResults ServiceListResult) (result ServiceListResult, err error) {
+ req, err := lastResults.serviceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.ServiceClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -785,6 +874,16 @@ func (client ServiceClient) listByResourceGroupNextResults(lastResults ServiceLi
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ServiceClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ServiceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -796,6 +895,16 @@ func (client ServiceClient) ListByResourceGroupComplete(ctx context.Context, res
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the Restore API Management service from backup operation.
func (client ServiceClient) Restore(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceBackupRestoreParameters) (result ServiceRestoreFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Restore")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -856,10 +965,6 @@ func (client ServiceClient) RestoreSender(req *http.Request) (future ServiceRest
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -883,6 +988,16 @@ func (client ServiceClient) RestoreResponder(resp *http.Response) (result Servic
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the CreateOrUpdate API Management service operation.
func (client ServiceClient) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateParameters) (result ServiceUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -938,10 +1053,6 @@ func (client ServiceClient) UpdateSender(req *http.Request) (future ServiceUpdat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -967,6 +1078,16 @@ func (client ServiceClient) UpdateResponder(resp *http.Response) (result Service
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the UpdateHostname operation.
func (client ServiceClient) UpdateHostname(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUpdateHostnameParameters) (result ServiceUpdateHostnameFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.UpdateHostname")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1022,10 +1143,6 @@ func (client ServiceClient) UpdateHostnameSender(req *http.Request) (future Serv
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1050,6 +1167,16 @@ func (client ServiceClient) UpdateHostnameResponder(resp *http.Response) (result
// serviceName - the name of the API Management service.
// parameters - parameters supplied to the Upload SSL certificate for an API Management service operation.
func (client ServiceClient) UploadCertificate(ctx context.Context, resourceGroupName string, serviceName string, parameters ServiceUploadCertificateParameters) (result CertificateInformation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceClient.UploadCertificate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go
new file mode 100644
index 000000000000..346249aa265f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/serviceskus.go
@@ -0,0 +1,165 @@
+package apimanagement
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ServiceSkusClient is the apiManagement Client
+type ServiceSkusClient struct {
+ BaseClient
+}
+
+// NewServiceSkusClient creates an instance of the ServiceSkusClient client.
+func NewServiceSkusClient(subscriptionID string) ServiceSkusClient {
+ return NewServiceSkusClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewServiceSkusClientWithBaseURI creates an instance of the ServiceSkusClient client.
+func NewServiceSkusClientWithBaseURI(baseURI string, subscriptionID string) ServiceSkusClient {
+ return ServiceSkusClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// ListAvailableServiceSkus gets all available SKU for a given API Management service
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// serviceName - the name of the API Management service.
+func (client ServiceSkusClient) ListAvailableServiceSkus(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus")
+ defer func() {
+ sc := -1
+ if result.rsr.Response.Response != nil {
+ sc = result.rsr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: serviceName,
+ Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", err.Error())
+ }
+
+ result.fn = client.listAvailableServiceSkusNextResults
+ req, err := client.ListAvailableServiceSkusPreparer(ctx, resourceGroupName, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListAvailableServiceSkusSender(req)
+ if err != nil {
+ result.rsr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure sending request")
+ return
+ }
+
+ result.rsr, err = client.ListAvailableServiceSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "ListAvailableServiceSkus", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListAvailableServiceSkusPreparer prepares the ListAvailableServiceSkus request.
+func (client ServiceSkusClient) ListAvailableServiceSkusPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/skus", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListAvailableServiceSkusSender sends the ListAvailableServiceSkus request. The method will close the
+// http.Response Body if it receives an error.
+func (client ServiceSkusClient) ListAvailableServiceSkusSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListAvailableServiceSkusResponder handles the response to the ListAvailableServiceSkus request. The method always
+// closes the http.Response Body.
+func (client ServiceSkusClient) ListAvailableServiceSkusResponder(resp *http.Response) (result ResourceSkuResults, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listAvailableServiceSkusNextResults retrieves the next set of results, if any.
+func (client ServiceSkusClient) listAvailableServiceSkusNextResults(ctx context.Context, lastResults ResourceSkuResults) (result ResourceSkuResults, err error) {
+ req, err := lastResults.resourceSkuResultsPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListAvailableServiceSkusSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListAvailableServiceSkusResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.ServiceSkusClient", "listAvailableServiceSkusNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListAvailableServiceSkusComplete enumerates all values, automatically crossing page boundaries as required.
+func (client ServiceSkusClient) ListAvailableServiceSkusComplete(ctx context.Context, resourceGroupName string, serviceName string) (result ResourceSkuResultsIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServiceSkusClient.ListAvailableServiceSkus")
+ 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.ListAvailableServiceSkus(ctx, resourceGroupName, serviceName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go
index f83dd4fa807e..5d2c2266f231 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signinsettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewSignInSettingsClientWithBaseURI(baseURI string, subscriptionID string) S
// serviceName - the name of the API Management service.
// parameters - create or update parameters.
func (client SignInSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings) (result PortalSigninSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignInSettingsClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -123,6 +134,16 @@ func (client SignInSettingsClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client SignInSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PortalSigninSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignInSettingsClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -198,6 +219,16 @@ func (client SignInSettingsClient) GetResponder(resp *http.Response) (result Por
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client SignInSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignInSettingsClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -275,6 +306,16 @@ func (client SignInSettingsClient) GetEntityTagResponder(resp *http.Response) (r
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client SignInSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSigninSettings, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignInSettingsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go
index 944ff539959f..86f2c508fc42 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/signupsettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewSignUpSettingsClientWithBaseURI(baseURI string, subscriptionID string) S
// serviceName - the name of the API Management service.
// parameters - create or update parameters.
func (client SignUpSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings) (result PortalSignupSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignUpSettingsClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -123,6 +134,16 @@ func (client SignUpSettingsClient) CreateOrUpdateResponder(resp *http.Response)
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client SignUpSettingsClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result PortalSignupSettings, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignUpSettingsClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -198,6 +219,16 @@ func (client SignUpSettingsClient) GetResponder(resp *http.Response) (result Por
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client SignUpSettingsClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignUpSettingsClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -275,6 +306,16 @@ func (client SignUpSettingsClient) GetEntityTagResponder(resp *http.Response) (r
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client SignUpSettingsClient) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters PortalSignupSettings, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SignUpSettingsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go
index f36daa5ce488..4ec18de23dfc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/subscription.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -52,6 +53,16 @@ func NewSubscriptionClientWithBaseURI(baseURI string, subscriptionID string) Sub
// - If true, send email notification of change of state of subscription
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters SubscriptionCreateParameters, notify *bool, ifMatch string) (result SubscriptionContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -62,8 +73,7 @@ func (client SubscriptionClient) CreateOrUpdate(ctx context.Context, resourceGro
{Target: "sid", Name: validation.Pattern, Rule: `(^[\w]+$)|(^[\w][\w\-]+[\w]$)`, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.UserID", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "parameters.SubscriptionCreateParameterProperties.ProductID", Name: validation.Null, Rule: true, Chain: nil},
+ Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.Scope", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.MaxLength, Rule: 100, Chain: nil},
{Target: "parameters.SubscriptionCreateParameterProperties.DisplayName", Name: validation.MinLength, Rule: 1, Chain: nil},
@@ -161,6 +171,16 @@ func (client SubscriptionClient) CreateOrUpdateResponder(resp *http.Response) (r
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client SubscriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, sid string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -242,6 +262,16 @@ func (client SubscriptionClient) DeleteResponder(resp *http.Response) (result au
// sid - subscription entity Identifier. The entity represents the association between a user and a product in
// API Management.
func (client SubscriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result SubscriptionContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -323,6 +353,16 @@ func (client SubscriptionClient) GetResponder(resp *http.Response) (result Subsc
// sid - subscription entity Identifier. The entity represents the association between a user and a product in
// API Management.
func (client SubscriptionClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -405,12 +445,22 @@ func (client SubscriptionClient) GetEntityTagResponder(resp *http.Response) (res
// | id | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// | stateComment | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
-// | userId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
-// | productId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | ownerId | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
+// | scope | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// | state | eq | |
// top - number of records to return.
// skip - number of records to skip.
func (client SubscriptionClient) List(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.List")
+ defer func() {
+ sc := -1
+ if result.sc.Response.Response != nil {
+ sc = result.sc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -498,8 +548,8 @@ func (client SubscriptionClient) ListResponder(resp *http.Response) (result Subs
}
// listNextResults retrieves the next set of results, if any.
-func (client SubscriptionClient) listNextResults(lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
- req, err := lastResults.subscriptionCollectionPreparer()
+func (client SubscriptionClient) listNextResults(ctx context.Context, lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
+ req, err := lastResults.subscriptionCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.SubscriptionClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -520,6 +570,16 @@ func (client SubscriptionClient) listNextResults(lastResults SubscriptionCollect
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SubscriptionClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result SubscriptionCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.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, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -531,6 +591,16 @@ func (client SubscriptionClient) ListComplete(ctx context.Context, resourceGroup
// sid - subscription entity Identifier. The entity represents the association between a user and a product in
// API Management.
func (client SubscriptionClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.RegeneratePrimaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -611,6 +681,16 @@ func (client SubscriptionClient) RegeneratePrimaryKeyResponder(resp *http.Respon
// sid - subscription entity Identifier. The entity represents the association between a user and a product in
// API Management.
func (client SubscriptionClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string, sid string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.RegenerateSecondaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -684,7 +764,7 @@ func (client SubscriptionClient) RegenerateSecondaryKeyResponder(resp *http.Resp
return
}
-// Update updates the details of a subscription specificied by its identifier.
+// Update updates the details of a subscription specified by its identifier.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -697,6 +777,16 @@ func (client SubscriptionClient) RegenerateSecondaryKeyResponder(resp *http.Resp
// - If false, do not send any email notification for change of state of subscription
// - If true, send email notification of change of state of subscription
func (client SubscriptionClient) Update(ctx context.Context, resourceGroupName string, serviceName string, sid string, parameters SubscriptionUpdateParameters, ifMatch string, notify *bool) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go
index 3c52f09aec71..15c281b2dbb6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tag.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewTagClientWithBaseURI(baseURI string, subscriptionID string) TagClient {
// tagID - tag identifier. Must be unique in the current API Management service instance.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client TagClient) AssignToAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToAPI")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -144,6 +155,16 @@ func (client TagClient) AssignToAPIResponder(resp *http.Response) (result TagCon
// tagID - tag identifier. Must be unique in the current API Management service instance.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client TagClient) AssignToOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToOperation")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -241,6 +262,16 @@ func (client TagClient) AssignToOperationResponder(resp *http.Response) (result
// tagID - tag identifier. Must be unique in the current API Management service instance.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client TagClient) AssignToProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.AssignToProduct")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -332,6 +363,16 @@ func (client TagClient) AssignToProductResponder(resp *http.Response) (result Ta
// tagID - tag identifier. Must be unique in the current API Management service instance.
// parameters - create parameters.
func (client TagClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -424,6 +465,16 @@ func (client TagClient) CreateOrUpdateResponder(resp *http.Response) (result Tag
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, tagID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -509,6 +560,16 @@ func (client TagClient) DeleteResponder(resp *http.Response) (result autorest.Re
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagClient) DetachFromAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromAPI")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -601,6 +662,16 @@ func (client TagClient) DetachFromAPIResponder(resp *http.Response) (result auto
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagClient) DetachFromOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromOperation")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -695,6 +766,16 @@ func (client TagClient) DetachFromOperationResponder(resp *http.Response) (resul
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagClient) DetachFromProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.DetachFromProduct")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -781,6 +862,16 @@ func (client TagClient) DetachFromProductResponder(resp *http.Response) (result
// serviceName - the name of the API Management service.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) Get(ctx context.Context, resourceGroupName string, serviceName string, tagID string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -864,6 +955,16 @@ func (client TagClient) GetResponder(resp *http.Response) (result TagContract, e
// revision has ;rev=n as a suffix where n is the revision number.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetByAPI")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -954,6 +1055,16 @@ func (client TagClient) GetByAPIResponder(resp *http.Response) (result TagContra
// instance.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetByOperation")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1046,6 +1157,16 @@ func (client TagClient) GetByOperationResponder(resp *http.Response) (result Tag
// productID - product identifier. Must be unique in the current API Management service instance.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result TagContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetByProduct")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1132,6 +1253,16 @@ func (client TagClient) GetByProductResponder(resp *http.Response) (result TagCo
// serviceName - the name of the API Management service.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, tagID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetEntityState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1214,6 +1345,16 @@ func (client TagClient) GetEntityStateResponder(resp *http.Response) (result aut
// revision has ;rev=n as a suffix where n is the revision number.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetEntityStateByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetEntityStateByAPI")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1303,6 +1444,16 @@ func (client TagClient) GetEntityStateByAPIResponder(resp *http.Response) (resul
// instance.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetEntityStateByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, tagID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetEntityStateByOperation")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1394,6 +1545,16 @@ func (client TagClient) GetEntityStateByOperationResponder(resp *http.Response)
// productID - product identifier. Must be unique in the current API Management service instance.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagClient) GetEntityStateByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, tagID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.GetEntityStateByProduct")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1486,6 +1647,16 @@ func (client TagClient) GetEntityStateByProductResponder(resp *http.Response) (r
// top - number of records to return.
// skip - number of records to skip.
func (client TagClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByAPI")
+ defer func() {
+ sc := -1
+ if result.tc.Response.Response != nil {
+ sc = result.tc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1578,8 +1749,8 @@ func (client TagClient) ListByAPIResponder(resp *http.Response) (result TagColle
}
// listByAPINextResults retrieves the next set of results, if any.
-func (client TagClient) listByAPINextResults(lastResults TagCollection) (result TagCollection, err error) {
- req, err := lastResults.tagCollectionPreparer()
+func (client TagClient) listByAPINextResults(ctx context.Context, lastResults TagCollection) (result TagCollection, err error) {
+ req, err := lastResults.tagCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagClient", "listByAPINextResults", nil, "Failure preparing next results request")
}
@@ -1600,6 +1771,16 @@ func (client TagClient) listByAPINextResults(lastResults TagCollection) (result
// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required.
func (client TagClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByAPI")
+ 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.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
@@ -1622,6 +1803,16 @@ func (client TagClient) ListByAPIComplete(ctx context.Context, resourceGroupName
// top - number of records to return.
// skip - number of records to skip.
func (client TagClient) ListByOperation(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByOperation")
+ defer func() {
+ sc := -1
+ if result.tc.Response.Response != nil {
+ sc = result.tc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1719,8 +1910,8 @@ func (client TagClient) ListByOperationResponder(resp *http.Response) (result Ta
}
// listByOperationNextResults retrieves the next set of results, if any.
-func (client TagClient) listByOperationNextResults(lastResults TagCollection) (result TagCollection, err error) {
- req, err := lastResults.tagCollectionPreparer()
+func (client TagClient) listByOperationNextResults(ctx context.Context, lastResults TagCollection) (result TagCollection, err error) {
+ req, err := lastResults.tagCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagClient", "listByOperationNextResults", nil, "Failure preparing next results request")
}
@@ -1741,6 +1932,16 @@ func (client TagClient) listByOperationNextResults(lastResults TagCollection) (r
// ListByOperationComplete enumerates all values, automatically crossing page boundaries as required.
func (client TagClient) ListByOperationComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, operationID string, filter string, top *int32, skip *int32) (result TagCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByOperation")
+ 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.ListByOperation(ctx, resourceGroupName, serviceName, apiid, operationID, filter, top, skip)
return
}
@@ -1757,6 +1958,16 @@ func (client TagClient) ListByOperationComplete(ctx context.Context, resourceGro
// top - number of records to return.
// skip - number of records to skip.
func (client TagClient) ListByProduct(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByProduct")
+ defer func() {
+ sc := -1
+ if result.tc.Response.Response != nil {
+ sc = result.tc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1849,8 +2060,8 @@ func (client TagClient) ListByProductResponder(resp *http.Response) (result TagC
}
// listByProductNextResults retrieves the next set of results, if any.
-func (client TagClient) listByProductNextResults(lastResults TagCollection) (result TagCollection, err error) {
- req, err := lastResults.tagCollectionPreparer()
+func (client TagClient) listByProductNextResults(ctx context.Context, lastResults TagCollection) (result TagCollection, err error) {
+ req, err := lastResults.tagCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagClient", "listByProductNextResults", nil, "Failure preparing next results request")
}
@@ -1871,6 +2082,16 @@ func (client TagClient) listByProductNextResults(lastResults TagCollection) (res
// ListByProductComplete enumerates all values, automatically crossing page boundaries as required.
func (client TagClient) ListByProductComplete(ctx context.Context, resourceGroupName string, serviceName string, productID string, filter string, top *int32, skip *int32) (result TagCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByProduct")
+ 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.ListByProduct(ctx, resourceGroupName, serviceName, productID, filter, top, skip)
return
}
@@ -1885,7 +2106,18 @@ func (client TagClient) ListByProductComplete(ctx context.Context, resourceGroup
// | name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith |
// top - number of records to return.
// skip - number of records to skip.
-func (client TagClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagCollectionPage, err error) {
+// scope - scope like 'apis', 'products' or 'apis/{apiId}
+func (client TagClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result TagCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.tc.Response.Response != nil {
+ sc = result.tc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -1901,7 +2133,7 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str
}
result.fn = client.listByServiceNextResults
- req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip)
+ req, err := client.ListByServicePreparer(ctx, resourceGroupName, serviceName, filter, top, skip, scope)
if err != nil {
err = autorest.NewErrorWithError(err, "apimanagement.TagClient", "ListByService", nil, "Failure preparing request")
return
@@ -1923,7 +2155,7 @@ func (client TagClient) ListByService(ctx context.Context, resourceGroupName str
}
// ListByServicePreparer prepares the ListByService request.
-func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (*http.Request, error) {
+func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (*http.Request, error) {
pathParameters := map[string]interface{}{
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"serviceName": autorest.Encode("path", serviceName),
@@ -1943,6 +2175,9 @@ func (client TagClient) ListByServicePreparer(ctx context.Context, resourceGroup
if skip != nil {
queryParameters["$skip"] = autorest.Encode("query", *skip)
}
+ if len(scope) > 0 {
+ queryParameters["scope"] = autorest.Encode("query", scope)
+ }
preparer := autorest.CreatePreparer(
autorest.AsGet(),
@@ -1973,8 +2208,8 @@ func (client TagClient) ListByServiceResponder(resp *http.Response) (result TagC
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client TagClient) listByServiceNextResults(lastResults TagCollection) (result TagCollection, err error) {
- req, err := lastResults.tagCollectionPreparer()
+func (client TagClient) listByServiceNextResults(ctx context.Context, lastResults TagCollection) (result TagCollection, err error) {
+ req, err := lastResults.tagCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -1994,8 +2229,18 @@ func (client TagClient) listByServiceNextResults(lastResults TagCollection) (res
}
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
-func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagCollectionIterator, err error) {
- result.page, err = client.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
+func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32, scope string) (result TagCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip, scope)
return
}
@@ -2008,6 +2253,16 @@ func (client TagClient) ListByServiceComplete(ctx context.Context, resourceGroup
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagClient) Update(ctx context.Context, resourceGroupName string, serviceName string, tagID string, parameters TagCreateUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go
index fbd95fb62684..1d8827822696 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagdescription.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -40,7 +41,7 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T
return TagDescriptionClient{NewWithBaseURI(baseURI, subscriptionID)}
}
-// CreateOrUpdate create/Update tag fescription in scope of the Api.
+// CreateOrUpdate create/Update tag description in scope of the Api.
// Parameters:
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
@@ -50,6 +51,16 @@ func NewTagDescriptionClientWithBaseURI(baseURI string, subscriptionID string) T
// parameters - create parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client TagDescriptionClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, parameters TagDescriptionCreateParameters, ifMatch string) (result TagDescriptionContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -151,6 +162,16 @@ func (client TagDescriptionClient) CreateOrUpdateResponder(resp *http.Response)
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TagDescriptionClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -239,6 +260,16 @@ func (client TagDescriptionClient) DeleteResponder(resp *http.Response) (result
// revision has ;rev=n as a suffix where n is the revision number.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagDescriptionClient) Get(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result TagDescriptionContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -327,6 +358,16 @@ func (client TagDescriptionClient) GetResponder(resp *http.Response) (result Tag
// revision has ;rev=n as a suffix where n is the revision number.
// tagID - tag identifier. Must be unique in the current API Management service instance.
func (client TagDescriptionClient) GetEntityState(ctx context.Context, resourceGroupName string, serviceName string, apiid string, tagID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.GetEntityState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -420,6 +461,16 @@ func (client TagDescriptionClient) GetEntityStateResponder(resp *http.Response)
// top - number of records to return.
// skip - number of records to skip.
func (client TagDescriptionClient) ListByAPI(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.ListByAPI")
+ defer func() {
+ sc := -1
+ if result.tdc.Response.Response != nil {
+ sc = result.tdc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -512,8 +563,8 @@ func (client TagDescriptionClient) ListByAPIResponder(resp *http.Response) (resu
}
// listByAPINextResults retrieves the next set of results, if any.
-func (client TagDescriptionClient) listByAPINextResults(lastResults TagDescriptionCollection) (result TagDescriptionCollection, err error) {
- req, err := lastResults.tagDescriptionCollectionPreparer()
+func (client TagDescriptionClient) listByAPINextResults(ctx context.Context, lastResults TagDescriptionCollection) (result TagDescriptionCollection, err error) {
+ req, err := lastResults.tagDescriptionCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagDescriptionClient", "listByAPINextResults", nil, "Failure preparing next results request")
}
@@ -534,6 +585,16 @@ func (client TagDescriptionClient) listByAPINextResults(lastResults TagDescripti
// ListByAPIComplete enumerates all values, automatically crossing page boundaries as required.
func (client TagDescriptionClient) ListByAPIComplete(ctx context.Context, resourceGroupName string, serviceName string, apiid string, filter string, top *int32, skip *int32) (result TagDescriptionCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagDescriptionClient.ListByAPI")
+ 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.ListByAPI(ctx, resourceGroupName, serviceName, apiid, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go
index 30d624e1f9dc..349f2a5512d2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tagresource.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -62,6 +63,16 @@ func NewTagResourceClientWithBaseURI(baseURI string, subscriptionID string) TagR
// top - number of records to return.
// skip - number of records to skip.
func (client TagResourceClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.trc.Response.Response != nil {
+ sc = result.trc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -149,8 +160,8 @@ func (client TagResourceClient) ListByServiceResponder(resp *http.Response) (res
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client TagResourceClient) listByServiceNextResults(lastResults TagResourceCollection) (result TagResourceCollection, err error) {
- req, err := lastResults.tagResourceCollectionPreparer()
+func (client TagResourceClient) listByServiceNextResults(ctx context.Context, lastResults TagResourceCollection) (result TagResourceCollection, err error) {
+ req, err := lastResults.tagResourceCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.TagResourceClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -171,6 +182,16 @@ func (client TagResourceClient) listByServiceNextResults(lastResults TagResource
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client TagResourceClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result TagResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TagResourceClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go
index 4f75d4985ee8..2dedf74c6ad2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccess.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewTenantAccessClientWithBaseURI(baseURI string, subscriptionID string) Ten
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result AccessInformationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -121,6 +132,16 @@ func (client TenantAccessClient) GetResponder(resp *http.Response) (result Acces
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessClient.RegeneratePrimaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -196,6 +217,16 @@ func (client TenantAccessClient) RegeneratePrimaryKeyResponder(resp *http.Respon
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessClient.RegenerateSecondaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -274,6 +305,16 @@ func (client TenantAccessClient) RegenerateSecondaryKeyResponder(resp *http.Resp
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client TenantAccessClient) Update(ctx context.Context, resourceGroupName string, serviceName string, parameters AccessInformationUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go
index 87a1816e9a25..3bb5c237fd93 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantaccessgit.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewTenantAccessGitClientWithBaseURI(baseURI string, subscriptionID string)
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessGitClient) Get(ctx context.Context, resourceGroupName string, serviceName string) (result AccessInformationContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessGitClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -121,6 +132,16 @@ func (client TenantAccessGitClient) GetResponder(resp *http.Response) (result Ac
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessGitClient) RegeneratePrimaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessGitClient.RegeneratePrimaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -196,6 +217,16 @@ func (client TenantAccessGitClient) RegeneratePrimaryKeyResponder(resp *http.Res
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantAccessGitClient) RegenerateSecondaryKey(ctx context.Context, resourceGroupName string, serviceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantAccessGitClient.RegenerateSecondaryKey")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go
index 133f64021e42..9aea9823149b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/tenantconfiguration.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewTenantConfigurationClientWithBaseURI(baseURI string, subscriptionID stri
// serviceName - the name of the API Management service.
// parameters - deploy Configuration parameters.
func (client TenantConfigurationClient) Deploy(ctx context.Context, resourceGroupName string, serviceName string, parameters DeployConfigurationParameters) (result TenantConfigurationDeployFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantConfigurationClient.Deploy")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -105,10 +116,6 @@ func (client TenantConfigurationClient) DeploySender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -132,6 +139,16 @@ func (client TenantConfigurationClient) DeployResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// serviceName - the name of the API Management service.
func (client TenantConfigurationClient) GetSyncState(ctx context.Context, resourceGroupName string, serviceName string) (result TenantConfigurationSyncStateContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantConfigurationClient.GetSyncState")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -210,6 +227,16 @@ func (client TenantConfigurationClient) GetSyncStateResponder(resp *http.Respons
// serviceName - the name of the API Management service.
// parameters - save Configuration parameters.
func (client TenantConfigurationClient) Save(ctx context.Context, resourceGroupName string, serviceName string, parameters SaveConfigurationParameter) (result TenantConfigurationSaveFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantConfigurationClient.Save")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -268,10 +295,6 @@ func (client TenantConfigurationClient) SaveSender(req *http.Request) (future Te
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -296,6 +319,16 @@ func (client TenantConfigurationClient) SaveResponder(resp *http.Response) (resu
// serviceName - the name of the API Management service.
// parameters - validate Configuration parameters.
func (client TenantConfigurationClient) Validate(ctx context.Context, resourceGroupName string, serviceName string, parameters DeployConfigurationParameters) (result TenantConfigurationValidateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantConfigurationClient.Validate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -354,10 +387,6 @@ func (client TenantConfigurationClient) ValidateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go
index 801303186562..2c17e936e054 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/user.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewUserClientWithBaseURI(baseURI string, subscriptionID string) UserClient
// parameters - create or update parameters.
// ifMatch - eTag of the Entity. Not required when creating an entity, but required when updating an entity.
func (client UserClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserCreateParameters, ifMatch string) (result UserContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.CreateOrUpdate")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -154,6 +165,16 @@ func (client UserClient) CreateOrUpdateResponder(resp *http.Response) (result Us
// deleteSubscriptions - whether to delete user's subscription or not.
// notify - send an Account Closed Email notification to the User.
func (client UserClient) Delete(ctx context.Context, resourceGroupName string, serviceName string, UID string, ifMatch string, deleteSubscriptions *bool, notify *bool) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -242,6 +263,16 @@ func (client UserClient) DeleteResponder(resp *http.Response) (result autorest.R
// serviceName - the name of the API Management service.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client UserClient) GenerateSsoURL(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result GenerateSsoURLResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GenerateSsoURL")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -323,6 +354,16 @@ func (client UserClient) GenerateSsoURLResponder(resp *http.Response) (result Ge
// serviceName - the name of the API Management service.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client UserClient) Get(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserContract, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Get")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -404,6 +445,16 @@ func (client UserClient) GetResponder(resp *http.Response) (result UserContract,
// serviceName - the name of the API Management service.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client UserClient) GetEntityTag(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetEntityTag")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -478,6 +529,91 @@ func (client UserClient) GetEntityTagResponder(resp *http.Response) (result auto
return
}
+// GetIdentity returns calling user identity information.
+// Parameters:
+// resourceGroupName - the name of the resource group.
+// serviceName - the name of the API Management service.
+func (client UserClient) GetIdentity(ctx context.Context, resourceGroupName string, serviceName string) (result CurrentUserIdentity, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetIdentity")
+ 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: serviceName,
+ Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
+ {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil},
+ {Target: "serviceName", Name: validation.Pattern, Rule: `^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("apimanagement.UserClient", "GetIdentity", err.Error())
+ }
+
+ req, err := client.GetIdentityPreparer(ctx, resourceGroupName, serviceName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetIdentitySender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetIdentityResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "apimanagement.UserClient", "GetIdentity", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetIdentityPreparer prepares the GetIdentity request.
+func (client UserClient) GetIdentityPreparer(ctx context.Context, resourceGroupName string, serviceName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serviceName": autorest.Encode("path", serviceName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/identity", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetIdentitySender sends the GetIdentity request. The method will close the
+// http.Response Body if it receives an error.
+func (client UserClient) GetIdentitySender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetIdentityResponder handles the response to the GetIdentity request. The method always
+// closes the http.Response Body.
+func (client UserClient) GetIdentityResponder(resp *http.Response) (result CurrentUserIdentity, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
// GetSharedAccessToken gets the Shared Access Authorization Token for the User.
// Parameters:
// resourceGroupName - the name of the resource group.
@@ -485,6 +621,16 @@ func (client UserClient) GetEntityTagResponder(resp *http.Response) (result auto
// UID - user identifier. Must be unique in the current API Management service instance.
// parameters - create Authorization Token parameters.
func (client UserClient) GetSharedAccessToken(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserTokenParameters) (result UserTokenResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.GetSharedAccessToken")
+ 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: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -580,6 +726,16 @@ func (client UserClient) GetSharedAccessTokenResponder(resp *http.Response) (res
// top - number of records to return.
// skip - number of records to skip.
func (client UserClient) ListByService(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result UserCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.ListByService")
+ defer func() {
+ sc := -1
+ if result.uc.Response.Response != nil {
+ sc = result.uc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -667,8 +823,8 @@ func (client UserClient) ListByServiceResponder(resp *http.Response) (result Use
}
// listByServiceNextResults retrieves the next set of results, if any.
-func (client UserClient) listByServiceNextResults(lastResults UserCollection) (result UserCollection, err error) {
- req, err := lastResults.userCollectionPreparer()
+func (client UserClient) listByServiceNextResults(ctx context.Context, lastResults UserCollection) (result UserCollection, err error) {
+ req, err := lastResults.userCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.UserClient", "listByServiceNextResults", nil, "Failure preparing next results request")
}
@@ -689,6 +845,16 @@ func (client UserClient) listByServiceNextResults(lastResults UserCollection) (r
// ListByServiceComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGroupName string, serviceName string, filter string, top *int32, skip *int32) (result UserCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.ListByService")
+ 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.ListByService(ctx, resourceGroupName, serviceName, filter, top, skip)
return
}
@@ -702,6 +868,16 @@ func (client UserClient) ListByServiceComplete(ctx context.Context, resourceGrou
// ifMatch - eTag of the Entity. ETag should match the current entity state from the header response of the GET
// request or it should be * for unconditional update.
func (client UserClient) Update(ctx context.Context, resourceGroupName string, serviceName string, UID string, parameters UserUpdateParameters, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go
index cf68f0b65820..0e867cff299d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usergroup.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -53,6 +54,16 @@ func NewUserGroupClientWithBaseURI(baseURI string, subscriptionID string) UserGr
// top - number of records to return.
// skip - number of records to skip.
func (client UserGroupClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result GroupCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserGroupClient.List")
+ defer func() {
+ sc := -1
+ if result.gc.Response.Response != nil {
+ sc = result.gc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -145,8 +156,8 @@ func (client UserGroupClient) ListResponder(resp *http.Response) (result GroupCo
}
// listNextResults retrieves the next set of results, if any.
-func (client UserGroupClient) listNextResults(lastResults GroupCollection) (result GroupCollection, err error) {
- req, err := lastResults.groupCollectionPreparer()
+func (client UserGroupClient) listNextResults(ctx context.Context, lastResults GroupCollection) (result GroupCollection, err error) {
+ req, err := lastResults.groupCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.UserGroupClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -167,6 +178,16 @@ func (client UserGroupClient) listNextResults(lastResults GroupCollection) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserGroupClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result GroupCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserGroupClient.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, resourceGroupName, serviceName, UID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go
index 5e354a9c4d51..c415a3a4ea38 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/useridentities.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewUserIdentitiesClientWithBaseURI(baseURI string, subscriptionID string) U
// serviceName - the name of the API Management service.
// UID - user identifier. Must be unique in the current API Management service instance.
func (client UserIdentitiesClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserIdentityCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentitiesClient.List")
+ defer func() {
+ sc := -1
+ if result.uic.Response.Response != nil {
+ sc = result.uic.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -123,8 +134,8 @@ func (client UserIdentitiesClient) ListResponder(resp *http.Response) (result Us
}
// listNextResults retrieves the next set of results, if any.
-func (client UserIdentitiesClient) listNextResults(lastResults UserIdentityCollection) (result UserIdentityCollection, err error) {
- req, err := lastResults.userIdentityCollectionPreparer()
+func (client UserIdentitiesClient) listNextResults(ctx context.Context, lastResults UserIdentityCollection) (result UserIdentityCollection, err error) {
+ req, err := lastResults.userIdentityCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.UserIdentitiesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -145,6 +156,16 @@ func (client UserIdentitiesClient) listNextResults(lastResults UserIdentityColle
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserIdentitiesClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string) (result UserIdentityCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserIdentitiesClient.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, resourceGroupName, serviceName, UID)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go
index afa0bf1b137d..547c9946e12e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/apimanagement/mgmt/2018-06-01-preview/apimanagement/usersubscription.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -56,6 +57,16 @@ func NewUserSubscriptionClientWithBaseURI(baseURI string, subscriptionID string)
// top - number of records to return.
// skip - number of records to skip.
func (client UserSubscriptionClient) List(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserSubscriptionClient.List")
+ defer func() {
+ sc := -1
+ if result.sc.Response.Response != nil {
+ sc = result.sc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: serviceName,
Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
@@ -148,8 +159,8 @@ func (client UserSubscriptionClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client UserSubscriptionClient) listNextResults(lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
- req, err := lastResults.subscriptionCollectionPreparer()
+func (client UserSubscriptionClient) listNextResults(ctx context.Context, lastResults SubscriptionCollection) (result SubscriptionCollection, err error) {
+ req, err := lastResults.subscriptionCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "apimanagement.UserSubscriptionClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -170,6 +181,16 @@ func (client UserSubscriptionClient) listNextResults(lastResults SubscriptionCol
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserSubscriptionClient) ListComplete(ctx context.Context, resourceGroupName string, serviceName string, UID string, filter string, top *int32, skip *int32) (result SubscriptionCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserSubscriptionClient.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, resourceGroupName, serviceName, UID, filter, top, skip)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go
index 5e46de7a5bf1..c66bfbaf6024 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/classicadministrators.go
@@ -21,13 +21,11 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
-// ClassicAdministratorsClient is the role based access control provides you a way to apply granular level policy
-// administration down to individual resources or resource groups. These operations enable you to manage role
-// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
-// A role assignment grants access to Azure Active Directory users.
+// ClassicAdministratorsClient is the client for the ClassicAdministrators methods of the Authorization service.
type ClassicAdministratorsClient struct {
BaseClient
}
@@ -44,6 +42,16 @@ func NewClassicAdministratorsClientWithBaseURI(baseURI string, subscriptionID st
// List gets service administrator, account administrator, and co-administrators for the subscription.
func (client ClassicAdministratorsClient) List(ctx context.Context) (result ClassicAdministratorListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ClassicAdministratorsClient.List")
+ defer func() {
+ sc := -1
+ if result.calr.Response.Response != nil {
+ sc = result.calr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -106,8 +114,8 @@ func (client ClassicAdministratorsClient) ListResponder(resp *http.Response) (re
}
// listNextResults retrieves the next set of results, if any.
-func (client ClassicAdministratorsClient) listNextResults(lastResults ClassicAdministratorListResult) (result ClassicAdministratorListResult, err error) {
- req, err := lastResults.classicAdministratorListResultPreparer()
+func (client ClassicAdministratorsClient) listNextResults(ctx context.Context, lastResults ClassicAdministratorListResult) (result ClassicAdministratorListResult, err error) {
+ req, err := lastResults.classicAdministratorListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.ClassicAdministratorsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -128,6 +136,16 @@ func (client ClassicAdministratorsClient) listNextResults(lastResults ClassicAdm
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ClassicAdministratorsClient) ListComplete(ctx context.Context) (result ClassicAdministratorListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ClassicAdministratorsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go
index 6b6f6de95ef0..362420bdfa36 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/client.go
@@ -1,9 +1,6 @@
// Package authorization implements the Azure ARM Authorization service API version .
//
-// Role based access control provides you a way to apply granular level policy administration down to individual
-// resources or resource groups. These operations enable you to manage role definitions and role assignments. A role
-// definition describes the set of actions that can be performed on resources. A role assignment grants access to Azure
-// Active Directory users.
+//
package authorization
// Copyright (c) Microsoft and contributors. All rights reserved.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/models.go
index 4f279ec7f00d..41fe00970ec1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/models.go
@@ -18,12 +18,17 @@ package authorization
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization"
+
// ClassicAdministrator classic Administrators
type ClassicAdministrator struct {
// ID - The ID of the administrator.
@@ -114,20 +119,31 @@ type ClassicAdministratorListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ClassicAdministratorListResultIterator provides access to a complete listing of ClassicAdministrator values.
+// ClassicAdministratorListResultIterator provides access to a complete listing of ClassicAdministrator
+// values.
type ClassicAdministratorListResultIterator struct {
i int
page ClassicAdministratorListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ClassicAdministratorListResultIterator) Next() error {
+func (iter *ClassicAdministratorListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ClassicAdministratorListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -136,6 +152,13 @@ func (iter *ClassicAdministratorListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ClassicAdministratorListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ClassicAdministratorListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -155,6 +178,11 @@ func (iter ClassicAdministratorListResultIterator) Value() ClassicAdministrator
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ClassicAdministratorListResultIterator type.
+func NewClassicAdministratorListResultIterator(page ClassicAdministratorListResultPage) ClassicAdministratorListResultIterator {
+ return ClassicAdministratorListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (calr ClassicAdministratorListResult) IsEmpty() bool {
return calr.Value == nil || len(*calr.Value) == 0
@@ -162,11 +190,11 @@ func (calr ClassicAdministratorListResult) IsEmpty() bool {
// classicAdministratorListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (calr ClassicAdministratorListResult) classicAdministratorListResultPreparer() (*http.Request, error) {
+func (calr ClassicAdministratorListResult) classicAdministratorListResultPreparer(ctx context.Context) (*http.Request, error) {
if calr.NextLink == nil || len(to.String(calr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(calr.NextLink)))
@@ -174,14 +202,24 @@ func (calr ClassicAdministratorListResult) classicAdministratorListResultPrepare
// ClassicAdministratorListResultPage contains a page of ClassicAdministrator values.
type ClassicAdministratorListResultPage struct {
- fn func(ClassicAdministratorListResult) (ClassicAdministratorListResult, error)
+ fn func(context.Context, ClassicAdministratorListResult) (ClassicAdministratorListResult, error)
calr ClassicAdministratorListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ClassicAdministratorListResultPage) Next() error {
- next, err := page.fn(page.calr)
+func (page *ClassicAdministratorListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ClassicAdministratorListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.calr)
if err != nil {
return err
}
@@ -189,6 +227,13 @@ func (page *ClassicAdministratorListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ClassicAdministratorListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ClassicAdministratorListResultPage) NotDone() bool {
return !page.calr.IsEmpty()
@@ -207,6 +252,11 @@ func (page ClassicAdministratorListResultPage) Values() []ClassicAdministrator {
return *page.calr.Value
}
+// Creates a new instance of the ClassicAdministratorListResultPage type.
+func NewClassicAdministratorListResultPage(getNextPage func(context.Context, ClassicAdministratorListResult) (ClassicAdministratorListResult, error)) ClassicAdministratorListResultPage {
+ return ClassicAdministratorListResultPage{fn: getNextPage}
+}
+
// ClassicAdministratorProperties classic Administrator properties.
type ClassicAdministratorProperties struct {
// EmailAddress - The email address of the administrator.
@@ -242,14 +292,24 @@ type PermissionGetResultIterator struct {
page PermissionGetResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *PermissionGetResultIterator) Next() error {
+func (iter *PermissionGetResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionGetResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -258,6 +318,13 @@ func (iter *PermissionGetResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PermissionGetResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PermissionGetResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -277,6 +344,11 @@ func (iter PermissionGetResultIterator) Value() Permission {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the PermissionGetResultIterator type.
+func NewPermissionGetResultIterator(page PermissionGetResultPage) PermissionGetResultIterator {
+ return PermissionGetResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pgr PermissionGetResult) IsEmpty() bool {
return pgr.Value == nil || len(*pgr.Value) == 0
@@ -284,11 +356,11 @@ func (pgr PermissionGetResult) IsEmpty() bool {
// permissionGetResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pgr PermissionGetResult) permissionGetResultPreparer() (*http.Request, error) {
+func (pgr PermissionGetResult) permissionGetResultPreparer(ctx context.Context) (*http.Request, error) {
if pgr.NextLink == nil || len(to.String(pgr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pgr.NextLink)))
@@ -296,14 +368,24 @@ func (pgr PermissionGetResult) permissionGetResultPreparer() (*http.Request, err
// PermissionGetResultPage contains a page of Permission values.
type PermissionGetResultPage struct {
- fn func(PermissionGetResult) (PermissionGetResult, error)
+ fn func(context.Context, PermissionGetResult) (PermissionGetResult, error)
pgr PermissionGetResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *PermissionGetResultPage) Next() error {
- next, err := page.fn(page.pgr)
+func (page *PermissionGetResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionGetResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pgr)
if err != nil {
return err
}
@@ -311,6 +393,13 @@ func (page *PermissionGetResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PermissionGetResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PermissionGetResultPage) NotDone() bool {
return !page.pgr.IsEmpty()
@@ -329,6 +418,11 @@ func (page PermissionGetResultPage) Values() []Permission {
return *page.pgr.Value
}
+// Creates a new instance of the PermissionGetResultPage type.
+func NewPermissionGetResultPage(getNextPage func(context.Context, PermissionGetResult) (PermissionGetResult, error)) PermissionGetResultPage {
+ return PermissionGetResultPage{fn: getNextPage}
+}
+
// ProviderOperation operation
type ProviderOperation struct {
// Name - The operation name.
@@ -371,21 +465,31 @@ type ProviderOperationsMetadataListResult struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// ProviderOperationsMetadataListResultIterator provides access to a complete listing of ProviderOperationsMetadata
-// values.
+// ProviderOperationsMetadataListResultIterator provides access to a complete listing of
+// ProviderOperationsMetadata values.
type ProviderOperationsMetadataListResultIterator struct {
i int
page ProviderOperationsMetadataListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ProviderOperationsMetadataListResultIterator) Next() error {
+func (iter *ProviderOperationsMetadataListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsMetadataListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -394,6 +498,13 @@ func (iter *ProviderOperationsMetadataListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ProviderOperationsMetadataListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ProviderOperationsMetadataListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -413,6 +524,11 @@ func (iter ProviderOperationsMetadataListResultIterator) Value() ProviderOperati
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ProviderOperationsMetadataListResultIterator type.
+func NewProviderOperationsMetadataListResultIterator(page ProviderOperationsMetadataListResultPage) ProviderOperationsMetadataListResultIterator {
+ return ProviderOperationsMetadataListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pomlr ProviderOperationsMetadataListResult) IsEmpty() bool {
return pomlr.Value == nil || len(*pomlr.Value) == 0
@@ -420,11 +536,11 @@ func (pomlr ProviderOperationsMetadataListResult) IsEmpty() bool {
// providerOperationsMetadataListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pomlr ProviderOperationsMetadataListResult) providerOperationsMetadataListResultPreparer() (*http.Request, error) {
+func (pomlr ProviderOperationsMetadataListResult) providerOperationsMetadataListResultPreparer(ctx context.Context) (*http.Request, error) {
if pomlr.NextLink == nil || len(to.String(pomlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pomlr.NextLink)))
@@ -432,14 +548,24 @@ func (pomlr ProviderOperationsMetadataListResult) providerOperationsMetadataList
// ProviderOperationsMetadataListResultPage contains a page of ProviderOperationsMetadata values.
type ProviderOperationsMetadataListResultPage struct {
- fn func(ProviderOperationsMetadataListResult) (ProviderOperationsMetadataListResult, error)
+ fn func(context.Context, ProviderOperationsMetadataListResult) (ProviderOperationsMetadataListResult, error)
pomlr ProviderOperationsMetadataListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ProviderOperationsMetadataListResultPage) Next() error {
- next, err := page.fn(page.pomlr)
+func (page *ProviderOperationsMetadataListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsMetadataListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pomlr)
if err != nil {
return err
}
@@ -447,6 +573,13 @@ func (page *ProviderOperationsMetadataListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ProviderOperationsMetadataListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ProviderOperationsMetadataListResultPage) NotDone() bool {
return !page.pomlr.IsEmpty()
@@ -465,6 +598,11 @@ func (page ProviderOperationsMetadataListResultPage) Values() []ProviderOperatio
return *page.pomlr.Value
}
+// Creates a new instance of the ProviderOperationsMetadataListResultPage type.
+func NewProviderOperationsMetadataListResultPage(getNextPage func(context.Context, ProviderOperationsMetadataListResult) (ProviderOperationsMetadataListResult, error)) ProviderOperationsMetadataListResultPage {
+ return ProviderOperationsMetadataListResultPage{fn: getNextPage}
+}
+
// ResourceType resource Type
type ResourceType struct {
// Name - The resource type name.
@@ -600,7 +738,7 @@ func (racp *RoleAssignmentCreateParameters) UnmarshalJSON(body []byte) error {
type RoleAssignmentFilter struct {
// PrincipalID - Returns role assignment of the specific principal.
PrincipalID *string `json:"principalId,omitempty"`
- // CanDelegate - The Delegation flag for the roleassignment
+ // CanDelegate - The Delegation flag for the role assignment
CanDelegate *bool `json:"canDelegate,omitempty"`
}
@@ -619,14 +757,24 @@ type RoleAssignmentListResultIterator struct {
page RoleAssignmentListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RoleAssignmentListResultIterator) Next() error {
+func (iter *RoleAssignmentListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -635,6 +783,13 @@ func (iter *RoleAssignmentListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RoleAssignmentListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RoleAssignmentListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -654,6 +809,11 @@ func (iter RoleAssignmentListResultIterator) Value() RoleAssignment {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RoleAssignmentListResultIterator type.
+func NewRoleAssignmentListResultIterator(page RoleAssignmentListResultPage) RoleAssignmentListResultIterator {
+ return RoleAssignmentListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ralr RoleAssignmentListResult) IsEmpty() bool {
return ralr.Value == nil || len(*ralr.Value) == 0
@@ -661,11 +821,11 @@ func (ralr RoleAssignmentListResult) IsEmpty() bool {
// roleAssignmentListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ralr RoleAssignmentListResult) roleAssignmentListResultPreparer() (*http.Request, error) {
+func (ralr RoleAssignmentListResult) roleAssignmentListResultPreparer(ctx context.Context) (*http.Request, error) {
if ralr.NextLink == nil || len(to.String(ralr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ralr.NextLink)))
@@ -673,14 +833,24 @@ func (ralr RoleAssignmentListResult) roleAssignmentListResultPreparer() (*http.R
// RoleAssignmentListResultPage contains a page of RoleAssignment values.
type RoleAssignmentListResultPage struct {
- fn func(RoleAssignmentListResult) (RoleAssignmentListResult, error)
+ fn func(context.Context, RoleAssignmentListResult) (RoleAssignmentListResult, error)
ralr RoleAssignmentListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RoleAssignmentListResultPage) Next() error {
- next, err := page.fn(page.ralr)
+func (page *RoleAssignmentListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ralr)
if err != nil {
return err
}
@@ -688,6 +858,13 @@ func (page *RoleAssignmentListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RoleAssignmentListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RoleAssignmentListResultPage) NotDone() bool {
return !page.ralr.IsEmpty()
@@ -706,13 +883,18 @@ func (page RoleAssignmentListResultPage) Values() []RoleAssignment {
return *page.ralr.Value
}
+// Creates a new instance of the RoleAssignmentListResultPage type.
+func NewRoleAssignmentListResultPage(getNextPage func(context.Context, RoleAssignmentListResult) (RoleAssignmentListResult, error)) RoleAssignmentListResultPage {
+ return RoleAssignmentListResultPage{fn: getNextPage}
+}
+
// RoleAssignmentProperties role assignment properties.
type RoleAssignmentProperties struct {
// RoleDefinitionID - The role definition ID used in the role assignment.
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// PrincipalID - The principal ID assigned to the role. This maps to the ID inside the Active Directory. It can point to a user, service principal, or security group.
PrincipalID *string `json:"principalId,omitempty"`
- // CanDelegate - The delgation flag used for creating a role assignment
+ // CanDelegate - The delegation flag used for creating a role assignment
CanDelegate *bool `json:"canDelegate,omitempty"`
}
@@ -724,7 +906,7 @@ type RoleAssignmentPropertiesWithScope struct {
RoleDefinitionID *string `json:"roleDefinitionId,omitempty"`
// PrincipalID - The principal ID.
PrincipalID *string `json:"principalId,omitempty"`
- // CanDelegate - The Delegation flag for the roleassignment
+ // CanDelegate - The Delegation flag for the role assignment
CanDelegate *bool `json:"canDelegate,omitempty"`
}
@@ -833,14 +1015,24 @@ type RoleDefinitionListResultIterator struct {
page RoleDefinitionListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RoleDefinitionListResultIterator) Next() error {
+func (iter *RoleDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -849,6 +1041,13 @@ func (iter *RoleDefinitionListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RoleDefinitionListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RoleDefinitionListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -868,6 +1067,11 @@ func (iter RoleDefinitionListResultIterator) Value() RoleDefinition {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RoleDefinitionListResultIterator type.
+func NewRoleDefinitionListResultIterator(page RoleDefinitionListResultPage) RoleDefinitionListResultIterator {
+ return RoleDefinitionListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rdlr RoleDefinitionListResult) IsEmpty() bool {
return rdlr.Value == nil || len(*rdlr.Value) == 0
@@ -875,11 +1079,11 @@ func (rdlr RoleDefinitionListResult) IsEmpty() bool {
// roleDefinitionListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rdlr RoleDefinitionListResult) roleDefinitionListResultPreparer() (*http.Request, error) {
+func (rdlr RoleDefinitionListResult) roleDefinitionListResultPreparer(ctx context.Context) (*http.Request, error) {
if rdlr.NextLink == nil || len(to.String(rdlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rdlr.NextLink)))
@@ -887,14 +1091,24 @@ func (rdlr RoleDefinitionListResult) roleDefinitionListResultPreparer() (*http.R
// RoleDefinitionListResultPage contains a page of RoleDefinition values.
type RoleDefinitionListResultPage struct {
- fn func(RoleDefinitionListResult) (RoleDefinitionListResult, error)
+ fn func(context.Context, RoleDefinitionListResult) (RoleDefinitionListResult, error)
rdlr RoleDefinitionListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RoleDefinitionListResultPage) Next() error {
- next, err := page.fn(page.rdlr)
+func (page *RoleDefinitionListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rdlr)
if err != nil {
return err
}
@@ -902,6 +1116,13 @@ func (page *RoleDefinitionListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RoleDefinitionListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RoleDefinitionListResultPage) NotDone() bool {
return !page.rdlr.IsEmpty()
@@ -920,6 +1141,11 @@ func (page RoleDefinitionListResultPage) Values() []RoleDefinition {
return *page.rdlr.Value
}
+// Creates a new instance of the RoleDefinitionListResultPage type.
+func NewRoleDefinitionListResultPage(getNextPage func(context.Context, RoleDefinitionListResult) (RoleDefinitionListResult, error)) RoleDefinitionListResultPage {
+ return RoleDefinitionListResultPage{fn: getNextPage}
+}
+
// RoleDefinitionProperties role definition properties.
type RoleDefinitionProperties struct {
// RoleName - The role name.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go
index 9c97551b1eb9..4fcabb91de6d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/permissions.go
@@ -21,13 +21,11 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
-// PermissionsClient is the role based access control provides you a way to apply granular level policy administration
-// down to individual resources or resource groups. These operations enable you to manage role definitions and role
-// assignments. A role definition describes the set of actions that can be performed on resources. A role assignment
-// grants access to Azure Active Directory users.
+// PermissionsClient is the client for the Permissions methods of the Authorization service.
type PermissionsClient struct {
BaseClient
}
@@ -50,6 +48,16 @@ func NewPermissionsClientWithBaseURI(baseURI string, subscriptionID string) Perm
// resourceType - the resource type of the resource.
// resourceName - the name of the resource to get the permissions for.
func (client PermissionsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.ListForResource")
+ defer func() {
+ sc := -1
+ if result.pgr.Response.Response != nil {
+ sc = result.pgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listForResourceNextResults
req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
if err != nil {
@@ -117,8 +125,8 @@ func (client PermissionsClient) ListForResourceResponder(resp *http.Response) (r
}
// listForResourceNextResults retrieves the next set of results, if any.
-func (client PermissionsClient) listForResourceNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) {
- req, err := lastResults.permissionGetResultPreparer()
+func (client PermissionsClient) listForResourceNextResults(ctx context.Context, lastResults PermissionGetResult) (result PermissionGetResult, err error) {
+ req, err := lastResults.permissionGetResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceNextResults", nil, "Failure preparing next results request")
}
@@ -139,6 +147,16 @@ func (client PermissionsClient) listForResourceNextResults(lastResults Permissio
// ListForResourceComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string) (result PermissionGetResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.ListForResource")
+ 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.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName)
return
}
@@ -147,6 +165,16 @@ func (client PermissionsClient) ListForResourceComplete(ctx context.Context, res
// Parameters:
// resourceGroupName - the name of the resource group.
func (client PermissionsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string) (result PermissionGetResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.ListForResourceGroup")
+ defer func() {
+ sc := -1
+ if result.pgr.Response.Response != nil {
+ sc = result.pgr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listForResourceGroupNextResults
req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -210,8 +238,8 @@ func (client PermissionsClient) ListForResourceGroupResponder(resp *http.Respons
}
// listForResourceGroupNextResults retrieves the next set of results, if any.
-func (client PermissionsClient) listForResourceGroupNextResults(lastResults PermissionGetResult) (result PermissionGetResult, err error) {
- req, err := lastResults.permissionGetResultPreparer()
+func (client PermissionsClient) listForResourceGroupNextResults(ctx context.Context, lastResults PermissionGetResult) (result PermissionGetResult, err error) {
+ req, err := lastResults.permissionGetResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.PermissionsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -232,6 +260,16 @@ func (client PermissionsClient) listForResourceGroupNextResults(lastResults Perm
// ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client PermissionsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string) (result PermissionGetResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PermissionsClient.ListForResourceGroup")
+ 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.ListForResourceGroup(ctx, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go
index 939049ef037b..c1555423f6fb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/provideroperationsmetadata.go
@@ -21,13 +21,12 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
-// ProviderOperationsMetadataClient is the role based access control provides you a way to apply granular level policy
-// administration down to individual resources or resource groups. These operations enable you to manage role
-// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
-// A role assignment grants access to Azure Active Directory users.
+// ProviderOperationsMetadataClient is the client for the ProviderOperationsMetadata methods of the Authorization
+// service.
type ProviderOperationsMetadataClient struct {
BaseClient
}
@@ -47,6 +46,16 @@ func NewProviderOperationsMetadataClientWithBaseURI(baseURI string, subscription
// resourceProviderNamespace - the namespace of the resource provider.
// expand - specifies whether to expand the values.
func (client ProviderOperationsMetadataClient) Get(ctx context.Context, resourceProviderNamespace string, expand string) (result ProviderOperationsMetadata, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsMetadataClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceProviderNamespace, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "Get", nil, "Failure preparing request")
@@ -116,6 +125,16 @@ func (client ProviderOperationsMetadataClient) GetResponder(resp *http.Response)
// Parameters:
// expand - specifies whether to expand the values.
func (client ProviderOperationsMetadataClient) List(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsMetadataClient.List")
+ defer func() {
+ sc := -1
+ if result.pomlr.Response.Response != nil {
+ sc = result.pomlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, expand)
if err != nil {
@@ -179,8 +198,8 @@ func (client ProviderOperationsMetadataClient) ListResponder(resp *http.Response
}
// listNextResults retrieves the next set of results, if any.
-func (client ProviderOperationsMetadataClient) listNextResults(lastResults ProviderOperationsMetadataListResult) (result ProviderOperationsMetadataListResult, err error) {
- req, err := lastResults.providerOperationsMetadataListResultPreparer()
+func (client ProviderOperationsMetadataClient) listNextResults(ctx context.Context, lastResults ProviderOperationsMetadataListResult) (result ProviderOperationsMetadataListResult, err error) {
+ req, err := lastResults.providerOperationsMetadataListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.ProviderOperationsMetadataClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -201,6 +220,16 @@ func (client ProviderOperationsMetadataClient) listNextResults(lastResults Provi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ProviderOperationsMetadataClient) ListComplete(ctx context.Context, expand string) (result ProviderOperationsMetadataListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ProviderOperationsMetadataClient.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, expand)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go
index d4e5dbe8e8eb..93f32d4cf6dd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roleassignments.go
@@ -22,13 +22,11 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
-// RoleAssignmentsClient is the role based access control provides you a way to apply granular level policy
-// administration down to individual resources or resource groups. These operations enable you to manage role
-// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
-// A role assignment grants access to Azure Active Directory users.
+// RoleAssignmentsClient is the client for the RoleAssignments methods of the Authorization service.
type RoleAssignmentsClient struct {
BaseClient
}
@@ -53,6 +51,16 @@ func NewRoleAssignmentsClientWithBaseURI(baseURI string, subscriptionID string)
// roleAssignmentName - the name of the role assignment to create. It can be any valid GUID.
// parameters - parameters for the role assignment.
func (client RoleAssignmentsClient) Create(ctx context.Context, scope string, roleAssignmentName string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.Create")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.RoleAssignmentProperties", Name: validation.Null, Rule: true,
@@ -130,6 +138,16 @@ func (client RoleAssignmentsClient) CreateResponder(resp *http.Response) (result
// roleID - the ID of the role assignment to create.
// parameters - parameters for the role assignment.
func (client RoleAssignmentsClient) CreateByID(ctx context.Context, roleID string, parameters RoleAssignmentCreateParameters) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.CreateByID")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.RoleAssignmentProperties", Name: validation.Null, Rule: true,
@@ -206,6 +224,16 @@ func (client RoleAssignmentsClient) CreateByIDResponder(resp *http.Response) (re
// scope - the scope of the role assignment to delete.
// roleAssignmentName - the name of the role assignment to delete.
func (client RoleAssignmentsClient) Delete(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, scope, roleAssignmentName)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Delete", nil, "Failure preparing request")
@@ -271,6 +299,16 @@ func (client RoleAssignmentsClient) DeleteResponder(resp *http.Response) (result
// Parameters:
// roleID - the ID of the role assignment to delete.
func (client RoleAssignmentsClient) DeleteByID(ctx context.Context, roleID string) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.DeleteByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeleteByIDPreparer(ctx, roleID)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "DeleteByID", nil, "Failure preparing request")
@@ -336,6 +374,16 @@ func (client RoleAssignmentsClient) DeleteByIDResponder(resp *http.Response) (re
// scope - the scope of the role assignment.
// roleAssignmentName - the name of the role assignment to get.
func (client RoleAssignmentsClient) Get(ctx context.Context, scope string, roleAssignmentName string) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, scope, roleAssignmentName)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "Get", nil, "Failure preparing request")
@@ -401,6 +449,16 @@ func (client RoleAssignmentsClient) GetResponder(resp *http.Response) (result Ro
// Parameters:
// roleID - the ID of the role assignment to get.
func (client RoleAssignmentsClient) GetByID(ctx context.Context, roleID string) (result RoleAssignment, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.GetByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetByIDPreparer(ctx, roleID)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "GetByID", nil, "Failure preparing request")
@@ -467,6 +525,16 @@ func (client RoleAssignmentsClient) GetByIDResponder(resp *http.Response) (resul
// above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope
// for the specified principal.
func (client RoleAssignmentsClient) List(ctx context.Context, filter string) (result RoleAssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.List")
+ defer func() {
+ sc := -1
+ if result.ralr.Response.Response != nil {
+ sc = result.ralr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, filter)
if err != nil {
@@ -532,8 +600,8 @@ func (client RoleAssignmentsClient) ListResponder(resp *http.Response) (result R
}
// listNextResults retrieves the next set of results, if any.
-func (client RoleAssignmentsClient) listNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
- req, err := lastResults.roleAssignmentListResultPreparer()
+func (client RoleAssignmentsClient) listNextResults(ctx context.Context, lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
+ req, err := lastResults.roleAssignmentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -554,6 +622,16 @@ func (client RoleAssignmentsClient) listNextResults(lastResults RoleAssignmentLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter string) (result RoleAssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.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, filter)
return
}
@@ -569,6 +647,16 @@ func (client RoleAssignmentsClient) ListComplete(ctx context.Context, filter str
// above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope
// for the specified principal.
func (client RoleAssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResource")
+ defer func() {
+ sc := -1
+ if result.ralr.Response.Response != nil {
+ sc = result.ralr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listForResourceNextResults
req, err := client.ListForResourcePreparer(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
if err != nil {
@@ -639,8 +727,8 @@ func (client RoleAssignmentsClient) ListForResourceResponder(resp *http.Response
}
// listForResourceNextResults retrieves the next set of results, if any.
-func (client RoleAssignmentsClient) listForResourceNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
- req, err := lastResults.roleAssignmentListResultPreparer()
+func (client RoleAssignmentsClient) listForResourceNextResults(ctx context.Context, lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
+ req, err := lastResults.roleAssignmentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceNextResults", nil, "Failure preparing next results request")
}
@@ -661,6 +749,16 @@ func (client RoleAssignmentsClient) listForResourceNextResults(lastResults RoleA
// ListForResourceComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result RoleAssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResource")
+ 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.ListForResource(ctx, resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
return
}
@@ -672,6 +770,16 @@ func (client RoleAssignmentsClient) ListForResourceComplete(ctx context.Context,
// above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope
// for the specified principal.
func (client RoleAssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResourceGroup")
+ defer func() {
+ sc := -1
+ if result.ralr.Response.Response != nil {
+ sc = result.ralr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listForResourceGroupNextResults
req, err := client.ListForResourceGroupPreparer(ctx, resourceGroupName, filter)
if err != nil {
@@ -738,8 +846,8 @@ func (client RoleAssignmentsClient) ListForResourceGroupResponder(resp *http.Res
}
// listForResourceGroupNextResults retrieves the next set of results, if any.
-func (client RoleAssignmentsClient) listForResourceGroupNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
- req, err := lastResults.roleAssignmentListResultPreparer()
+func (client RoleAssignmentsClient) listForResourceGroupNextResults(ctx context.Context, lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
+ req, err := lastResults.roleAssignmentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -760,6 +868,16 @@ func (client RoleAssignmentsClient) listForResourceGroupNextResults(lastResults
// ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result RoleAssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForResourceGroup")
+ 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.ListForResourceGroup(ctx, resourceGroupName, filter)
return
}
@@ -771,6 +889,16 @@ func (client RoleAssignmentsClient) ListForResourceGroupComplete(ctx context.Con
// above the scope. Use $filter=principalId eq {id} to return all role assignments at, above or below the scope
// for the specified principal.
func (client RoleAssignmentsClient) ListForScope(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForScope")
+ defer func() {
+ sc := -1
+ if result.ralr.Response.Response != nil {
+ sc = result.ralr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listForScopeNextResults
req, err := client.ListForScopePreparer(ctx, scope, filter)
if err != nil {
@@ -836,8 +964,8 @@ func (client RoleAssignmentsClient) ListForScopeResponder(resp *http.Response) (
}
// listForScopeNextResults retrieves the next set of results, if any.
-func (client RoleAssignmentsClient) listForScopeNextResults(lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
- req, err := lastResults.roleAssignmentListResultPreparer()
+func (client RoleAssignmentsClient) listForScopeNextResults(ctx context.Context, lastResults RoleAssignmentListResult) (result RoleAssignmentListResult, err error) {
+ req, err := lastResults.roleAssignmentListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.RoleAssignmentsClient", "listForScopeNextResults", nil, "Failure preparing next results request")
}
@@ -858,6 +986,16 @@ func (client RoleAssignmentsClient) listForScopeNextResults(lastResults RoleAssi
// ListForScopeComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleAssignmentsClient) ListForScopeComplete(ctx context.Context, scope string, filter string) (result RoleAssignmentListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleAssignmentsClient.ListForScope")
+ 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.ListForScope(ctx, scope, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go
index 6c1d3b537e49..893f6d054448 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/authorization/mgmt/2018-01-01-preview/authorization/roledefinitions.go
@@ -21,13 +21,11 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
-// RoleDefinitionsClient is the role based access control provides you a way to apply granular level policy
-// administration down to individual resources or resource groups. These operations enable you to manage role
-// definitions and role assignments. A role definition describes the set of actions that can be performed on resources.
-// A role assignment grants access to Azure Active Directory users.
+// RoleDefinitionsClient is the client for the RoleDefinitions methods of the Authorization service.
type RoleDefinitionsClient struct {
BaseClient
}
@@ -48,6 +46,16 @@ func NewRoleDefinitionsClientWithBaseURI(baseURI string, subscriptionID string)
// roleDefinitionID - the ID of the role definition.
// roleDefinition - the values for the role definition.
func (client RoleDefinitionsClient) CreateOrUpdate(ctx context.Context, scope string, roleDefinitionID string, roleDefinition RoleDefinition) (result RoleDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, scope, roleDefinitionID, roleDefinition)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -116,6 +124,16 @@ func (client RoleDefinitionsClient) CreateOrUpdateResponder(resp *http.Response)
// scope - the scope of the role definition.
// roleDefinitionID - the ID of the role definition to delete.
func (client RoleDefinitionsClient) Delete(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, scope, roleDefinitionID)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Delete", nil, "Failure preparing request")
@@ -182,6 +200,16 @@ func (client RoleDefinitionsClient) DeleteResponder(resp *http.Response) (result
// scope - the scope of the role definition.
// roleDefinitionID - the ID of the role definition.
func (client RoleDefinitionsClient) Get(ctx context.Context, scope string, roleDefinitionID string) (result RoleDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, scope, roleDefinitionID)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "Get", nil, "Failure preparing request")
@@ -250,6 +278,16 @@ func (client RoleDefinitionsClient) GetResponder(resp *http.Response) (result Ro
// level role definitions, or /providers/Microsoft.Authorization/roleDefinitions/{roleDefinitionId} for tenant
// level role definitions.
func (client RoleDefinitionsClient) GetByID(ctx context.Context, roleID string) (result RoleDefinition, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.GetByID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetByIDPreparer(ctx, roleID)
if err != nil {
err = autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "GetByID", nil, "Failure preparing request")
@@ -316,6 +354,16 @@ func (client RoleDefinitionsClient) GetByIDResponder(resp *http.Response) (resul
// filter - the filter to apply on the operation. Use atScopeAndBelow filter to search below the given scope as
// well.
func (client RoleDefinitionsClient) List(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.rdlr.Response.Response != nil {
+ sc = result.rdlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, scope, filter)
if err != nil {
@@ -381,8 +429,8 @@ func (client RoleDefinitionsClient) ListResponder(resp *http.Response) (result R
}
// listNextResults retrieves the next set of results, if any.
-func (client RoleDefinitionsClient) listNextResults(lastResults RoleDefinitionListResult) (result RoleDefinitionListResult, err error) {
- req, err := lastResults.roleDefinitionListResultPreparer()
+func (client RoleDefinitionsClient) listNextResults(ctx context.Context, lastResults RoleDefinitionListResult) (result RoleDefinitionListResult, err error) {
+ req, err := lastResults.roleDefinitionListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "authorization.RoleDefinitionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -403,6 +451,16 @@ func (client RoleDefinitionsClient) listNextResults(lastResults RoleDefinitionLi
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client RoleDefinitionsClient) ListComplete(ctx context.Context, scope string, filter string) (result RoleDefinitionListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RoleDefinitionsClient.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, scope, filter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/containerhostmappings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/containerhostmappings.go
new file mode 100644
index 000000000000..583a73d7db76
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/containerhostmappings.go
@@ -0,0 +1,117 @@
+package devspaces
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// ContainerHostMappingsClient is the dev Spaces Client
+type ContainerHostMappingsClient struct {
+ BaseClient
+}
+
+// NewContainerHostMappingsClient creates an instance of the ContainerHostMappingsClient client.
+func NewContainerHostMappingsClient(subscriptionID string) ContainerHostMappingsClient {
+ return NewContainerHostMappingsClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewContainerHostMappingsClientWithBaseURI creates an instance of the ContainerHostMappingsClient client.
+func NewContainerHostMappingsClientWithBaseURI(baseURI string, subscriptionID string) ContainerHostMappingsClient {
+ return ContainerHostMappingsClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// GetContainerHostMapping sends the get container host mapping request.
+// Parameters:
+// location - location of the container host.
+func (client ContainerHostMappingsClient) GetContainerHostMapping(ctx context.Context, containerHostMapping ContainerHostMapping, location string) (result SetObject, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContainerHostMappingsClient.GetContainerHostMapping")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetContainerHostMappingPreparer(ctx, containerHostMapping, location)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetContainerHostMappingSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetContainerHostMappingResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "devspaces.ContainerHostMappingsClient", "GetContainerHostMapping", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetContainerHostMappingPreparer prepares the GetContainerHostMapping request.
+func (client ContainerHostMappingsClient) GetContainerHostMappingPreparer(ctx context.Context, containerHostMapping ContainerHostMapping, location string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "location": autorest.Encode("path", location),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ 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("/providers/Microsoft.DevSpaces/locations/{location}/checkContainerHostMapping", pathParameters),
+ autorest.WithJSON(containerHostMapping),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetContainerHostMappingSender sends the GetContainerHostMapping request. The method will close the
+// http.Response Body if it receives an error.
+func (client ContainerHostMappingsClient) GetContainerHostMappingSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+}
+
+// GetContainerHostMappingResponder handles the response to the GetContainerHostMapping request. The method always
+// closes the http.Response Body.
+func (client ContainerHostMappingsClient) GetContainerHostMappingResponder(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
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/controllers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/controllers.go
index dba3f15747a9..54c5c82c72ea 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/controllers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/controllers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewControllersClientWithBaseURI(baseURI string, subscriptionID string) Cont
// name - name of the resource.
// controller - controller create parameters.
func (client ControllersClient) Create(ctx context.Context, resourceGroupName string, name string, controller Controller) (result ControllersCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.Create")
+ 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},
@@ -112,10 +123,6 @@ func (client ControllersClient) CreateSender(req *http.Request) (future Controll
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -138,6 +145,16 @@ func (client ControllersClient) CreateResponder(resp *http.Response) (result Con
// resourceGroupName - resource group to which the resource belongs.
// name - name of the resource.
func (client ControllersClient) Delete(ctx context.Context, resourceGroupName string, name string) (result ControllersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.Delete")
+ 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},
@@ -194,10 +211,6 @@ func (client ControllersClient) DeleteSender(req *http.Request) (future Controll
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -219,6 +232,16 @@ func (client ControllersClient) DeleteResponder(resp *http.Response) (result aut
// resourceGroupName - resource group to which the resource belongs.
// name - name of the resource.
func (client ControllersClient) Get(ctx context.Context, resourceGroupName string, name string) (result Controller, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.Get")
+ 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},
@@ -294,6 +317,16 @@ func (client ControllersClient) GetResponder(resp *http.Response) (result Contro
// List lists all the Azure Dev Spaces Controllers with their properties in the subscription.
func (client ControllersClient) List(ctx context.Context) (result ControllerListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.List")
+ defer func() {
+ sc := -1
+ if result.cl.Response.Response != nil {
+ sc = result.cl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -356,8 +389,8 @@ func (client ControllersClient) ListResponder(resp *http.Response) (result Contr
}
// listNextResults retrieves the next set of results, if any.
-func (client ControllersClient) listNextResults(lastResults ControllerList) (result ControllerList, err error) {
- req, err := lastResults.controllerListPreparer()
+func (client ControllersClient) listNextResults(ctx context.Context, lastResults ControllerList) (result ControllerList, err error) {
+ req, err := lastResults.controllerListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -378,6 +411,16 @@ func (client ControllersClient) listNextResults(lastResults ControllerList) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ControllersClient) ListComplete(ctx context.Context) (result ControllerListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.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
}
@@ -387,6 +430,16 @@ func (client ControllersClient) ListComplete(ctx context.Context) (result Contro
// Parameters:
// resourceGroupName - resource group to which the resource belongs.
func (client ControllersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ControllerListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.cl.Response.Response != nil {
+ sc = result.cl.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},
@@ -457,8 +510,8 @@ func (client ControllersClient) ListByResourceGroupResponder(resp *http.Response
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ControllersClient) listByResourceGroupNextResults(lastResults ControllerList) (result ControllerList, err error) {
- req, err := lastResults.controllerListPreparer()
+func (client ControllersClient) listByResourceGroupNextResults(ctx context.Context, lastResults ControllerList) (result ControllerList, err error) {
+ req, err := lastResults.controllerListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devspaces.ControllersClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -479,6 +532,16 @@ func (client ControllersClient) listByResourceGroupNextResults(lastResults Contr
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ControllersClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ControllerListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -489,6 +552,16 @@ func (client ControllersClient) ListByResourceGroupComplete(ctx context.Context,
// resourceGroupName - resource group to which the resource belongs.
// name - name of the resource.
func (client ControllersClient) ListConnectionDetails(ctx context.Context, resourceGroupName string, name string) (result ControllerConnectionDetailsList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.ListConnectionDetails")
+ 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},
@@ -566,7 +639,18 @@ func (client ControllersClient) ListConnectionDetailsResponder(resp *http.Respon
// Parameters:
// resourceGroupName - resource group to which the resource belongs.
// name - name of the resource.
+// controllerUpdateParameters - parameters for updating the Azure Dev Spaces Controller.
func (client ControllersClient) Update(ctx context.Context, resourceGroupName string, name string, controllerUpdateParameters ControllerUpdateParameters) (result Controller, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllersClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/models.go
index 33603b57a44a..88aa6edf7dcd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/models.go
@@ -18,13 +18,18 @@ package devspaces
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces"
+
// InstanceType enumerates the values for instance type.
type InstanceType string
@@ -48,6 +53,8 @@ const (
Canceled ProvisioningState = "Canceled"
// Creating ...
Creating ProvisioningState = "Creating"
+ // Deleted ...
+ Deleted ProvisioningState = "Deleted"
// Deleting ...
Deleting ProvisioningState = "Deleting"
// Failed ...
@@ -60,7 +67,7 @@ const (
// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type.
func PossibleProvisioningStateValues() []ProvisioningState {
- return []ProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Updating}
+ return []ProvisioningState{Canceled, Creating, Deleted, Deleting, Failed, Succeeded, Updating}
}
// SkuTier enumerates the values for sku tier.
@@ -76,6 +83,15 @@ func PossibleSkuTierValues() []SkuTier {
return []SkuTier{Standard}
}
+// ContainerHostMapping container host mapping object specifying the Container host resource ID and its
+// associated Controller resource.
+type ContainerHostMapping struct {
+ // ContainerHostResourceID - ARM ID of the Container Host resource
+ ContainerHostResourceID *string `json:"containerHostResourceId,omitempty"`
+ // MappedControllerResourceID - ARM ID of the mapped Controller resource
+ MappedControllerResourceID *string `json:"mappedControllerResourceId,omitempty"`
+}
+
// Controller ...
type Controller struct {
autorest.Response `json:"-"`
@@ -281,14 +297,24 @@ type ControllerListIterator struct {
page ControllerListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ControllerListIterator) Next() error {
+func (iter *ControllerListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllerListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -297,6 +323,13 @@ func (iter *ControllerListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ControllerListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ControllerListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -316,6 +349,11 @@ func (iter ControllerListIterator) Value() Controller {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ControllerListIterator type.
+func NewControllerListIterator(page ControllerListPage) ControllerListIterator {
+ return ControllerListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cl ControllerList) IsEmpty() bool {
return cl.Value == nil || len(*cl.Value) == 0
@@ -323,11 +361,11 @@ func (cl ControllerList) IsEmpty() bool {
// controllerListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cl ControllerList) controllerListPreparer() (*http.Request, error) {
+func (cl ControllerList) controllerListPreparer(ctx context.Context) (*http.Request, error) {
if cl.NextLink == nil || len(to.String(cl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cl.NextLink)))
@@ -335,14 +373,24 @@ func (cl ControllerList) controllerListPreparer() (*http.Request, error) {
// ControllerListPage contains a page of Controller values.
type ControllerListPage struct {
- fn func(ControllerList) (ControllerList, error)
+ fn func(context.Context, ControllerList) (ControllerList, error)
cl ControllerList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ControllerListPage) Next() error {
- next, err := page.fn(page.cl)
+func (page *ControllerListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ControllerListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cl)
if err != nil {
return err
}
@@ -350,6 +398,13 @@ func (page *ControllerListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ControllerListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ControllerListPage) NotDone() bool {
return !page.cl.IsEmpty()
@@ -368,9 +423,14 @@ func (page ControllerListPage) Values() []Controller {
return *page.cl.Value
}
+// Creates a new instance of the ControllerListPage type.
+func NewControllerListPage(getNextPage func(context.Context, ControllerList) (ControllerList, error)) ControllerListPage {
+ return ControllerListPage{fn: getNextPage}
+}
+
// ControllerProperties ...
type ControllerProperties struct {
- // ProvisioningState - Provisioning state of the Azure Dev Spaces Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Updating', 'Creating', 'Deleting'
+ // ProvisioningState - Provisioning state of the Azure Dev Spaces Controller. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'Updating', 'Creating', 'Deleting', 'Deleted'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// HostSuffix - DNS suffix for public endpoints running in the Azure Dev Spaces Controller.
HostSuffix *string `json:"hostSuffix,omitempty"`
@@ -382,7 +442,8 @@ type ControllerProperties struct {
TargetContainerHostCredentialsBase64 *string `json:"targetContainerHostCredentialsBase64,omitempty"`
}
-// ControllersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ControllersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ControllersCreateFuture struct {
azure.Future
}
@@ -410,7 +471,8 @@ func (future *ControllersCreateFuture) Result(client ControllersClient) (c Contr
return
}
-// ControllersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ControllersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ControllersDeleteFuture struct {
azure.Future
}
@@ -457,14 +519,14 @@ type ErrorDetails struct {
Target *string `json:"target,omitempty"`
}
-// ErrorResponse error response indicates that the service is not able to process the incoming request. The reason
-// is provided in the error message.
+// ErrorResponse error response indicates that the service is not able to process the incoming request. The
+// reason is provided in the error message.
type ErrorResponse struct {
// Error - The details of the error.
Error *ErrorDetails `json:"error,omitempty"`
}
-// KubernetesConnectionDetails ...
+// KubernetesConnectionDetails contains information used to connect to a Kubernetes cluster
type KubernetesConnectionDetails struct {
// KubeConfig - Gets the kubeconfig for the cluster.
KubeConfig *string `json:"kubeConfig,omitempty"`
@@ -500,13 +562,15 @@ func (kcd KubernetesConnectionDetails) AsBasicOrchestratorSpecificConnectionDeta
return &kcd, true
}
-// BasicOrchestratorSpecificConnectionDetails ...
+// BasicOrchestratorSpecificConnectionDetails base class for types that supply values used to connect to container
+// orchestrators
type BasicOrchestratorSpecificConnectionDetails interface {
AsKubernetesConnectionDetails() (*KubernetesConnectionDetails, bool)
AsOrchestratorSpecificConnectionDetails() (*OrchestratorSpecificConnectionDetails, bool)
}
-// OrchestratorSpecificConnectionDetails ...
+// OrchestratorSpecificConnectionDetails base class for types that supply values used to connect to container
+// orchestrators
type OrchestratorSpecificConnectionDetails struct {
// InstanceType - Possible values include: 'InstanceTypeOrchestratorSpecificConnectionDetails', 'InstanceTypeKubernetes'
InstanceType InstanceType `json:"instanceType,omitempty"`
@@ -619,14 +683,24 @@ type ResourceProviderOperationListIterator struct {
page ResourceProviderOperationListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceProviderOperationListIterator) Next() error {
+func (iter *ResourceProviderOperationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceProviderOperationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -635,6 +709,13 @@ func (iter *ResourceProviderOperationListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceProviderOperationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceProviderOperationListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -654,6 +735,11 @@ func (iter ResourceProviderOperationListIterator) Value() ResourceProviderOperat
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceProviderOperationListIterator type.
+func NewResourceProviderOperationListIterator(page ResourceProviderOperationListPage) ResourceProviderOperationListIterator {
+ return ResourceProviderOperationListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rpol ResourceProviderOperationList) IsEmpty() bool {
return rpol.Value == nil || len(*rpol.Value) == 0
@@ -661,11 +747,11 @@ func (rpol ResourceProviderOperationList) IsEmpty() bool {
// resourceProviderOperationListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rpol ResourceProviderOperationList) resourceProviderOperationListPreparer() (*http.Request, error) {
+func (rpol ResourceProviderOperationList) resourceProviderOperationListPreparer(ctx context.Context) (*http.Request, error) {
if rpol.NextLink == nil || len(to.String(rpol.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rpol.NextLink)))
@@ -673,14 +759,24 @@ func (rpol ResourceProviderOperationList) resourceProviderOperationListPreparer(
// ResourceProviderOperationListPage contains a page of ResourceProviderOperationDefinition values.
type ResourceProviderOperationListPage struct {
- fn func(ResourceProviderOperationList) (ResourceProviderOperationList, error)
+ fn func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error)
rpol ResourceProviderOperationList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceProviderOperationListPage) Next() error {
- next, err := page.fn(page.rpol)
+func (page *ResourceProviderOperationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceProviderOperationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rpol)
if err != nil {
return err
}
@@ -688,6 +784,13 @@ func (page *ResourceProviderOperationListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceProviderOperationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceProviderOperationListPage) NotDone() bool {
return !page.rpol.IsEmpty()
@@ -706,6 +809,17 @@ func (page ResourceProviderOperationListPage) Values() []ResourceProviderOperati
return *page.rpol.Value
}
+// Creates a new instance of the ResourceProviderOperationListPage type.
+func NewResourceProviderOperationListPage(getNextPage func(context.Context, ResourceProviderOperationList) (ResourceProviderOperationList, error)) ResourceProviderOperationListPage {
+ return ResourceProviderOperationListPage{fn: getNextPage}
+}
+
+// SetObject ...
+type SetObject struct {
+ autorest.Response `json:"-"`
+ Value interface{} `json:"value,omitempty"`
+}
+
// Sku model representing SKU for Azure Dev Spaces Controller.
type Sku struct {
// Name - The name of the SKU for Azure Dev Spaces Controller.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/operations.go
index baa7963ae1ae..1bc1a485fe14 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/devspaces/mgmt/2018-06-01-preview/devspaces/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all the supported operations by the Microsoft.DevSpaces resource provider along with their description.
func (client OperationsClient) List(ctx context.Context) (result ResourceProviderOperationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.rpol.Response.Response != nil {
+ sc = result.rpol.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Resour
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults ResourceProviderOperationList) (result ResourceProviderOperationList, err error) {
- req, err := lastResults.resourceProviderOperationListPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults ResourceProviderOperationList) (result ResourceProviderOperationList, err error) {
+ req, err := lastResults.resourceProviderOperationListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "devspaces.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults ResourceProviderOpera
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result ResourceProviderOperationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
index c66b00ad520b..8f09a059de32 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/models.go
@@ -18,13 +18,18 @@ package dns
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns"
+
// RecordType enumerates the values for record type.
type RecordType string
@@ -271,14 +276,24 @@ type RecordSetListResultIterator struct {
page RecordSetListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *RecordSetListResultIterator) Next() error {
+func (iter *RecordSetListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -287,6 +302,13 @@ func (iter *RecordSetListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *RecordSetListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter RecordSetListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -306,6 +328,11 @@ func (iter RecordSetListResultIterator) Value() RecordSet {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the RecordSetListResultIterator type.
+func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator {
+ return RecordSetListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rslr RecordSetListResult) IsEmpty() bool {
return rslr.Value == nil || len(*rslr.Value) == 0
@@ -313,11 +340,11 @@ func (rslr RecordSetListResult) IsEmpty() bool {
// recordSetListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rslr RecordSetListResult) recordSetListResultPreparer() (*http.Request, error) {
+func (rslr RecordSetListResult) recordSetListResultPreparer(ctx context.Context) (*http.Request, error) {
if rslr.NextLink == nil || len(to.String(rslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rslr.NextLink)))
@@ -325,14 +352,24 @@ func (rslr RecordSetListResult) recordSetListResultPreparer() (*http.Request, er
// RecordSetListResultPage contains a page of RecordSet values.
type RecordSetListResultPage struct {
- fn func(RecordSetListResult) (RecordSetListResult, error)
+ fn func(context.Context, RecordSetListResult) (RecordSetListResult, error)
rslr RecordSetListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *RecordSetListResultPage) Next() error {
- next, err := page.fn(page.rslr)
+func (page *RecordSetListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rslr)
if err != nil {
return err
}
@@ -340,6 +377,13 @@ func (page *RecordSetListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *RecordSetListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page RecordSetListResultPage) NotDone() bool {
return !page.rslr.IsEmpty()
@@ -358,6 +402,11 @@ func (page RecordSetListResultPage) Values() []RecordSet {
return *page.rslr.Value
}
+// Creates a new instance of the RecordSetListResultPage type.
+func NewRecordSetListResultPage(getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage {
+ return RecordSetListResultPage{fn: getNextPage}
+}
+
// RecordSetProperties represents the properties of the records in the record set.
type RecordSetProperties struct {
// Metadata - The metadata attached to the record set.
@@ -665,14 +714,24 @@ type ZoneListResultIterator struct {
page ZoneListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ZoneListResultIterator) Next() error {
+func (iter *ZoneListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -681,6 +740,13 @@ func (iter *ZoneListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ZoneListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ZoneListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -700,6 +766,11 @@ func (iter ZoneListResultIterator) Value() Zone {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ZoneListResultIterator type.
+func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator {
+ return ZoneListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (zlr ZoneListResult) IsEmpty() bool {
return zlr.Value == nil || len(*zlr.Value) == 0
@@ -707,11 +778,11 @@ func (zlr ZoneListResult) IsEmpty() bool {
// zoneListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (zlr ZoneListResult) zoneListResultPreparer() (*http.Request, error) {
+func (zlr ZoneListResult) zoneListResultPreparer(ctx context.Context) (*http.Request, error) {
if zlr.NextLink == nil || len(to.String(zlr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(zlr.NextLink)))
@@ -719,14 +790,24 @@ func (zlr ZoneListResult) zoneListResultPreparer() (*http.Request, error) {
// ZoneListResultPage contains a page of Zone values.
type ZoneListResultPage struct {
- fn func(ZoneListResult) (ZoneListResult, error)
+ fn func(context.Context, ZoneListResult) (ZoneListResult, error)
zlr ZoneListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ZoneListResultPage) Next() error {
- next, err := page.fn(page.zlr)
+func (page *ZoneListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.zlr)
if err != nil {
return err
}
@@ -734,6 +815,13 @@ func (page *ZoneListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ZoneListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ZoneListResultPage) NotDone() bool {
return !page.zlr.IsEmpty()
@@ -752,6 +840,11 @@ func (page ZoneListResultPage) Values() []Zone {
return *page.zlr.Value
}
+// Creates a new instance of the ZoneListResultPage type.
+func NewZoneListResultPage(getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage {
+ return ZoneListResultPage{fn: getNextPage}
+}
+
// ZoneProperties represents the properties of the zone.
type ZoneProperties struct {
// MaxNumberOfRecordSets - The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored.
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
index d73662ed2bfe..93423b76bb65 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/recordsets.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,10 +50,20 @@ func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) Recor
// created (they are created when the DNS zone is created).
// parameters - parameters supplied to the CreateOrUpdate operation.
// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify
-// the last-seen etag value to prevent accidentally overwritting any concurrent changes.
+// the last-seen etag value to prevent accidentally overwriting any concurrent changes.
// ifNoneMatch - set to '*' to allow a new record set to be created, but to prevent updating an existing record
// set. Other values will be ignored.
func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.CreateOrUpdate")
+ 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},
@@ -147,6 +158,16 @@ func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (res
// ifMatch - the etag of the record set. Omit this value to always delete the current record set. Specify the
// last-seen etag value to prevent accidentally deleting any concurrent changes.
func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Delete")
+ 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},
@@ -231,6 +252,16 @@ func (client RecordSetsClient) DeleteResponder(resp *http.Response) (result auto
// relativeRecordSetName - the name of the record set, relative to the name of the zone.
// recordType - the type of DNS record in this record set.
func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Get")
+ 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},
@@ -314,6 +345,16 @@ func (client RecordSetsClient) GetResponder(resp *http.Response) (result RecordS
// enumerations. If this parameter is specified, Enumeration will return only records that end with
// .
func (client RecordSetsClient) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result RecordSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListAllByDNSZone")
+ defer func() {
+ sc := -1
+ if result.rslr.Response.Response != nil {
+ sc = result.rslr.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},
@@ -394,8 +435,8 @@ func (client RecordSetsClient) ListAllByDNSZoneResponder(resp *http.Response) (r
}
// listAllByDNSZoneNextResults retrieves the next set of results, if any.
-func (client RecordSetsClient) listAllByDNSZoneNextResults(lastResults RecordSetListResult) (result RecordSetListResult, err error) {
- req, err := lastResults.recordSetListResultPreparer()
+func (client RecordSetsClient) listAllByDNSZoneNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) {
+ req, err := lastResults.recordSetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listAllByDNSZoneNextResults", nil, "Failure preparing next results request")
}
@@ -416,6 +457,16 @@ func (client RecordSetsClient) listAllByDNSZoneNextResults(lastResults RecordSet
// ListAllByDNSZoneComplete enumerates all values, automatically crossing page boundaries as required.
func (client RecordSetsClient) ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result RecordSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListAllByDNSZone")
+ 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.ListAllByDNSZone(ctx, resourceGroupName, zoneName, top, recordSetNameSuffix)
return
}
@@ -429,6 +480,16 @@ func (client RecordSetsClient) ListAllByDNSZoneComplete(ctx context.Context, res
// enumerations. If this parameter is specified, Enumeration will return only records that end with
// .
func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone")
+ defer func() {
+ sc := -1
+ if result.rslr.Response.Response != nil {
+ sc = result.rslr.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},
@@ -509,8 +570,8 @@ func (client RecordSetsClient) ListByDNSZoneResponder(resp *http.Response) (resu
}
// listByDNSZoneNextResults retrieves the next set of results, if any.
-func (client RecordSetsClient) listByDNSZoneNextResults(lastResults RecordSetListResult) (result RecordSetListResult, err error) {
- req, err := lastResults.recordSetListResultPreparer()
+func (client RecordSetsClient) listByDNSZoneNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) {
+ req, err := lastResults.recordSetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", nil, "Failure preparing next results request")
}
@@ -531,6 +592,16 @@ func (client RecordSetsClient) listByDNSZoneNextResults(lastResults RecordSetLis
// ListByDNSZoneComplete enumerates all values, automatically crossing page boundaries as required.
func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone")
+ 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.ListByDNSZone(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix)
return
}
@@ -545,6 +616,16 @@ func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resour
// enumerations. If this parameter is specified, Enumeration will return only records that end with
// .
func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType")
+ defer func() {
+ sc := -1
+ if result.rslr.Response.Response != nil {
+ sc = result.rslr.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},
@@ -626,8 +707,8 @@ func (client RecordSetsClient) ListByTypeResponder(resp *http.Response) (result
}
// listByTypeNextResults retrieves the next set of results, if any.
-func (client RecordSetsClient) listByTypeNextResults(lastResults RecordSetListResult) (result RecordSetListResult, err error) {
- req, err := lastResults.recordSetListResultPreparer()
+func (client RecordSetsClient) listByTypeNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) {
+ req, err := lastResults.recordSetListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", nil, "Failure preparing next results request")
}
@@ -648,6 +729,16 @@ func (client RecordSetsClient) listByTypeNextResults(lastResults RecordSetListRe
// ListByTypeComplete enumerates all values, automatically crossing page boundaries as required.
func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType")
+ 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.ListByType(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix)
return
}
@@ -660,8 +751,18 @@ func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceG
// recordType - the type of DNS record in this record set.
// parameters - parameters supplied to the Update operation.
// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify
-// the last-seen etag value to prevent accidentally overwritting concurrent changes.
+// the last-seen etag value to prevent accidentally overwriting concurrent changes.
func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (result RecordSet, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
index c168705a8069..a01975dee812 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/dns/mgmt/2018-03-01-preview/dns/zones.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,10 +47,20 @@ func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClien
// zoneName - the name of the DNS zone (without a terminating dot).
// parameters - parameters supplied to the CreateOrUpdate operation.
// ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the
-// last-seen etag value to prevent accidentally overwritting any concurrent changes.
+// last-seen etag value to prevent accidentally overwriting any concurrent changes.
// ifNoneMatch - set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone.
// Other values will be ignored.
func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (result Zone, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.CreateOrUpdate")
+ 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},
@@ -140,6 +151,16 @@ func (client ZonesClient) CreateOrUpdateResponder(resp *http.Response) (result Z
// ifMatch - the etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen
// etag value to prevent accidentally deleting any concurrent changes.
func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result ZonesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Delete")
+ 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},
@@ -199,10 +220,6 @@ func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFut
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -224,6 +241,16 @@ func (client ZonesClient) DeleteResponder(resp *http.Response) (result autorest.
// resourceGroupName - the name of the resource group. The name is case insensitive.
// zoneName - the name of the DNS zone (without a terminating dot).
func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zoneName string) (result Zone, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Get")
+ 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},
@@ -300,6 +327,16 @@ func (client ZonesClient) GetResponder(resp *http.Response) (result Zone, err er
// Parameters:
// top - the maximum number of DNS zones to return. If not specified, returns up to 100 zones.
func (client ZonesClient) List(ctx context.Context, top *int32) (result ZoneListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.List")
+ defer func() {
+ sc := -1
+ if result.zlr.Response.Response != nil {
+ sc = result.zlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
@@ -371,8 +408,8 @@ func (client ZonesClient) ListResponder(resp *http.Response) (result ZoneListRes
}
// listNextResults retrieves the next set of results, if any.
-func (client ZonesClient) listNextResults(lastResults ZoneListResult) (result ZoneListResult, err error) {
- req, err := lastResults.zoneListResultPreparer()
+func (client ZonesClient) listNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) {
+ req, err := lastResults.zoneListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -393,6 +430,16 @@ func (client ZonesClient) listNextResults(lastResults ZoneListResult) (result Zo
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ZonesClient) ListComplete(ctx context.Context, top *int32) (result ZoneListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.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, top)
return
}
@@ -402,6 +449,16 @@ func (client ZonesClient) ListComplete(ctx context.Context, top *int32) (result
// resourceGroupName - the name of the resource group. The name is case insensitive.
// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets.
func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.zlr.Response.Response != nil {
+ sc = result.zlr.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},
@@ -478,8 +535,8 @@ func (client ZonesClient) ListByResourceGroupResponder(resp *http.Response) (res
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ZonesClient) listByResourceGroupNextResults(lastResults ZoneListResult) (result ZoneListResult, err error) {
- req, err := lastResults.zoneListResultPreparer()
+func (client ZonesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) {
+ req, err := lastResults.zoneListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -500,6 +557,16 @@ func (client ZonesClient) listByResourceGroupNextResults(lastResults ZoneListRes
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, top)
return
}
@@ -510,8 +577,18 @@ func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resou
// zoneName - the name of the DNS zone (without a terminating dot).
// parameters - parameters supplied to the Update operation.
// ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the
-// last-seen etag value to prevent accidentally overwritting any concurrent changes.
+// last-seen etag value to prevent accidentally overwriting any concurrent changes.
func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (result Zone, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Update")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/checknameavailability.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/checknameavailability.go
index f3c5c56e7277..b702f071a05b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/checknameavailability.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/checknameavailability.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewCheckNameAvailabilityClientWithBaseURI(baseURI string, subscriptionID st
// Parameters:
// nameAvailabilityRequest - the required parameters for checking if resource name is available.
func (client CheckNameAvailabilityClient) Execute(ctx context.Context, nameAvailabilityRequest NameAvailabilityRequest) (result NameAvailability, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CheckNameAvailabilityClient.Execute")
+ 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: nameAvailabilityRequest,
Constraints: []validation.Constraint{{Target: "nameAvailabilityRequest.Name", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/configurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/configurations.go
index 27dbd13141ff..dadde12d2a3f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/configurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/configurations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewConfigurationsClientWithBaseURI(baseURI string, subscriptionID string) C
// configurationName - the name of the server configuration.
// parameters - the required parameters for updating a server configuration.
func (client ConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, configurationName string, parameters Configuration) (result ConfigurationsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, configurationName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -95,10 +106,6 @@ func (client ConfigurationsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -123,6 +130,16 @@ func (client ConfigurationsClient) CreateOrUpdateResponder(resp *http.Response)
// serverName - the name of the server.
// configurationName - the name of the server configuration.
func (client ConfigurationsClient) Get(ctx context.Context, resourceGroupName string, serverName string, configurationName string) (result Configuration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, configurationName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "Get", nil, "Failure preparing request")
@@ -192,6 +209,16 @@ func (client ConfigurationsClient) GetResponder(resp *http.Response) (result Con
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ConfigurationsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ConfigurationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ConfigurationsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ConfigurationsClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/databases.go
index 6f3e4d19469b..7bf54614e6fc 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/databases.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) Databa
// databaseName - the name of the database.
// parameters - the required parameters for creating or updating a database.
func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -95,10 +106,6 @@ func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future Da
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -123,6 +130,16 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Delete", nil, "Failure preparing request")
@@ -169,10 +186,6 @@ func (client DatabasesClient) DeleteSender(req *http.Request) (future DatabasesD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -196,6 +209,16 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "Get", nil, "Failure preparing request")
@@ -265,6 +288,16 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.DatabasesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/firewallrules.go
index c6bde5df6631..1fe726922211 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the server firewall rule.
// parameters - the required parameters for creating or updating a firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: true,
@@ -107,10 +118,6 @@ func (client FirewallRulesClient) CreateOrUpdateSender(req *http.Request) (futur
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -135,6 +142,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -181,10 +198,6 @@ func (client FirewallRulesClient) DeleteSender(req *http.Request) (future Firewa
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -208,6 +221,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// serverName - the name of the server.
// firewallRuleName - the name of the server firewall rule.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -277,6 +300,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.FirewallRulesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/locationbasedperformancetier.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/locationbasedperformancetier.go
index 3d3f8a334507..10012199d373 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/locationbasedperformancetier.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/locationbasedperformancetier.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewLocationBasedPerformanceTierClientWithBaseURI(baseURI string, subscripti
// Parameters:
// locationName - the name of the location.
func (client LocationBasedPerformanceTierClient) List(ctx context.Context, locationName string) (result PerformanceTierListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationBasedPerformanceTierClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, locationName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.LocationBasedPerformanceTierClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/logfiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/logfiles.go
index 6d9aea014077..2f14b1aa9ac7 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/logfiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/logfiles.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLogFilesClientWithBaseURI(baseURI string, subscriptionID string) LogFile
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client LogFilesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result LogFileListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogFilesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.LogFilesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/models.go
index a69138ac96f7..5187214567f5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/models.go
@@ -18,13 +18,19 @@ package mariadb
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
+ "github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb"
+
// CreateMode enumerates the values for create mode.
type CreateMode string
@@ -155,6 +161,27 @@ func PossibleSslEnforcementEnumValues() []SslEnforcementEnum {
return []SslEnforcementEnum{SslEnforcementEnumDisabled, SslEnforcementEnumEnabled}
}
+// VirtualNetworkRuleState enumerates the values for virtual network rule state.
+type VirtualNetworkRuleState string
+
+const (
+ // Deleting ...
+ Deleting VirtualNetworkRuleState = "Deleting"
+ // Initializing ...
+ Initializing VirtualNetworkRuleState = "Initializing"
+ // InProgress ...
+ InProgress VirtualNetworkRuleState = "InProgress"
+ // Ready ...
+ Ready VirtualNetworkRuleState = "Ready"
+ // Unknown ...
+ Unknown VirtualNetworkRuleState = "Unknown"
+)
+
+// PossibleVirtualNetworkRuleStateValues returns an array of possible values for the VirtualNetworkRuleState const type.
+func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
+ return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown}
+}
+
// Configuration represents a Configuration.
type Configuration struct {
autorest.Response `json:"-"`
@@ -260,8 +287,8 @@ type ConfigurationProperties struct {
Source *string `json:"source,omitempty"`
}
-// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// ConfigurationsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type ConfigurationsCreateOrUpdateFuture struct {
azure.Future
}
@@ -415,7 +442,8 @@ func (future *DatabasesCreateOrUpdateFuture) Result(client DatabasesClient) (d D
return
}
-// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// DatabasesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type DatabasesDeleteFuture struct {
azure.Future
}
@@ -534,8 +562,8 @@ type FirewallRuleProperties struct {
EndIPAddress *string `json:"endIpAddress,omitempty"`
}
-// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// FirewallRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type FirewallRulesCreateOrUpdateFuture struct {
azure.Future
}
@@ -563,7 +591,8 @@ func (future *FirewallRulesCreateOrUpdateFuture) Result(client FirewallRulesClie
return
}
-// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// FirewallRulesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type FirewallRulesDeleteFuture struct {
azure.Future
}
@@ -1220,8 +1249,8 @@ func (spfdc ServerPropertiesForDefaultCreate) AsBasicServerPropertiesForCreate()
return &spfdc, true
}
-// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different region from
-// a geo replicated backup.
+// ServerPropertiesForGeoRestore the properties used to create a new server by restoring to a different
+// region from a geo replicated backup.
type ServerPropertiesForGeoRestore struct {
// SourceServerID - The source server id to restore from.
SourceServerID *string `json:"sourceServerId,omitempty"`
@@ -1348,7 +1377,8 @@ func (spfr ServerPropertiesForRestore) AsBasicServerPropertiesForCreate() (Basic
return &spfr, true
}
-// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersCreateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersCreateFuture struct {
azure.Future
}
@@ -1376,7 +1406,8 @@ func (future *ServersCreateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersDeleteFuture struct {
azure.Future
}
@@ -1398,8 +1429,8 @@ func (future *ServersDeleteFuture) Result(client ServersClient) (ar autorest.Res
return
}
-// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// ServerSecurityAlertPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results
+// of a long-running operation.
type ServerSecurityAlertPoliciesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1509,7 +1540,8 @@ func (ssap *ServerSecurityAlertPolicy) UnmarshalJSON(body []byte) error {
return nil
}
-// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// ServersUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type ServersUpdateFuture struct {
azure.Future
}
@@ -1537,7 +1569,7 @@ func (future *ServersUpdateFuture) Result(client ServersClient) (s Server, err e
return
}
-// ServerUpdateParameters parameters allowd to update for a server.
+// ServerUpdateParameters parameters allowed to update for a server.
type ServerUpdateParameters struct {
// Sku - The SKU (pricing tier) of the server.
Sku *Sku `json:"sku,omitempty"`
@@ -1674,3 +1706,293 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) {
}
return json.Marshal(objectMap)
}
+
+// VirtualNetworkRule a virtual network rule.
+type VirtualNetworkRule struct {
+ autorest.Response `json:"-"`
+ // VirtualNetworkRuleProperties - Resource properties.
+ *VirtualNetworkRuleProperties `json:"properties,omitempty"`
+ // ID - Resource ID
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name.
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type.
+ Type *string `json:"type,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for VirtualNetworkRule.
+func (vnr VirtualNetworkRule) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if vnr.VirtualNetworkRuleProperties != nil {
+ objectMap["properties"] = vnr.VirtualNetworkRuleProperties
+ }
+ if vnr.ID != nil {
+ objectMap["id"] = vnr.ID
+ }
+ if vnr.Name != nil {
+ objectMap["name"] = vnr.Name
+ }
+ if vnr.Type != nil {
+ objectMap["type"] = vnr.Type
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for VirtualNetworkRule struct.
+func (vnr *VirtualNetworkRule) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "properties":
+ if v != nil {
+ var virtualNetworkRuleProperties VirtualNetworkRuleProperties
+ err = json.Unmarshal(*v, &virtualNetworkRuleProperties)
+ if err != nil {
+ return err
+ }
+ vnr.VirtualNetworkRuleProperties = &virtualNetworkRuleProperties
+ }
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ vnr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ vnr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ vnr.Type = &typeVar
+ }
+ }
+ }
+
+ return nil
+}
+
+// VirtualNetworkRuleListResult a list of virtual network rules.
+type VirtualNetworkRuleListResult struct {
+ autorest.Response `json:"-"`
+ // Value - Array of results.
+ Value *[]VirtualNetworkRule `json:"value,omitempty"`
+ // NextLink - Link to retrieve next page of results.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// VirtualNetworkRuleListResultIterator provides access to a complete listing of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultIterator struct {
+ i int
+ page VirtualNetworkRuleListResultPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *VirtualNetworkRuleListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *VirtualNetworkRuleListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter VirtualNetworkRuleListResultIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter VirtualNetworkRuleListResultIterator) Response() VirtualNetworkRuleListResult {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter VirtualNetworkRuleListResultIterator) Value() VirtualNetworkRule {
+ if !iter.page.NotDone() {
+ return VirtualNetworkRule{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the VirtualNetworkRuleListResultIterator type.
+func NewVirtualNetworkRuleListResultIterator(page VirtualNetworkRuleListResultPage) VirtualNetworkRuleListResultIterator {
+ return VirtualNetworkRuleListResultIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (vnrlr VirtualNetworkRuleListResult) IsEmpty() bool {
+ return vnrlr.Value == nil || len(*vnrlr.Value) == 0
+}
+
+// virtualNetworkRuleListResultPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (vnrlr VirtualNetworkRuleListResult) virtualNetworkRuleListResultPreparer(ctx context.Context) (*http.Request, error) {
+ if vnrlr.NextLink == nil || len(to.String(vnrlr.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(vnrlr.NextLink)))
+}
+
+// VirtualNetworkRuleListResultPage contains a page of VirtualNetworkRule values.
+type VirtualNetworkRuleListResultPage struct {
+ fn func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)
+ vnrlr VirtualNetworkRuleListResult
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *VirtualNetworkRuleListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRuleListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.vnrlr)
+ if err != nil {
+ return err
+ }
+ page.vnrlr = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *VirtualNetworkRuleListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page VirtualNetworkRuleListResultPage) NotDone() bool {
+ return !page.vnrlr.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page VirtualNetworkRuleListResultPage) Response() VirtualNetworkRuleListResult {
+ return page.vnrlr
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page VirtualNetworkRuleListResultPage) Values() []VirtualNetworkRule {
+ if page.vnrlr.IsEmpty() {
+ return nil
+ }
+ return *page.vnrlr.Value
+}
+
+// Creates a new instance of the VirtualNetworkRuleListResultPage type.
+func NewVirtualNetworkRuleListResultPage(getNextPage func(context.Context, VirtualNetworkRuleListResult) (VirtualNetworkRuleListResult, error)) VirtualNetworkRuleListResultPage {
+ return VirtualNetworkRuleListResultPage{fn: getNextPage}
+}
+
+// VirtualNetworkRuleProperties properties of a virtual network rule.
+type VirtualNetworkRuleProperties struct {
+ // VirtualNetworkSubnetID - The ARM resource id of the virtual network subnet.
+ VirtualNetworkSubnetID *string `json:"virtualNetworkSubnetId,omitempty"`
+ // IgnoreMissingVnetServiceEndpoint - Create firewall rule before the virtual network has vnet service endpoint enabled.
+ IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty"`
+ // State - Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown'
+ State VirtualNetworkRuleState `json:"state,omitempty"`
+}
+
+// VirtualNetworkRulesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkRulesCreateOrUpdateFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesCreateOrUpdateFuture) Result(client VirtualNetworkRulesClient) (vnr VirtualNetworkRule, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("mariadb.VirtualNetworkRulesCreateOrUpdateFuture")
+ return
+ }
+ sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...))
+ if vnr.Response.Response, err = future.GetResult(sender); err == nil && vnr.Response.Response.StatusCode != http.StatusNoContent {
+ vnr, err = client.CreateOrUpdateResponder(vnr.Response.Response)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesCreateOrUpdateFuture", "Result", vnr.Response.Response, "Failure responding to request")
+ }
+ }
+ return
+}
+
+// VirtualNetworkRulesDeleteFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
+type VirtualNetworkRulesDeleteFuture struct {
+ azure.Future
+}
+
+// Result returns the result of the asynchronous operation.
+// If the operation has not completed it will return an error.
+func (future *VirtualNetworkRulesDeleteFuture) Result(client VirtualNetworkRulesClient) (ar autorest.Response, err error) {
+ var done bool
+ done, err = future.Done(client)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesDeleteFuture", "Result", future.Response(), "Polling failure")
+ return
+ }
+ if !done {
+ err = azure.NewAsyncOpIncompleteError("mariadb.VirtualNetworkRulesDeleteFuture")
+ return
+ }
+ ar.Response = future.Response()
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/operations.go
index 1447a7c4dce4..d51379331e30 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/servers.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/servers.go
index 7a98d1107ce3..6f8716ed09b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/servers.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/servers.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewServersClientWithBaseURI(baseURI string, subscriptionID string) ServersC
// serverName - the name of the server.
// parameters - the required parameters for creating or updating a server.
func (client ServersClient) Create(ctx context.Context, resourceGroupName string, serverName string, parameters ServerForCreate) (result ServersCreateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
@@ -105,10 +116,6 @@ func (client ServersClient) CreateSender(req *http.Request) (future ServersCreat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -132,6 +139,16 @@ func (client ServersClient) CreateResponder(resp *http.Response) (result Server,
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Delete(ctx context.Context, resourceGroupName string, serverName string) (result ServersDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Delete", nil, "Failure preparing request")
@@ -177,10 +194,6 @@ func (client ServersClient) DeleteSender(req *http.Request) (future ServersDelet
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -203,6 +216,16 @@ func (client ServersClient) DeleteResponder(resp *http.Response) (result autores
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServersClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result Server, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Get", nil, "Failure preparing request")
@@ -267,6 +290,16 @@ func (client ServersClient) GetResponder(resp *http.Response) (result Server, er
// List list all the servers in a given subscription.
func (client ServersClient) List(ctx context.Context) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "List", nil, "Failure preparing request")
@@ -332,6 +365,16 @@ func (client ServersClient) ListResponder(resp *http.Response) (result ServerLis
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
func (client ServersClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ServerListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -401,6 +444,16 @@ func (client ServersClient) ListByResourceGroupResponder(resp *http.Response) (r
// serverName - the name of the server.
// parameters - the required parameters for updating a server.
func (client ServersClient) Update(ctx context.Context, resourceGroupName string, serverName string, parameters ServerUpdateParameters) (result ServersUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServersClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServersClient", "Update", nil, "Failure preparing request")
@@ -448,10 +501,6 @@ func (client ServersClient) UpdateSender(req *http.Request) (future ServersUpdat
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/serversecurityalertpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/serversecurityalertpolicies.go
index 6449d73e70dc..41da23b765ed 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/serversecurityalertpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/serversecurityalertpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewServerSecurityAlertPoliciesClientWithBaseURI(baseURI string, subscriptio
// serverName - the name of the server.
// parameters - the server security alert policy.
func (client ServerSecurityAlertPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters ServerSecurityAlertPolicy) (result ServerSecurityAlertPoliciesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -94,10 +105,6 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateSender(req *http.R
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -121,6 +128,16 @@ func (client ServerSecurityAlertPoliciesClient) CreateOrUpdateResponder(resp *ht
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ServerSecurityAlertPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result ServerSecurityAlertPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ServerSecurityAlertPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "mariadb.ServerSecurityAlertPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/virtualnetworkrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/virtualnetworkrules.go
new file mode 100644
index 000000000000..b477b0fb012a
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/mariadb/mgmt/2018-06-01-preview/mariadb/virtualnetworkrules.go
@@ -0,0 +1,407 @@
+package mariadb
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// VirtualNetworkRulesClient is the mariaDB Client
+type VirtualNetworkRulesClient struct {
+ BaseClient
+}
+
+// NewVirtualNetworkRulesClient creates an instance of the VirtualNetworkRulesClient client.
+func NewVirtualNetworkRulesClient(subscriptionID string) VirtualNetworkRulesClient {
+ return NewVirtualNetworkRulesClientWithBaseURI(DefaultBaseURI, subscriptionID)
+}
+
+// NewVirtualNetworkRulesClientWithBaseURI creates an instance of the VirtualNetworkRulesClient client.
+func NewVirtualNetworkRulesClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkRulesClient {
+ return VirtualNetworkRulesClient{NewWithBaseURI(baseURI, subscriptionID)}
+}
+
+// CreateOrUpdate creates or updates an existing virtual network rule.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
+// from the Azure Resource Manager API or the portal.
+// serverName - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+// parameters - the requested virtual Network Rule Resource state.
+func (client VirtualNetworkRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (result VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: parameters,
+ Constraints: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties", Name: validation.Null, Rule: false,
+ Chain: []validation.Constraint{{Target: "parameters.VirtualNetworkRuleProperties.VirtualNetworkSubnetID", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
+ return result, validation.NewError("mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", err.Error())
+ }
+
+ req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName, parameters)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.CreateOrUpdateSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "CreateOrUpdate", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// CreateOrUpdatePreparer prepares the CreateOrUpdate request.
+func (client VirtualNetworkRulesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string, parameters VirtualNetworkRule) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsContentType("application/json; charset=utf-8"),
+ autorest.AsPut(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithJSON(parameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkRulesCreateOrUpdateFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkRule, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// Delete deletes the virtual network rule with the given name.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
+// from the Azure Resource Manager API or the portal.
+// serverName - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRulesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Delete", nil, "Failure preparing request")
+ return
+ }
+
+ result, err = client.DeleteSender(req)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Delete", result.Response(), "Failure sending request")
+ return
+ }
+
+ return
+}
+
+// DeletePreparer prepares the Delete request.
+func (client VirtualNetworkRulesClient) DeletePreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsDelete(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// DeleteSender sends the Delete request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) DeleteSender(req *http.Request) (future VirtualNetworkRulesDeleteFuture, err error) {
+ var resp *http.Response
+ resp, err = autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+ if err != nil {
+ return
+ }
+ future.Future, err = azure.NewFutureFromResponse(resp)
+ return
+}
+
+// DeleteResponder handles the response to the Delete request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent),
+ autorest.ByClosing())
+ result.Response = resp
+ return
+}
+
+// Get gets a virtual network rule.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
+// from the Azure Resource Manager API or the portal.
+// serverName - the name of the server.
+// virtualNetworkRuleName - the name of the virtual network rule.
+func (client VirtualNetworkRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (result VirtualNetworkRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ req, err := client.GetPreparer(ctx, resourceGroupName, serverName, virtualNetworkRuleName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client VirtualNetworkRulesClient) GetPreparer(ctx context.Context, resourceGroupName string, serverName string, virtualNetworkRuleName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ "virtualNetworkRuleName": autorest.Encode("path", virtualNetworkRuleName),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules/{virtualNetworkRuleName}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) GetResponder(resp *http.Response) (result VirtualNetworkRule, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// ListByServer gets a list of virtual network rules in a server.
+// Parameters:
+// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
+// from the Azure Resource Manager API or the portal.
+// serverName - the name of the server.
+func (client VirtualNetworkRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.vnrlr.Response.Response != nil {
+ sc = result.vnrlr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ result.fn = client.listByServerNextResults
+ req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByServerSender(req)
+ if err != nil {
+ result.vnrlr.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", resp, "Failure sending request")
+ return
+ }
+
+ result.vnrlr, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "ListByServer", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByServerPreparer prepares the ListByServer request.
+func (client VirtualNetworkRulesClient) ListByServerPreparer(ctx context.Context, resourceGroupName string, serverName string) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "serverName": autorest.Encode("path", serverName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2018-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/virtualNetworkRules", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByServerSender sends the ListByServer request. The method will close the
+// http.Response Body if it receives an error.
+func (client VirtualNetworkRulesClient) ListByServerSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByServerResponder handles the response to the ListByServer request. The method always
+// closes the http.Response Body.
+func (client VirtualNetworkRulesClient) ListByServerResponder(resp *http.Response) (result VirtualNetworkRuleListResult, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByServerNextResults retrieves the next set of results, if any.
+func (client VirtualNetworkRulesClient) listByServerNextResults(ctx context.Context, lastResults VirtualNetworkRuleListResult) (result VirtualNetworkRuleListResult, err error) {
+ req, err := lastResults.virtualNetworkRuleListResultPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByServerSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByServerResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "mariadb.VirtualNetworkRulesClient", "listByServerNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
+func (client VirtualNetworkRulesClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result VirtualNetworkRuleListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkRulesClient.ListByServer")
+ 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.ListByServer(ctx, resourceGroupName, serverName)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go
index 36c28c60b37a..d4466837d87d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/actiongroups.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewActionGroupsClientWithBaseURI(baseURI string, subscriptionID string) Act
// actionGroupName - the name of the action group.
// actionGroup - the action group to create or use for the update.
func (client ActionGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroup ActionGroupResource) (result ActionGroupResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.CreateOrUpdate")
+ 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: actionGroup,
Constraints: []validation.Constraint{{Target: "actionGroup.ActionGroup", Name: validation.Null, Rule: false,
@@ -85,7 +96,7 @@ func (client ActionGroupsClient) CreateOrUpdatePreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -125,6 +136,16 @@ func (client ActionGroupsClient) CreateOrUpdateResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// actionGroupName - the name of the action group.
func (client ActionGroupsClient) Delete(ctx context.Context, resourceGroupName string, actionGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, actionGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActionGroupsClient", "Delete", nil, "Failure preparing request")
@@ -154,7 +175,7 @@ func (client ActionGroupsClient) DeletePreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -193,6 +214,16 @@ func (client ActionGroupsClient) DeleteResponder(resp *http.Response) (result au
// actionGroupName - the name of the action group.
// enableRequest - the receiver to re-enable.
func (client ActionGroupsClient) EnableReceiver(ctx context.Context, resourceGroupName string, actionGroupName string, enableRequest EnableRequest) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.EnableReceiver")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: enableRequest,
Constraints: []validation.Constraint{{Target: "enableRequest.ReceiverName", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -228,7 +259,7 @@ func (client ActionGroupsClient) EnableReceiverPreparer(ctx context.Context, res
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -267,6 +298,16 @@ func (client ActionGroupsClient) EnableReceiverResponder(resp *http.Response) (r
// resourceGroupName - the name of the resource group.
// actionGroupName - the name of the action group.
func (client ActionGroupsClient) Get(ctx context.Context, resourceGroupName string, actionGroupName string) (result ActionGroupResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, actionGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActionGroupsClient", "Get", nil, "Failure preparing request")
@@ -296,7 +337,7 @@ func (client ActionGroupsClient) GetPreparer(ctx context.Context, resourceGroupN
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -333,6 +374,16 @@ func (client ActionGroupsClient) GetResponder(resp *http.Response) (result Actio
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ActionGroupsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ActionGroupList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActionGroupsClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -361,7 +412,7 @@ func (client ActionGroupsClient) ListByResourceGroupPreparer(ctx context.Context
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -396,6 +447,16 @@ func (client ActionGroupsClient) ListByResourceGroupResponder(resp *http.Respons
// ListBySubscriptionID get a list of all action groups in a subscription.
func (client ActionGroupsClient) ListBySubscriptionID(ctx context.Context) (result ActionGroupList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.ListBySubscriptionID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionIDPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActionGroupsClient", "ListBySubscriptionID", nil, "Failure preparing request")
@@ -423,7 +484,7 @@ func (client ActionGroupsClient) ListBySubscriptionIDPreparer(ctx context.Contex
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -462,6 +523,16 @@ func (client ActionGroupsClient) ListBySubscriptionIDResponder(resp *http.Respon
// actionGroupName - the name of the action group.
// actionGroupPatch - parameters supplied to the operation.
func (client ActionGroupsClient) Update(ctx context.Context, resourceGroupName string, actionGroupName string, actionGroupPatch ActionGroupPatchBody) (result ActionGroupResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActionGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, actionGroupName, actionGroupPatch)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActionGroupsClient", "Update", nil, "Failure preparing request")
@@ -491,7 +562,7 @@ func (client ActionGroupsClient) UpdatePreparer(ctx context.Context, resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
- const APIVersion = "2018-03-01"
+ const APIVersion = "2018-09-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go
index 9b86523b802c..1e0b071bed4d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogalerts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewActivityLogAlertsClientWithBaseURI(baseURI string, subscriptionID string
// activityLogAlertName - the name of the activity log alert.
// activityLogAlert - the activity log alert to create or use for the update.
func (client ActivityLogAlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlert ActivityLogAlertResource) (result ActivityLogAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.CreateOrUpdate")
+ 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: activityLogAlert,
Constraints: []validation.Constraint{{Target: "activityLogAlert.ActivityLogAlert", Name: validation.Null, Rule: false,
@@ -126,6 +137,16 @@ func (client ActivityLogAlertsClient) CreateOrUpdateResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// activityLogAlertName - the name of the activity log alert.
func (client ActivityLogAlertsClient) Delete(ctx context.Context, resourceGroupName string, activityLogAlertName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, activityLogAlertName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActivityLogAlertsClient", "Delete", nil, "Failure preparing request")
@@ -192,6 +213,16 @@ func (client ActivityLogAlertsClient) DeleteResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// activityLogAlertName - the name of the activity log alert.
func (client ActivityLogAlertsClient) Get(ctx context.Context, resourceGroupName string, activityLogAlertName string) (result ActivityLogAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, activityLogAlertName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActivityLogAlertsClient", "Get", nil, "Failure preparing request")
@@ -258,6 +289,16 @@ func (client ActivityLogAlertsClient) GetResponder(resp *http.Response) (result
// Parameters:
// resourceGroupName - the name of the resource group.
func (client ActivityLogAlertsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ActivityLogAlertList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActivityLogAlertsClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -321,6 +362,16 @@ func (client ActivityLogAlertsClient) ListByResourceGroupResponder(resp *http.Re
// ListBySubscriptionID get a list of all activity log alerts in a subscription.
func (client ActivityLogAlertsClient) ListBySubscriptionID(ctx context.Context) (result ActivityLogAlertList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.ListBySubscriptionID")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionIDPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActivityLogAlertsClient", "ListBySubscriptionID", nil, "Failure preparing request")
@@ -387,6 +438,16 @@ func (client ActivityLogAlertsClient) ListBySubscriptionIDResponder(resp *http.R
// activityLogAlertName - the name of the activity log alert.
// activityLogAlertPatch - parameters supplied to the operation.
func (client ActivityLogAlertsClient) Update(ctx context.Context, resourceGroupName string, activityLogAlertName string, activityLogAlertPatch ActivityLogAlertPatchBody) (result ActivityLogAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogAlertsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, activityLogAlertName, activityLogAlertPatch)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ActivityLogAlertsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go
index 0a3c4e1137f9..92120d847dce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/activitylogs.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -59,6 +60,16 @@ func NewActivityLogsClientWithBaseURI(baseURI string, subscriptionID string) Act
// *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*,
// *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*
func (client ActivityLogsClient) List(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogsClient.List")
+ defer func() {
+ sc := -1
+ if result.edc.Response.Response != nil {
+ sc = result.edc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, filter, selectParameter)
if err != nil {
@@ -127,8 +138,8 @@ func (client ActivityLogsClient) ListResponder(resp *http.Response) (result Even
}
// listNextResults retrieves the next set of results, if any.
-func (client ActivityLogsClient) listNextResults(lastResults EventDataCollection) (result EventDataCollection, err error) {
- req, err := lastResults.eventDataCollectionPreparer()
+func (client ActivityLogsClient) listNextResults(ctx context.Context, lastResults EventDataCollection) (result EventDataCollection, err error) {
+ req, err := lastResults.eventDataCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.ActivityLogsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -149,6 +160,16 @@ func (client ActivityLogsClient) listNextResults(lastResults EventDataCollection
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ActivityLogsClient) ListComplete(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ActivityLogsClient.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, filter, selectParameter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go
index aa0f1f5b56e0..71ddce0de4b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertruleincidents.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAlertRuleIncidentsClientWithBaseURI(baseURI string, subscriptionID strin
// ruleName - the name of the rule.
// incidentName - the name of the incident to retrieve.
func (client AlertRuleIncidentsClient) Get(ctx context.Context, resourceGroupName string, ruleName string, incidentName string) (result Incident, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleIncidentsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, ruleName, incidentName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRuleIncidentsClient", "Get", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client AlertRuleIncidentsClient) GetResponder(resp *http.Response) (result
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client AlertRuleIncidentsClient) ListByAlertRule(ctx context.Context, resourceGroupName string, ruleName string) (result IncidentListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRuleIncidentsClient.ListByAlertRule")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByAlertRulePreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRuleIncidentsClient", "ListByAlertRule", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go
index 10956eeddd49..4de0da4d9bb4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/alertrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAlertRulesClientWithBaseURI(baseURI string, subscriptionID string) Alert
// ruleName - the name of the rule.
// parameters - the parameters of the rule to create or update.
func (client AlertRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters AlertRuleResource) (result AlertRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AlertRule", Name: validation.Null, Rule: true,
@@ -125,6 +136,16 @@ func (client AlertRulesClient) CreateOrUpdateResponder(resp *http.Response) (res
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client AlertRulesClient) Delete(ctx context.Context, resourceGroupName string, ruleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRulesClient", "Delete", nil, "Failure preparing request")
@@ -191,6 +212,16 @@ func (client AlertRulesClient) DeleteResponder(resp *http.Response) (result auto
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client AlertRulesClient) Get(ctx context.Context, resourceGroupName string, ruleName string) (result AlertRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRulesClient", "Get", nil, "Failure preparing request")
@@ -257,6 +288,16 @@ func (client AlertRulesClient) GetResponder(resp *http.Response) (result AlertRu
// Parameters:
// resourceGroupName - the name of the resource group.
func (client AlertRulesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AlertRuleResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRulesClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -320,6 +361,16 @@ func (client AlertRulesClient) ListByResourceGroupResponder(resp *http.Response)
// ListBySubscription list the alert rules within a subscription.
func (client AlertRulesClient) ListBySubscription(ctx context.Context) (result AlertRuleResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRulesClient", "ListBySubscription", nil, "Failure preparing request")
@@ -386,6 +437,16 @@ func (client AlertRulesClient) ListBySubscriptionResponder(resp *http.Response)
// ruleName - the name of the rule.
// alertRulesResource - parameters supplied to the operation.
func (client AlertRulesClient) Update(ctx context.Context, resourceGroupName string, ruleName string, alertRulesResource AlertRuleResourcePatch) (result AlertRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, ruleName, alertRulesResource)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AlertRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go
index 72f975844963..dd6a3b0e33d2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/autoscalesettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAutoscaleSettingsClientWithBaseURI(baseURI string, subscriptionID string
// autoscaleSettingName - the autoscale setting name.
// parameters - parameters supplied to the operation.
func (client AutoscaleSettingsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, autoscaleSettingName string, parameters AutoscaleSettingResource) (result AutoscaleSettingResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AutoscaleSetting", Name: validation.Null, Rule: true,
@@ -124,6 +135,16 @@ func (client AutoscaleSettingsClient) CreateOrUpdateResponder(resp *http.Respons
// resourceGroupName - the name of the resource group.
// autoscaleSettingName - the autoscale setting name.
func (client AutoscaleSettingsClient) Delete(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, autoscaleSettingName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "Delete", nil, "Failure preparing request")
@@ -190,6 +211,16 @@ func (client AutoscaleSettingsClient) DeleteResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group.
// autoscaleSettingName - the autoscale setting name.
func (client AutoscaleSettingsClient) Get(ctx context.Context, resourceGroupName string, autoscaleSettingName string) (result AutoscaleSettingResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, autoscaleSettingName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "Get", nil, "Failure preparing request")
@@ -256,6 +287,16 @@ func (client AutoscaleSettingsClient) GetResponder(resp *http.Response) (result
// Parameters:
// resourceGroupName - the name of the resource group.
func (client AutoscaleSettingsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result AutoscaleSettingResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.asrc.Response.Response != nil {
+ sc = result.asrc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -319,8 +360,8 @@ func (client AutoscaleSettingsClient) ListByResourceGroupResponder(resp *http.Re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AutoscaleSettingsClient) listByResourceGroupNextResults(lastResults AutoscaleSettingResourceCollection) (result AutoscaleSettingResourceCollection, err error) {
- req, err := lastResults.autoscaleSettingResourceCollectionPreparer()
+func (client AutoscaleSettingsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AutoscaleSettingResourceCollection) (result AutoscaleSettingResourceCollection, err error) {
+ req, err := lastResults.autoscaleSettingResourceCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -341,12 +382,32 @@ func (client AutoscaleSettingsClient) listByResourceGroupNextResults(lastResults
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AutoscaleSettingsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result AutoscaleSettingResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListBySubscription lists the autoscale settings for a subscription
func (client AutoscaleSettingsClient) ListBySubscription(ctx context.Context) (result AutoscaleSettingResourceCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.asrc.Response.Response != nil {
+ sc = result.asrc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -409,8 +470,8 @@ func (client AutoscaleSettingsClient) ListBySubscriptionResponder(resp *http.Res
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client AutoscaleSettingsClient) listBySubscriptionNextResults(lastResults AutoscaleSettingResourceCollection) (result AutoscaleSettingResourceCollection, err error) {
- req, err := lastResults.autoscaleSettingResourceCollectionPreparer()
+func (client AutoscaleSettingsClient) listBySubscriptionNextResults(ctx context.Context, lastResults AutoscaleSettingResourceCollection) (result AutoscaleSettingResourceCollection, err error) {
+ req, err := lastResults.autoscaleSettingResourceCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -431,6 +492,16 @@ func (client AutoscaleSettingsClient) listBySubscriptionNextResults(lastResults
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client AutoscaleSettingsClient) ListBySubscriptionComplete(ctx context.Context) (result AutoscaleSettingResourceCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -441,6 +512,16 @@ func (client AutoscaleSettingsClient) ListBySubscriptionComplete(ctx context.Con
// autoscaleSettingName - the autoscale setting name.
// autoscaleSettingResource - parameters supplied to the operation.
func (client AutoscaleSettingsClient) Update(ctx context.Context, resourceGroupName string, autoscaleSettingName string, autoscaleSettingResource AutoscaleSettingResourcePatch) (result AutoscaleSettingResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, autoscaleSettingName, autoscaleSettingResource)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.AutoscaleSettingsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go
index 1010aad77ec9..441f65a391a1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettings.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewDiagnosticSettingsClientWithBaseURI(baseURI string, subscriptionID strin
// parameters - parameters supplied to the operation.
// name - the name of the diagnostic setting.
func (client DiagnosticSettingsClient) CreateOrUpdate(ctx context.Context, resourceURI string, parameters DiagnosticSettingsResource, name string) (result DiagnosticSettingsResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceURI, parameters, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client DiagnosticSettingsClient) CreateOrUpdateResponder(resp *http.Respon
// resourceURI - the identifier of the resource.
// name - the name of the diagnostic setting.
func (client DiagnosticSettingsClient) Delete(ctx context.Context, resourceURI string, name string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceURI, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsClient", "Delete", nil, "Failure preparing request")
@@ -178,6 +199,16 @@ func (client DiagnosticSettingsClient) DeleteResponder(resp *http.Response) (res
// resourceURI - the identifier of the resource.
// name - the name of the diagnostic setting.
func (client DiagnosticSettingsClient) Get(ctx context.Context, resourceURI string, name string) (result DiagnosticSettingsResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceURI, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsClient", "Get", nil, "Failure preparing request")
@@ -243,6 +274,16 @@ func (client DiagnosticSettingsClient) GetResponder(resp *http.Response) (result
// Parameters:
// resourceURI - the identifier of the resource.
func (client DiagnosticSettingsClient) List(ctx context.Context, resourceURI string) (result DiagnosticSettingsResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceURI)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go
index ec64a3a83066..724253f35b7e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/diagnosticsettingscategory.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewDiagnosticSettingsCategoryClientWithBaseURI(baseURI string, subscription
// resourceURI - the identifier of the resource.
// name - the name of the diagnostic setting.
func (client DiagnosticSettingsCategoryClient) Get(ctx context.Context, resourceURI string, name string) (result DiagnosticSettingsCategoryResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsCategoryClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceURI, name)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsCategoryClient", "Get", nil, "Failure preparing request")
@@ -109,6 +120,16 @@ func (client DiagnosticSettingsCategoryClient) GetResponder(resp *http.Response)
// Parameters:
// resourceURI - the identifier of the resource.
func (client DiagnosticSettingsCategoryClient) List(ctx context.Context, resourceURI string) (result DiagnosticSettingsCategoryResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiagnosticSettingsCategoryClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceURI)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.DiagnosticSettingsCategoryClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go
index fe2200db92cf..ed5854d8f49a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/eventcategories.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewEventCategoriesClientWithBaseURI(baseURI string, subscriptionID string)
// List get the list of available event categories supported in the Activity Logs Service. The current list includes
// the following: Administrative, Security, ServiceHealth, Alert, Recommendation, Policy.
func (client EventCategoriesClient) List(ctx context.Context) (result EventCategoryCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventCategoriesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.EventCategoriesClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go
index 70f4ec53779e..442bc2f213cd 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/logprofiles.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewLogProfilesClientWithBaseURI(baseURI string, subscriptionID string) LogP
// logProfileName - the name of the log profile.
// parameters - parameters supplied to the operation.
func (client LogProfilesClient) CreateOrUpdate(ctx context.Context, logProfileName string, parameters LogProfileResource) (result LogProfileResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogProfilesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.LogProfileProperties", Name: validation.Null, Rule: true,
@@ -126,6 +137,16 @@ func (client LogProfilesClient) CreateOrUpdateResponder(resp *http.Response) (re
// Parameters:
// logProfileName - the name of the log profile.
func (client LogProfilesClient) Delete(ctx context.Context, logProfileName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogProfilesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, logProfileName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.LogProfilesClient", "Delete", nil, "Failure preparing request")
@@ -190,6 +211,16 @@ func (client LogProfilesClient) DeleteResponder(resp *http.Response) (result aut
// Parameters:
// logProfileName - the name of the log profile.
func (client LogProfilesClient) Get(ctx context.Context, logProfileName string) (result LogProfileResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogProfilesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, logProfileName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.LogProfilesClient", "Get", nil, "Failure preparing request")
@@ -253,6 +284,16 @@ func (client LogProfilesClient) GetResponder(resp *http.Response) (result LogPro
// List list the log profiles.
func (client LogProfilesClient) List(ctx context.Context) (result LogProfileCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogProfilesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.LogProfilesClient", "List", nil, "Failure preparing request")
@@ -318,6 +359,16 @@ func (client LogProfilesClient) ListResponder(resp *http.Response) (result LogPr
// logProfileName - the name of the log profile.
// logProfilesResource - parameters supplied to the operation.
func (client LogProfilesClient) Update(ctx context.Context, logProfileName string, logProfilesResource LogProfileResourcePatch) (result LogProfileResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LogProfilesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, logProfileName, logProfilesResource)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.LogProfilesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go
index 60395cc2cfd2..240ac032e593 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalerts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewMetricAlertsClientWithBaseURI(baseURI string, subscriptionID string) Met
// ruleName - the name of the rule.
// parameters - the parameters of the rule to create or update.
func (client MetricAlertsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResource) (result MetricAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.MetricAlertProperties", Name: validation.Null, Rule: true,
@@ -123,11 +134,21 @@ func (client MetricAlertsClient) CreateOrUpdateResponder(resp *http.Response) (r
return
}
-// Delete delete an alert rule defitiniton.
+// Delete delete an alert rule definition.
// Parameters:
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client MetricAlertsClient) Delete(ctx context.Context, resourceGroupName string, ruleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsClient", "Delete", nil, "Failure preparing request")
@@ -189,11 +210,21 @@ func (client MetricAlertsClient) DeleteResponder(resp *http.Response) (result au
return
}
-// Get retrieve an alert rule definiton.
+// Get retrieve an alert rule definition.
// Parameters:
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client MetricAlertsClient) Get(ctx context.Context, resourceGroupName string, ruleName string) (result MetricAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsClient", "Get", nil, "Failure preparing request")
@@ -256,10 +287,20 @@ func (client MetricAlertsClient) GetResponder(resp *http.Response) (result Metri
return
}
-// ListByResourceGroup retrieve alert rule defintions in a resource group.
+// ListByResourceGroup retrieve alert rule definitions in a resource group.
// Parameters:
// resourceGroupName - the name of the resource group.
func (client MetricAlertsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result MetricAlertResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -323,6 +364,16 @@ func (client MetricAlertsClient) ListByResourceGroupResponder(resp *http.Respons
// ListBySubscription retrieve alert rule definitions in a subscription.
func (client MetricAlertsClient) ListBySubscription(ctx context.Context) (result MetricAlertResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsClient", "ListBySubscription", nil, "Failure preparing request")
@@ -389,6 +440,16 @@ func (client MetricAlertsClient) ListBySubscriptionResponder(resp *http.Response
// ruleName - the name of the rule.
// parameters - the parameters of the rule to update.
func (client MetricAlertsClient) Update(ctx context.Context, resourceGroupName string, ruleName string, parameters MetricAlertResourcePatch) (result MetricAlertResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, ruleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go
index 7ee078c4599b..389ce69d7cd1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricalertsstatus.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewMetricAlertsStatusClientWithBaseURI(baseURI string, subscriptionID strin
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client MetricAlertsStatusClient) List(ctx context.Context, resourceGroupName string, ruleName string) (result MetricAlertStatusCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsStatusClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsStatusClient", "List", nil, "Failure preparing request")
@@ -112,6 +123,16 @@ func (client MetricAlertsStatusClient) ListResponder(resp *http.Response) (resul
// ruleName - the name of the rule.
// statusName - the name of the status.
func (client MetricAlertsStatusClient) ListByName(ctx context.Context, resourceGroupName string, ruleName string, statusName string) (result MetricAlertStatusCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricAlertsStatusClient.ListByName")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByNamePreparer(ctx, resourceGroupName, ruleName, statusName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricAlertsStatusClient", "ListByName", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go
index 02cb8cbaaf4b..43042eacb376 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricbaseline.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewMetricBaselineClientWithBaseURI(baseURI string, subscriptionID string) M
// subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
// timeSeriesInformation - information that need to be specified to calculate a baseline on a time series.
func (client MetricBaselineClient) CalculateBaseline(ctx context.Context, resourceURI string, timeSeriesInformation TimeSeriesInformation) (result CalculateBaselineResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricBaselineClient.CalculateBaseline")
+ 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: timeSeriesInformation,
Constraints: []validation.Constraint{{Target: "timeSeriesInformation.Sensitivities", Name: validation.Null, Rule: true, Chain: nil},
@@ -131,6 +142,16 @@ func (client MetricBaselineClient) CalculateBaselineResponder(resp *http.Respons
// sensitivities - the list of sensitivities (comma separated) to retrieve.
// resultType - allows retrieving only metadata of the baseline. On data request all information is retrieved.
func (client MetricBaselineClient) Get(ctx context.Context, resourceURI string, metricName string, timespan string, interval *string, aggregation string, sensitivities string, resultType ResultType) (result BaselineResponse, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricBaselineClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceURI, metricName, timespan, interval, aggregation, sensitivities, resultType)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricBaselineClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go
index dc73c33012a1..289abe939a34 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metricdefinitions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewMetricDefinitionsClientWithBaseURI(baseURI string, subscriptionID string
// resourceURI - the identifier of the resource.
// metricnamespace - metric namespace to query metric definitions for.
func (client MetricDefinitionsClient) List(ctx context.Context, resourceURI string, metricnamespace string) (result MetricDefinitionCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricDefinitionsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceURI, metricnamespace)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricDefinitionsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go
index a381c665472c..4c48dcb99e88 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/metrics.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -64,6 +65,16 @@ func NewMetricsClientWithBaseURI(baseURI string, subscriptionID string) MetricsC
// operation's description for details.
// metricnamespace - metric namespace to query metric definitions for.
func (client MetricsClient) List(ctx context.Context, resourceURI string, timespan string, interval *string, metricnames string, aggregation string, top *int32, orderby string, filter string, resultType ResultType, metricnamespace string) (result Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/MetricsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx, resourceURI, timespan, interval, metricnames, aggregation, top, orderby, filter, resultType, metricnamespace)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.MetricsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
index fe23dd18b42b..e9dd91e0266b 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/models.go
@@ -18,13 +18,18 @@ package insights
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights"
+
// AggregationType enumerates the values for aggregation type.
type AggregationType string
@@ -638,6 +643,8 @@ type ActionGroup struct {
LogicAppReceivers *[]LogicAppReceiver `json:"logicAppReceivers,omitempty"`
// AzureFunctionReceivers - The list of azure function receivers that are part of this action group.
AzureFunctionReceivers *[]AzureFunctionReceiver `json:"azureFunctionReceivers,omitempty"`
+ // ArmRoleReceivers - The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported.
+ ArmRoleReceivers *[]ArmRoleReceiver `json:"armRoleReceivers,omitempty"`
}
// ActionGroupList a list of action groups.
@@ -858,15 +865,15 @@ type ActivityLogAlertActionList struct {
ActionGroups *[]ActivityLogAlertActionGroup `json:"actionGroups,omitempty"`
}
-// ActivityLogAlertAllOfCondition an Activity Log alert condition that is met when all its member conditions are
-// met.
+// ActivityLogAlertAllOfCondition an Activity Log alert condition that is met when all its member
+// conditions are met.
type ActivityLogAlertAllOfCondition struct {
// AllOf - The list of activity log alert conditions.
AllOf *[]ActivityLogAlertLeafCondition `json:"allOf,omitempty"`
}
-// ActivityLogAlertLeafCondition an Activity Log alert condition that is met by comparing an activity log field and
-// value.
+// ActivityLogAlertLeafCondition an Activity Log alert condition that is met by comparing an activity log
+// field and value.
type ActivityLogAlertLeafCondition struct {
// Field - The name of the field that this condition will examine. The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', 'resourceType', or anything beginning with 'properties.'.
Field *string `json:"field,omitempty"`
@@ -1052,7 +1059,7 @@ func (alar *ActivityLogAlertResource) UnmarshalJSON(body []byte) error {
return nil
}
-// AlertingAction specifiy action need to be taken when rule type is Alert
+// AlertingAction specify action need to be taken when rule type is Alert
type AlertingAction struct {
// Severity - Severity of the alert. Possible values include: 'Zero', 'One', 'Two', 'Three', 'Four'
Severity AlertSeverity `json:"severity,omitempty"`
@@ -1361,6 +1368,14 @@ func (arrp *AlertRuleResourcePatch) UnmarshalJSON(body []byte) error {
return nil
}
+// ArmRoleReceiver an arm role receiver.
+type ArmRoleReceiver struct {
+ // Name - The name of the arm role receiver. Names must be unique across all receivers within an action group.
+ Name *string `json:"name,omitempty"`
+ // RoleID - The arm role id.
+ RoleID *string `json:"roleId,omitempty"`
+}
+
// AutomationRunbookReceiver the Azure Automation Runbook notification receiver.
type AutomationRunbookReceiver struct {
// AutomationAccountID - The Azure automation account Id which holds this runbook and authenticate to Azure resource.
@@ -1401,7 +1416,8 @@ type AutoscaleProfile struct {
Recurrence *Recurrence `json:"recurrence,omitempty"`
}
-// AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a resource.
+// AutoscaleSetting a setting that contains all of the configuration for the automatic scaling of a
+// resource.
type AutoscaleSetting struct {
// Profiles - the collection of automatic scaling profiles that specify different scaling parameters for different time periods. A maximum of 20 profiles can be specified.
Profiles *[]AutoscaleProfile `json:"profiles,omitempty"`
@@ -1534,21 +1550,31 @@ type AutoscaleSettingResourceCollection struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// AutoscaleSettingResourceCollectionIterator provides access to a complete listing of AutoscaleSettingResource
-// values.
+// AutoscaleSettingResourceCollectionIterator provides access to a complete listing of
+// AutoscaleSettingResource values.
type AutoscaleSettingResourceCollectionIterator struct {
i int
page AutoscaleSettingResourceCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AutoscaleSettingResourceCollectionIterator) Next() error {
+func (iter *AutoscaleSettingResourceCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1557,6 +1583,13 @@ func (iter *AutoscaleSettingResourceCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AutoscaleSettingResourceCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AutoscaleSettingResourceCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1576,6 +1609,11 @@ func (iter AutoscaleSettingResourceCollectionIterator) Value() AutoscaleSettingR
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AutoscaleSettingResourceCollectionIterator type.
+func NewAutoscaleSettingResourceCollectionIterator(page AutoscaleSettingResourceCollectionPage) AutoscaleSettingResourceCollectionIterator {
+ return AutoscaleSettingResourceCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (asrc AutoscaleSettingResourceCollection) IsEmpty() bool {
return asrc.Value == nil || len(*asrc.Value) == 0
@@ -1583,11 +1621,11 @@ func (asrc AutoscaleSettingResourceCollection) IsEmpty() bool {
// autoscaleSettingResourceCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectionPreparer() (*http.Request, error) {
+func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectionPreparer(ctx context.Context) (*http.Request, error) {
if asrc.NextLink == nil || len(to.String(asrc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(asrc.NextLink)))
@@ -1595,14 +1633,24 @@ func (asrc AutoscaleSettingResourceCollection) autoscaleSettingResourceCollectio
// AutoscaleSettingResourceCollectionPage contains a page of AutoscaleSettingResource values.
type AutoscaleSettingResourceCollectionPage struct {
- fn func(AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)
+ fn func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)
asrc AutoscaleSettingResourceCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AutoscaleSettingResourceCollectionPage) Next() error {
- next, err := page.fn(page.asrc)
+func (page *AutoscaleSettingResourceCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoscaleSettingResourceCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.asrc)
if err != nil {
return err
}
@@ -1610,6 +1658,13 @@ func (page *AutoscaleSettingResourceCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AutoscaleSettingResourceCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AutoscaleSettingResourceCollectionPage) NotDone() bool {
return !page.asrc.IsEmpty()
@@ -1628,6 +1683,11 @@ func (page AutoscaleSettingResourceCollectionPage) Values() []AutoscaleSettingRe
return *page.asrc.Value
}
+// Creates a new instance of the AutoscaleSettingResourceCollectionPage type.
+func NewAutoscaleSettingResourceCollectionPage(getNextPage func(context.Context, AutoscaleSettingResourceCollection) (AutoscaleSettingResourceCollection, error)) AutoscaleSettingResourceCollectionPage {
+ return AutoscaleSettingResourceCollectionPage{fn: getNextPage}
+}
+
// AutoscaleSettingResourcePatch the autoscale setting object for patch operations.
type AutoscaleSettingResourcePatch struct {
// Tags - Resource tags
@@ -1687,7 +1747,7 @@ type AzNsActionGroup struct {
ActionGroup *[]string `json:"actionGroup,omitempty"`
// EmailSubject - Custom subject override for all email ids in Azure action group
EmailSubject *string `json:"emailSubject,omitempty"`
- // CustomWebhookPayload - Custom payload to be sent for all webook URI in Azure action group
+ // CustomWebhookPayload - Custom payload to be sent for all webhook URI in Azure action group
CustomWebhookPayload *string `json:"customWebhookPayload,omitempty"`
}
@@ -1731,7 +1791,7 @@ type BaselineMetadataValue struct {
// BaselineProperties the baseline properties class.
type BaselineProperties struct {
- // Timespan - The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
+ // Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
Timespan *string `json:"timespan,omitempty"`
// Interval - The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
Interval *string `json:"interval,omitempty"`
@@ -1827,7 +1887,7 @@ func (br *BaselineResponse) UnmarshalJSON(body []byte) error {
return nil
}
-// CalculateBaselineResponse the response to a calcualte baseline call.
+// CalculateBaselineResponse the response to a calculate baseline call.
type CalculateBaselineResponse struct {
autorest.Response `json:"-"`
// Type - the resource type of the baseline resource.
@@ -1952,7 +2012,8 @@ func (dscr *DiagnosticSettingsCategoryResource) UnmarshalJSON(body []byte) error
return nil
}
-// DiagnosticSettingsCategoryResourceCollection represents a collection of diagnostic setting category resources.
+// DiagnosticSettingsCategoryResourceCollection represents a collection of diagnostic setting category
+// resources.
type DiagnosticSettingsCategoryResourceCollection struct {
autorest.Response `json:"-"`
// Value - The collection of diagnostic settings category resources.
@@ -2245,14 +2306,24 @@ type EventDataCollectionIterator struct {
page EventDataCollectionPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EventDataCollectionIterator) Next() error {
+func (iter *EventDataCollectionIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventDataCollectionIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2261,6 +2332,13 @@ func (iter *EventDataCollectionIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EventDataCollectionIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EventDataCollectionIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2280,6 +2358,11 @@ func (iter EventDataCollectionIterator) Value() EventData {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EventDataCollectionIterator type.
+func NewEventDataCollectionIterator(page EventDataCollectionPage) EventDataCollectionIterator {
+ return EventDataCollectionIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (edc EventDataCollection) IsEmpty() bool {
return edc.Value == nil || len(*edc.Value) == 0
@@ -2287,11 +2370,11 @@ func (edc EventDataCollection) IsEmpty() bool {
// eventDataCollectionPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (edc EventDataCollection) eventDataCollectionPreparer() (*http.Request, error) {
+func (edc EventDataCollection) eventDataCollectionPreparer(ctx context.Context) (*http.Request, error) {
if edc.NextLink == nil || len(to.String(edc.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(edc.NextLink)))
@@ -2299,14 +2382,24 @@ func (edc EventDataCollection) eventDataCollectionPreparer() (*http.Request, err
// EventDataCollectionPage contains a page of EventData values.
type EventDataCollectionPage struct {
- fn func(EventDataCollection) (EventDataCollection, error)
+ fn func(context.Context, EventDataCollection) (EventDataCollection, error)
edc EventDataCollection
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EventDataCollectionPage) Next() error {
- next, err := page.fn(page.edc)
+func (page *EventDataCollectionPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EventDataCollectionPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.edc)
if err != nil {
return err
}
@@ -2314,6 +2407,13 @@ func (page *EventDataCollectionPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EventDataCollectionPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EventDataCollectionPage) NotDone() bool {
return !page.edc.IsEmpty()
@@ -2332,6 +2432,11 @@ func (page EventDataCollectionPage) Values() []EventData {
return *page.edc.Value
}
+// Creates a new instance of the EventDataCollectionPage type.
+func NewEventDataCollectionPage(getNextPage func(context.Context, EventDataCollection) (EventDataCollection, error)) EventDataCollectionPage {
+ return EventDataCollectionPage{fn: getNextPage}
+}
+
// HTTPRequestInfo the Http request info.
type HTTPRequestInfo struct {
// ClientRequestID - the client request id.
@@ -2706,11 +2811,11 @@ type LogSearchRule struct {
Enabled Enabled `json:"enabled,omitempty"`
// LastUpdatedTime - Last time the rule was updated in IS08601 format.
LastUpdatedTime *date.Time `json:"lastUpdatedTime,omitempty"`
- // ProvisioningState - Provisioning state of the scheduledquery rule. Possible values include: 'Succeeded', 'Deploying', 'Canceled', 'Failed'
+ // ProvisioningState - Provisioning state of the scheduled query rule. Possible values include: 'Succeeded', 'Deploying', 'Canceled', 'Failed'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
// Source - Data Source against which rule will Query Data
Source *Source `json:"source,omitempty"`
- // Schedule - Schedule (Frequnecy, Time Window) for rule. Required for action type - AlertingAction
+ // Schedule - Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
Schedule *Schedule `json:"schedule,omitempty"`
// Action - Action needs to be taken on rule execution.
Action BasicAction `json:"action,omitempty"`
@@ -2979,7 +3084,7 @@ type LogSettings struct {
RetentionPolicy *RetentionPolicy `json:"retentionPolicy,omitempty"`
}
-// LogToMetricAction specifiy action need to be taken when rule type is converting log to metric
+// LogToMetricAction specify action need to be taken when rule type is converting log to metric
type LogToMetricAction struct {
// Criteria - Severity of the alert
Criteria *Criteria `json:"criteria,omitempty"`
@@ -3287,8 +3392,8 @@ func (mac *MetricAlertCriteria) UnmarshalJSON(body []byte) error {
return nil
}
-// MetricAlertMultipleResourceMultipleMetricCriteria speficies the metric alert criteria for multiple resource that
-// has multiple metric criteria.
+// MetricAlertMultipleResourceMultipleMetricCriteria specifies the metric alert criteria for multiple
+// resource that has multiple metric criteria.
type MetricAlertMultipleResourceMultipleMetricCriteria struct {
// AllOf - the list of multiple metric criteria for this 'all of' operation.
AllOf *[]BasicMultiMetricCriteria `json:"allOf,omitempty"`
@@ -3698,8 +3803,8 @@ func (marp *MetricAlertResourcePatch) UnmarshalJSON(body []byte) error {
return nil
}
-// MetricAlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single resource that
-// has multiple metric criteria.
+// MetricAlertSingleResourceMultipleMetricCriteria specifies the metric alert criteria for a single
+// resource that has multiple metric criteria.
type MetricAlertSingleResourceMultipleMetricCriteria struct {
// AllOf - The list of metric criteria for this 'all of' operation.
AllOf *[]MetricCriteria `json:"allOf,omitempty"`
@@ -3834,8 +3939,8 @@ func (masp MetricAlertStatusProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
-// MetricAvailability metric availability specifies the time grain (aggregation interval or frequency) and the
-// retention period for that time grain.
+// MetricAvailability metric availability specifies the time grain (aggregation interval or frequency) and
+// the retention period for that time grain.
type MetricAvailability struct {
// TimeGrain - the time grain specifies the aggregation interval for the metric. Expressed as a duration 'PT1M', 'P1D', etc.
TimeGrain *string `json:"timeGrain,omitempty"`
@@ -3878,8 +3983,12 @@ func (mc MetricCriteria) MarshalJSON() ([]byte, error) {
if mc.MetricNamespace != nil {
objectMap["metricNamespace"] = mc.MetricNamespace
}
- objectMap["operator"] = mc.Operator
- objectMap["timeAggregation"] = mc.TimeAggregation
+ if mc.Operator != nil {
+ objectMap["operator"] = mc.Operator
+ }
+ if mc.TimeAggregation != nil {
+ objectMap["timeAggregation"] = mc.TimeAggregation
+ }
if mc.Threshold != nil {
objectMap["threshold"] = mc.Threshold
}
@@ -4015,7 +4124,7 @@ type MetricDefinition struct {
IsDimensionRequired *bool `json:"isDimensionRequired,omitempty"`
// ResourceID - the resource identifier of the resource that emitted the metric.
ResourceID *string `json:"resourceId,omitempty"`
- // Namespace - the namespace the metric blongs to.
+ // Namespace - the namespace the metric belongs to.
Namespace *string `json:"namespace,omitempty"`
// Name - the name and the display name of the metric, i.e. it is a localizable string.
Name *LocalizableString `json:"name,omitempty"`
@@ -4251,8 +4360,8 @@ type ProxyOnlyResource struct {
Type *string `json:"type,omitempty"`
}
-// Recurrence the repeating times at which this profile begins. This element is not used if the FixedDate element
-// is used.
+// Recurrence the repeating times at which this profile begins. This element is not used if the FixedDate
+// element is used.
type Recurrence struct {
// Frequency - the recurrence frequency. How often the schedule profile should take effect. This value must be Week, meaning each week will have the same set of profiles. For example, to set a daily schedule, set **schedule** to every day of the week. The frequency property specifies that the schedule is repeated weekly. Possible values include: 'RecurrenceFrequencyNone', 'RecurrenceFrequencySecond', 'RecurrenceFrequencyMinute', 'RecurrenceFrequencyHour', 'RecurrenceFrequencyDay', 'RecurrenceFrequencyWeek', 'RecurrenceFrequencyMonth', 'RecurrenceFrequencyYear'
Frequency RecurrenceFrequency `json:"frequency,omitempty"`
@@ -4262,7 +4371,7 @@ type Recurrence struct {
// RecurrentSchedule the scheduling constraints for when the profile begins.
type RecurrentSchedule struct {
- // TimeZone - the timezone for the hours of the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
+ // TimeZone - the timezone for the hours of the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
TimeZone *string `json:"timeZone,omitempty"`
// Days - the collection of days that the profile takes effect on. Possible values are Sunday through Saturday.
Days *[]string `json:"days,omitempty"`
@@ -4312,7 +4421,7 @@ type Response struct {
autorest.Response `json:"-"`
// Cost - The integer value representing the cost of the query, for data case.
Cost *float64 `json:"cost,omitempty"`
- // Timespan - The timespan for which the data was retrieved. Its value consists of two datatimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
+ // Timespan - The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested.
Timespan *string `json:"timespan,omitempty"`
// Interval - The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made.
Interval *string `json:"interval,omitempty"`
@@ -4636,8 +4745,8 @@ func (rds RuleDataSource) AsBasicRuleDataSource() (BasicRuleDataSource, bool) {
return &rds, true
}
-// RuleEmailAction specifies the action to send email when the rule condition is evaluated. The discriminator is
-// always RuleEmailAction in this case.
+// RuleEmailAction specifies the action to send email when the rule condition is evaluated. The
+// discriminator is always RuleEmailAction in this case.
type RuleEmailAction struct {
// SendToServiceOwners - Whether the administrators (service and co-administrators) of the service should be notified when the alert is activated.
SendToServiceOwners *bool `json:"sendToServiceOwners,omitempty"`
@@ -4776,8 +4885,8 @@ func (rmeds RuleManagementEventDataSource) AsBasicRuleDataSource() (BasicRuleDat
return &rmeds, true
}
-// RuleMetricDataSource a rule metric data source. The discriminator value is always RuleMetricDataSource in this
-// case.
+// RuleMetricDataSource a rule metric data source. The discriminator value is always RuleMetricDataSource
+// in this case.
type RuleMetricDataSource struct {
// MetricName - the name of the metric that defines what the rule monitors.
MetricName *string `json:"metricName,omitempty"`
@@ -4908,8 +5017,9 @@ type Schedule struct {
TimeWindowInMinutes *int32 `json:"timeWindowInMinutes,omitempty"`
}
-// SenderAuthorization the authorization used by the user who has performed the operation that led to this event.
-// This captures the RBAC properties of the event. These usually include the 'action', 'role' and the 'scope'
+// SenderAuthorization the authorization used by the user who has performed the operation that led to this
+// event. This captures the RBAC properties of the event. These usually include the 'action', 'role' and
+// the 'scope'
type SenderAuthorization struct {
// Action - the permissible actions. For instance: microsoft.support/supporttickets/write
Action *string `json:"action,omitempty"`
@@ -5095,7 +5205,7 @@ type TimeSeriesInformation struct {
// TimeWindow a specific date-time for the profile.
type TimeWindow struct {
- // TimeZone - the timezone of the start and end times for the profile. Some examples of valid timezones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
+ // TimeZone - the timezone of the start and end times for the profile. Some examples of valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands Standard Time
TimeZone *string `json:"timeZone,omitempty"`
// Start - the start time for the profile in ISO 8601 format.
Start *date.Time `json:"start,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/operations.go
index bcfbfcf93b3d..2d0faf13570c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available operations from Microsoft.Insights provider.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
index e4c7daba9b0c..67495b64432d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/scheduledqueryrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewScheduledQueryRulesClientWithBaseURI(baseURI string, subscriptionID stri
// ruleName - the name of the rule.
// parameters - the parameters of the rule to create or update.
func (client ScheduledQueryRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResource) (result LogSearchRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.LogSearchRule", Name: validation.Null, Rule: true,
@@ -129,6 +140,16 @@ func (client ScheduledQueryRulesClient) CreateOrUpdateResponder(resp *http.Respo
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client ScheduledQueryRulesClient) Delete(ctx context.Context, resourceGroupName string, ruleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ScheduledQueryRulesClient", "Delete", nil, "Failure preparing request")
@@ -195,6 +216,16 @@ func (client ScheduledQueryRulesClient) DeleteResponder(resp *http.Response) (re
// resourceGroupName - the name of the resource group.
// ruleName - the name of the rule.
func (client ScheduledQueryRulesClient) Get(ctx context.Context, resourceGroupName string, ruleName string) (result LogSearchRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, ruleName)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ScheduledQueryRulesClient", "Get", nil, "Failure preparing request")
@@ -263,6 +294,16 @@ func (client ScheduledQueryRulesClient) GetResponder(resp *http.Response) (resul
// filter - the filter to apply on the operation. For more information please see
// https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx
func (client ScheduledQueryRulesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result LogSearchRuleResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ScheduledQueryRulesClient", "ListByResourceGroup", nil, "Failure preparing request")
@@ -332,6 +373,16 @@ func (client ScheduledQueryRulesClient) ListByResourceGroupResponder(resp *http.
// filter - the filter to apply on the operation. For more information please see
// https://msdn.microsoft.com/en-us/library/azure/dn931934.aspx
func (client ScheduledQueryRulesClient) ListBySubscription(ctx context.Context, filter string) (result LogSearchRuleResourceCollection, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ScheduledQueryRulesClient", "ListBySubscription", nil, "Failure preparing request")
@@ -401,6 +452,16 @@ func (client ScheduledQueryRulesClient) ListBySubscriptionResponder(resp *http.R
// ruleName - the name of the rule.
// parameters - the parameters of the rule to update.
func (client ScheduledQueryRulesClient) Update(ctx context.Context, resourceGroupName string, ruleName string, parameters LogSearchRuleResourcePatch) (result LogSearchRuleResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ScheduledQueryRulesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, ruleName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "insights.ScheduledQueryRulesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go
index 78a629f7152c..14e2c2b18dce 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/monitor/mgmt/2018-03-01/insights/tenantactivitylogs.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -62,6 +63,16 @@ func NewTenantActivityLogsClientWithBaseURI(baseURI string, subscriptionID strin
// *operationId*, *operationName*, *properties*, *resourceGroupName*, *resourceProviderName*, *resourceId*,
// *status*, *submissionTimestamp*, *subStatus*, *subscriptionId*
func (client TenantActivityLogsClient) List(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantActivityLogsClient.List")
+ defer func() {
+ sc := -1
+ if result.edc.Response.Response != nil {
+ sc = result.edc.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, filter, selectParameter)
if err != nil {
@@ -126,8 +137,8 @@ func (client TenantActivityLogsClient) ListResponder(resp *http.Response) (resul
}
// listNextResults retrieves the next set of results, if any.
-func (client TenantActivityLogsClient) listNextResults(lastResults EventDataCollection) (result EventDataCollection, err error) {
- req, err := lastResults.eventDataCollectionPreparer()
+func (client TenantActivityLogsClient) listNextResults(ctx context.Context, lastResults EventDataCollection) (result EventDataCollection, err error) {
+ req, err := lastResults.eventDataCollectionPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "insights.TenantActivityLogsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -148,6 +159,16 @@ func (client TenantActivityLogsClient) listNextResults(lastResults EventDataColl
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client TenantActivityLogsClient) ListComplete(ctx context.Context, filter string, selectParameter string) (result EventDataCollectionIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TenantActivityLogsClient.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, filter, selectParameter)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/models.go
index c72acd231b01..8495adb9e96f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/models.go
@@ -18,13 +18,18 @@ package msi
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi"
+
// UserAssignedIdentities enumerates the values for user assigned identities.
type UserAssignedIdentities string
@@ -213,14 +218,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -229,6 +244,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -248,6 +270,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -255,11 +282,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -267,14 +294,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -282,6 +319,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -300,6 +344,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// UserAssignedIdentitiesListResult values returned by the List operation.
type UserAssignedIdentitiesListResult struct {
autorest.Response `json:"-"`
@@ -315,14 +364,24 @@ type UserAssignedIdentitiesListResultIterator struct {
page UserAssignedIdentitiesListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UserAssignedIdentitiesListResultIterator) Next() error {
+func (iter *UserAssignedIdentitiesListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -331,6 +390,13 @@ func (iter *UserAssignedIdentitiesListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UserAssignedIdentitiesListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UserAssignedIdentitiesListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -350,6 +416,11 @@ func (iter UserAssignedIdentitiesListResultIterator) Value() Identity {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UserAssignedIdentitiesListResultIterator type.
+func NewUserAssignedIdentitiesListResultIterator(page UserAssignedIdentitiesListResultPage) UserAssignedIdentitiesListResultIterator {
+ return UserAssignedIdentitiesListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (uailr UserAssignedIdentitiesListResult) IsEmpty() bool {
return uailr.Value == nil || len(*uailr.Value) == 0
@@ -357,11 +428,11 @@ func (uailr UserAssignedIdentitiesListResult) IsEmpty() bool {
// userAssignedIdentitiesListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (uailr UserAssignedIdentitiesListResult) userAssignedIdentitiesListResultPreparer() (*http.Request, error) {
+func (uailr UserAssignedIdentitiesListResult) userAssignedIdentitiesListResultPreparer(ctx context.Context) (*http.Request, error) {
if uailr.NextLink == nil || len(to.String(uailr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(uailr.NextLink)))
@@ -369,14 +440,24 @@ func (uailr UserAssignedIdentitiesListResult) userAssignedIdentitiesListResultPr
// UserAssignedIdentitiesListResultPage contains a page of Identity values.
type UserAssignedIdentitiesListResultPage struct {
- fn func(UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error)
+ fn func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error)
uailr UserAssignedIdentitiesListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UserAssignedIdentitiesListResultPage) Next() error {
- next, err := page.fn(page.uailr)
+func (page *UserAssignedIdentitiesListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.uailr)
if err != nil {
return err
}
@@ -384,6 +465,13 @@ func (page *UserAssignedIdentitiesListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UserAssignedIdentitiesListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UserAssignedIdentitiesListResultPage) NotDone() bool {
return !page.uailr.IsEmpty()
@@ -401,3 +489,8 @@ func (page UserAssignedIdentitiesListResultPage) Values() []Identity {
}
return *page.uailr.Value
}
+
+// Creates a new instance of the UserAssignedIdentitiesListResultPage type.
+func NewUserAssignedIdentitiesListResultPage(getNextPage func(context.Context, UserAssignedIdentitiesListResult) (UserAssignedIdentitiesListResult, error)) UserAssignedIdentitiesListResultPage {
+ return UserAssignedIdentitiesListResultPage{fn: getNextPage}
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go
index aff009073620..6f8700def747 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists available operations for the Microsoft.ManagedIdentity provider
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "msi.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go
index 06c7a49452d2..0ac1afef6d8e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/msi/mgmt/2015-08-31-preview/msi/userassignedidentities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewUserAssignedIdentitiesClientWithBaseURI(baseURI string, subscriptionID s
// resourceName - the name of the identity resource.
// parameters - parameters to create or update the identity
func (client UserAssignedIdentitiesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters Identity) (result Identity, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -114,6 +125,16 @@ func (client UserAssignedIdentitiesClient) CreateOrUpdateResponder(resp *http.Re
// resourceGroupName - the name of the Resource Group to which the identity belongs.
// resourceName - the name of the identity resource.
func (client UserAssignedIdentitiesClient) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Delete", nil, "Failure preparing request")
@@ -180,6 +201,16 @@ func (client UserAssignedIdentitiesClient) DeleteResponder(resp *http.Response)
// resourceGroupName - the name of the Resource Group to which the identity belongs.
// resourceName - the name of the identity resource.
func (client UserAssignedIdentitiesClient) Get(ctx context.Context, resourceGroupName string, resourceName string) (result Identity, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Get", nil, "Failure preparing request")
@@ -246,6 +277,16 @@ func (client UserAssignedIdentitiesClient) GetResponder(resp *http.Response) (re
// Parameters:
// resourceGroupName - the name of the Resource Group to which the identity belongs.
func (client UserAssignedIdentitiesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result UserAssignedIdentitiesListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.uailr.Response.Response != nil {
+ sc = result.uailr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -309,8 +350,8 @@ func (client UserAssignedIdentitiesClient) ListByResourceGroupResponder(resp *ht
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client UserAssignedIdentitiesClient) listByResourceGroupNextResults(lastResults UserAssignedIdentitiesListResult) (result UserAssignedIdentitiesListResult, err error) {
- req, err := lastResults.userAssignedIdentitiesListResultPreparer()
+func (client UserAssignedIdentitiesClient) listByResourceGroupNextResults(ctx context.Context, lastResults UserAssignedIdentitiesListResult) (result UserAssignedIdentitiesListResult, err error) {
+ req, err := lastResults.userAssignedIdentitiesListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -331,12 +372,32 @@ func (client UserAssignedIdentitiesClient) listByResourceGroupNextResults(lastRe
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserAssignedIdentitiesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result UserAssignedIdentitiesListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListBySubscription lists all the userAssignedIdentities available under the specified subscription.
func (client UserAssignedIdentitiesClient) ListBySubscription(ctx context.Context) (result UserAssignedIdentitiesListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.uailr.Response.Response != nil {
+ sc = result.uailr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -399,8 +460,8 @@ func (client UserAssignedIdentitiesClient) ListBySubscriptionResponder(resp *htt
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client UserAssignedIdentitiesClient) listBySubscriptionNextResults(lastResults UserAssignedIdentitiesListResult) (result UserAssignedIdentitiesListResult, err error) {
- req, err := lastResults.userAssignedIdentitiesListResultPreparer()
+func (client UserAssignedIdentitiesClient) listBySubscriptionNextResults(ctx context.Context, lastResults UserAssignedIdentitiesListResult) (result UserAssignedIdentitiesListResult, err error) {
+ req, err := lastResults.userAssignedIdentitiesListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -421,6 +482,16 @@ func (client UserAssignedIdentitiesClient) listBySubscriptionNextResults(lastRes
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client UserAssignedIdentitiesClient) ListBySubscriptionComplete(ctx context.Context) (result UserAssignedIdentitiesListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -431,6 +502,16 @@ func (client UserAssignedIdentitiesClient) ListBySubscriptionComplete(ctx contex
// resourceName - the name of the identity resource.
// parameters - parameters to update the identity
func (client UserAssignedIdentitiesClient) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters Identity) (result Identity, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UserAssignedIdentitiesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "msi.UserAssignedIdentitiesClient", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go
index 346cc10d73a9..0458c5529bab 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/datasources.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewDataSourcesClientWithBaseURI(baseURI string, subscriptionID string) Data
// dataSourceName - the name of the datasource resource.
// parameters - the parameters required to create or update a datasource.
func (client DataSourcesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string, parameters DataSource) (result DataSource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourcesClient.CreateOrUpdate")
+ 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},
@@ -128,6 +139,16 @@ func (client DataSourcesClient) CreateOrUpdateResponder(resp *http.Response) (re
// workspaceName - name of the Log Analytics Workspace that contains the datasource.
// dataSourceName - name of the datasource.
func (client DataSourcesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourcesClient.Delete")
+ 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},
@@ -204,6 +225,16 @@ func (client DataSourcesClient) DeleteResponder(resp *http.Response) (result aut
// workspaceName - name of the Log Analytics Workspace that contains the datasource.
// dataSourceName - name of the datasource
func (client DataSourcesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, dataSourceName string) (result DataSource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourcesClient.Get")
+ 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},
@@ -282,6 +313,16 @@ func (client DataSourcesClient) GetResponder(resp *http.Response) (result DataSo
// filter - the filter to apply on the operation.
// skiptoken - starting point of the collection of data source instances.
func (client DataSourcesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string, filter string, skiptoken string) (result DataSourceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourcesClient.ListByWorkspace")
+ defer func() {
+ sc := -1
+ if result.dslr.Response.Response != nil {
+ sc = result.dslr.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},
@@ -358,8 +399,8 @@ func (client DataSourcesClient) ListByWorkspaceResponder(resp *http.Response) (r
}
// listByWorkspaceNextResults retrieves the next set of results, if any.
-func (client DataSourcesClient) listByWorkspaceNextResults(lastResults DataSourceListResult) (result DataSourceListResult, err error) {
- req, err := lastResults.dataSourceListResultPreparer()
+func (client DataSourcesClient) listByWorkspaceNextResults(ctx context.Context, lastResults DataSourceListResult) (result DataSourceListResult, err error) {
+ req, err := lastResults.dataSourceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "operationalinsights.DataSourcesClient", "listByWorkspaceNextResults", nil, "Failure preparing next results request")
}
@@ -380,6 +421,16 @@ func (client DataSourcesClient) listByWorkspaceNextResults(lastResults DataSourc
// ListByWorkspaceComplete enumerates all values, automatically crossing page boundaries as required.
func (client DataSourcesClient) ListByWorkspaceComplete(ctx context.Context, resourceGroupName string, workspaceName string, filter string, skiptoken string) (result DataSourceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourcesClient.ListByWorkspace")
+ 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.ListByWorkspace(ctx, resourceGroupName, workspaceName, filter, skiptoken)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go
index ea3417d519a8..62c1bd414a1e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/linkedservices.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewLinkedServicesClientWithBaseURI(baseURI string, subscriptionID string) L
// linkedServiceName - name of the linkedServices resource
// parameters - the parameters required to create or update a linked service.
func (client LinkedServicesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string, parameters LinkedService) (result LinkedService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LinkedServicesClient.CreateOrUpdate")
+ 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},
@@ -129,6 +140,16 @@ func (client LinkedServicesClient) CreateOrUpdateResponder(resp *http.Response)
// workspaceName - name of the Log Analytics Workspace that contains the linkedServices resource
// linkedServiceName - name of the linked service.
func (client LinkedServicesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LinkedServicesClient.Delete")
+ 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},
@@ -205,6 +226,16 @@ func (client LinkedServicesClient) DeleteResponder(resp *http.Response) (result
// workspaceName - name of the Log Analytics Workspace that contains the linkedServices resource
// linkedServiceName - name of the linked service.
func (client LinkedServicesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string, linkedServiceName string) (result LinkedService, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LinkedServicesClient.Get")
+ 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},
@@ -281,6 +312,16 @@ func (client LinkedServicesClient) GetResponder(resp *http.Response) (result Lin
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// workspaceName - name of the Log Analytics Workspace that contains the linked services.
func (client LinkedServicesClient) ListByWorkspace(ctx context.Context, resourceGroupName string, workspaceName string) (result LinkedServiceListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LinkedServicesClient.ListByWorkspace")
+ 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},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
index 6041417caef3..7f8524a5d2fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/models.go
@@ -18,14 +18,19 @@ package operationalinsights
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights"
+
// DataSourceKind enumerates the values for data source kind.
type DataSourceKind string
@@ -137,7 +142,9 @@ type DataSource struct {
// MarshalJSON is the custom marshaler for DataSource.
func (ds DataSource) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
- objectMap["properties"] = ds.Properties
+ if ds.Properties != nil {
+ objectMap["properties"] = ds.Properties
+ }
if ds.ETag != nil {
objectMap["eTag"] = ds.ETag
}
@@ -180,14 +187,24 @@ type DataSourceListResultIterator struct {
page DataSourceListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DataSourceListResultIterator) Next() error {
+func (iter *DataSourceListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourceListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -196,6 +213,13 @@ func (iter *DataSourceListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DataSourceListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DataSourceListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -215,6 +239,11 @@ func (iter DataSourceListResultIterator) Value() DataSource {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DataSourceListResultIterator type.
+func NewDataSourceListResultIterator(page DataSourceListResultPage) DataSourceListResultIterator {
+ return DataSourceListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dslr DataSourceListResult) IsEmpty() bool {
return dslr.Value == nil || len(*dslr.Value) == 0
@@ -222,11 +251,11 @@ func (dslr DataSourceListResult) IsEmpty() bool {
// dataSourceListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dslr DataSourceListResult) dataSourceListResultPreparer() (*http.Request, error) {
+func (dslr DataSourceListResult) dataSourceListResultPreparer(ctx context.Context) (*http.Request, error) {
if dslr.NextLink == nil || len(to.String(dslr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dslr.NextLink)))
@@ -234,14 +263,24 @@ func (dslr DataSourceListResult) dataSourceListResultPreparer() (*http.Request,
// DataSourceListResultPage contains a page of DataSource values.
type DataSourceListResultPage struct {
- fn func(DataSourceListResult) (DataSourceListResult, error)
+ fn func(context.Context, DataSourceListResult) (DataSourceListResult, error)
dslr DataSourceListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DataSourceListResultPage) Next() error {
- next, err := page.fn(page.dslr)
+func (page *DataSourceListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataSourceListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dslr)
if err != nil {
return err
}
@@ -249,6 +288,13 @@ func (page *DataSourceListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DataSourceListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DataSourceListResultPage) NotDone() bool {
return !page.dslr.IsEmpty()
@@ -267,6 +313,11 @@ func (page DataSourceListResultPage) Values() []DataSource {
return *page.dslr.Value
}
+// Creates a new instance of the DataSourceListResultPage type.
+func NewDataSourceListResultPage(getNextPage func(context.Context, DataSourceListResult) (DataSourceListResult, error)) DataSourceListResultPage {
+ return DataSourceListResultPage{fn: getNextPage}
+}
+
// IntelligencePack intelligence Pack containing a string name and boolean indicating if it's enabled.
type IntelligencePack struct {
// Name - The name of the intelligence pack.
@@ -492,14 +543,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -508,6 +569,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -527,6 +595,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -534,11 +607,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -546,14 +619,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -561,6 +644,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -579,6 +669,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// ProxyResource common properties of proxy resource.
type ProxyResource struct {
// ID - Resource ID.
@@ -799,7 +894,7 @@ func (w *Workspace) UnmarshalJSON(body []byte) error {
return nil
}
-// WorkspaceListManagementGroupsResult the list workspace managmement groups operation response.
+// WorkspaceListManagementGroupsResult the list workspace management groups operation response.
type WorkspaceListManagementGroupsResult struct {
autorest.Response `json:"-"`
// Value - Gets or sets a list of management groups attached to the workspace.
@@ -836,8 +931,8 @@ type WorkspaceProperties struct {
RetentionInDays *int32 `json:"retentionInDays,omitempty"`
}
-// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
-// operation.
+// WorkspacesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
+// long-running operation.
type WorkspacesCreateOrUpdateFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go
index 3df445e34f5f..ac5003c839f4 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available OperationalInsights Rest API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "operationalinsights.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
index 9883b790ed94..db3f3666ee29 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationalinsights/mgmt/2015-11-01-preview/operationalinsights/workspaces.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewWorkspacesClientWithBaseURI(baseURI string, subscriptionID string) Works
// workspaceName - the name of the workspace.
// parameters - the parameters required to create or update a workspace.
func (client WorkspacesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result WorkspacesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: workspaceName,
Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
@@ -108,10 +119,6 @@ func (client WorkspacesClient) CreateOrUpdateSender(req *http.Request) (future W
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -134,6 +141,16 @@ func (client WorkspacesClient) CreateOrUpdateResponder(resp *http.Response) (res
// resourceGroupName - the resource group name of the workspace.
// workspaceName - name of the Log Analytics Workspace.
func (client WorkspacesClient) Delete(ctx context.Context, resourceGroupName string, workspaceName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, workspaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "Delete", nil, "Failure preparing request")
@@ -201,6 +218,16 @@ func (client WorkspacesClient) DeleteResponder(resp *http.Response) (result auto
// workspaceName - name of the Log Analytics Workspace.
// intelligencePackName - the name of the intelligence pack to be disabled.
func (client WorkspacesClient) DisableIntelligencePack(ctx context.Context, resourceGroupName string, workspaceName string, intelligencePackName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.DisableIntelligencePack")
+ 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},
@@ -277,6 +304,16 @@ func (client WorkspacesClient) DisableIntelligencePackResponder(resp *http.Respo
// workspaceName - name of the Log Analytics Workspace.
// intelligencePackName - the name of the intelligence pack to be enabled.
func (client WorkspacesClient) EnableIntelligencePack(ctx context.Context, resourceGroupName string, workspaceName string, intelligencePackName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.EnableIntelligencePack")
+ 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},
@@ -352,6 +389,16 @@ func (client WorkspacesClient) EnableIntelligencePackResponder(resp *http.Respon
// resourceGroupName - the resource group name of the workspace.
// workspaceName - name of the Log Analytics Workspace.
func (client WorkspacesClient) Get(ctx context.Context, resourceGroupName string, workspaceName string) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, workspaceName)
if err != nil {
err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "Get", nil, "Failure preparing request")
@@ -419,6 +466,16 @@ func (client WorkspacesClient) GetResponder(resp *http.Response) (result Workspa
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// workspaceName - name of the Log Analytics Workspace.
func (client WorkspacesClient) GetSharedKeys(ctx context.Context, resourceGroupName string, workspaceName string) (result SharedKeys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.GetSharedKeys")
+ 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},
@@ -491,6 +548,16 @@ func (client WorkspacesClient) GetSharedKeysResponder(resp *http.Response) (resu
// List gets the workspaces in a subscription.
func (client WorkspacesClient) List(ctx context.Context) (result WorkspaceListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "operationalinsights.WorkspacesClient", "List", nil, "Failure preparing request")
@@ -555,6 +622,16 @@ func (client WorkspacesClient) ListResponder(resp *http.Response) (result Worksp
// Parameters:
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
func (client WorkspacesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result WorkspaceListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListByResourceGroup")
+ 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},
@@ -630,6 +707,16 @@ func (client WorkspacesClient) ListByResourceGroupResponder(resp *http.Response)
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// workspaceName - name of the Log Analytics Workspace.
func (client WorkspacesClient) ListIntelligencePacks(ctx context.Context, resourceGroupName string, workspaceName string) (result ListIntelligencePack, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListIntelligencePacks")
+ 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},
@@ -705,6 +792,16 @@ func (client WorkspacesClient) ListIntelligencePacksResponder(resp *http.Respons
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) ListManagementGroups(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceListManagementGroupsResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListManagementGroups")
+ 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},
@@ -780,6 +877,16 @@ func (client WorkspacesClient) ListManagementGroupsResponder(resp *http.Response
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// workspaceName - the name of the workspace.
func (client WorkspacesClient) ListUsages(ctx context.Context, resourceGroupName string, workspaceName string) (result WorkspaceListUsagesResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.ListUsages")
+ 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},
@@ -856,6 +963,16 @@ func (client WorkspacesClient) ListUsagesResponder(resp *http.Response) (result
// workspaceName - the name of the workspace.
// parameters - the parameters required to patch a workspace.
func (client WorkspacesClient) Update(ctx context.Context, resourceGroupName string, workspaceName string, parameters Workspace) (result Workspace, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspacesClient.Update")
+ 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: workspaceName,
Constraints: []validation.Constraint{{Target: "workspaceName", Name: validation.MaxLength, Rule: 63, Chain: nil},
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go
index 74c4f0a3b112..aacc1e928c95 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementassociations.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewManagementAssociationsClientWithBaseURI(baseURI string, subscriptionID s
// managementAssociationName - user ManagementAssociation Name.
// parameters - the parameters required to create ManagementAssociation extension.
func (client ManagementAssociationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managementAssociationName string, parameters ManagementAssociation) (result ManagementAssociation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementAssociationsClient.CreateOrUpdate")
+ 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},
@@ -129,6 +140,16 @@ func (client ManagementAssociationsClient) CreateOrUpdateResponder(resp *http.Re
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// managementAssociationName - user ManagementAssociation Name.
func (client ManagementAssociationsClient) Delete(ctx context.Context, resourceGroupName string, managementAssociationName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementAssociationsClient.Delete")
+ 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},
@@ -206,6 +227,16 @@ func (client ManagementAssociationsClient) DeleteResponder(resp *http.Response)
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// managementAssociationName - user ManagementAssociation Name.
func (client ManagementAssociationsClient) Get(ctx context.Context, resourceGroupName string, managementAssociationName string) (result ManagementAssociation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementAssociationsClient.Get")
+ 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},
@@ -279,8 +310,18 @@ func (client ManagementAssociationsClient) GetResponder(resp *http.Response) (re
return
}
-// ListBySubscription retrieves the ManagementAssociatons list.
+// ListBySubscription retrieves the ManagementAssociations list.
func (client ManagementAssociationsClient) ListBySubscription(ctx context.Context) (result ManagementAssociationPropertiesList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementAssociationsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "operationsmanagement.ManagementAssociationsClient", "ListBySubscription", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go
index e6f3d1edd137..009065e02488 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/managementconfigurations.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewManagementConfigurationsClientWithBaseURI(baseURI string, subscriptionID
// managementConfigurationName - user Management Configuration Name.
// parameters - the parameters required to create OMS Solution.
func (client ManagementConfigurationsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managementConfigurationName string, parameters ManagementConfiguration) (result ManagementConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementConfigurationsClient.CreateOrUpdate")
+ 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},
@@ -129,6 +140,16 @@ func (client ManagementConfigurationsClient) CreateOrUpdateResponder(resp *http.
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// managementConfigurationName - user Management Configuration Name.
func (client ManagementConfigurationsClient) Delete(ctx context.Context, resourceGroupName string, managementConfigurationName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementConfigurationsClient.Delete")
+ 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},
@@ -203,6 +224,16 @@ func (client ManagementConfigurationsClient) DeleteResponder(resp *http.Response
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// managementConfigurationName - user Management Configuration Name.
func (client ManagementConfigurationsClient) Get(ctx context.Context, resourceGroupName string, managementConfigurationName string) (result ManagementConfiguration, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementConfigurationsClient.Get")
+ 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},
@@ -275,6 +306,16 @@ func (client ManagementConfigurationsClient) GetResponder(resp *http.Response) (
// ListBySubscription retrieves the ManagementConfigurations list.
func (client ManagementConfigurationsClient) ListBySubscription(ctx context.Context) (result ManagementConfigurationPropertiesList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagementConfigurationsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "operationsmanagement.ManagementConfigurationsClient", "ListBySubscription", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go
index c97eaef96ab8..93ac58f37774 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/models.go
@@ -23,6 +23,9 @@ import (
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement"
+
// ArmTemplateParameter parameter to pass to ARM template
type ArmTemplateParameter struct {
// Name - name of the parameter.
@@ -60,8 +63,8 @@ type ManagementAssociation struct {
Properties *ManagementAssociationProperties `json:"properties,omitempty"`
}
-// ManagementAssociationProperties managementAssociation properties supported by the OperationsManagement resource
-// provider.
+// ManagementAssociationProperties managementAssociation properties supported by the OperationsManagement
+// resource provider.
type ManagementAssociationProperties struct {
// ApplicationID - The applicationId of the appliance for this association.
ApplicationID *string `json:"applicationId,omitempty"`
@@ -70,7 +73,7 @@ type ManagementAssociationProperties struct {
// ManagementAssociationPropertiesList the list of ManagementAssociation response
type ManagementAssociationPropertiesList struct {
autorest.Response `json:"-"`
- // Value - List of Management Association properites within the subscription.
+ // Value - List of Management Association properties within the subscription.
Value *[]ManagementAssociation `json:"value,omitempty"`
}
@@ -89,8 +92,8 @@ type ManagementConfiguration struct {
Properties *ManagementConfigurationProperties `json:"properties,omitempty"`
}
-// ManagementConfigurationProperties managementConfiguration properties supported by the OperationsManagement
-// resource provider.
+// ManagementConfigurationProperties managementConfiguration properties supported by the
+// OperationsManagement resource provider.
type ManagementConfigurationProperties struct {
// ApplicationID - The applicationId of the appliance for this Management.
ApplicationID *string `json:"applicationId,omitempty"`
@@ -107,7 +110,7 @@ type ManagementConfigurationProperties struct {
// ManagementConfigurationPropertiesList the list of ManagementConfiguration response
type ManagementConfigurationPropertiesList struct {
autorest.Response `json:"-"`
- // Value - List of Management Configuration properites within the subscription.
+ // Value - List of Management Configuration properties within the subscription.
Value *[]ManagementConfiguration `json:"value,omitempty"`
}
@@ -180,7 +183,7 @@ type SolutionProperties struct {
// SolutionPropertiesList the list of solution response
type SolutionPropertiesList struct {
autorest.Response `json:"-"`
- // Value - List of solution properites within the subscription.
+ // Value - List of solution properties within the subscription.
Value *[]Solution `json:"value,omitempty"`
}
@@ -213,7 +216,8 @@ func (future *SolutionsCreateOrUpdateFuture) Result(client SolutionsClient) (s S
return
}
-// SolutionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// SolutionsDeleteFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type SolutionsDeleteFuture struct {
azure.Future
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go
index f64d685b2d26..e63a88277ca0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, provi
// List lists all of the available OperationsManagement Rest API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "operationsmanagement.OperationsClient", "List", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go
index 5f62153c67f0..363c1f5dada2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/operationsmanagement/mgmt/2015-11-01-preview/operationsmanagement/solutions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewSolutionsClientWithBaseURI(baseURI string, subscriptionID string, provid
// solutionName - user Solution Name.
// parameters - the parameters required to create OMS Solution.
func (client SolutionsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, solutionName string, parameters Solution) (result SolutionsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SolutionsClient.CreateOrUpdate")
+ 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},
@@ -104,10 +115,6 @@ func (client SolutionsClient) CreateOrUpdateSender(req *http.Request) (future So
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -130,6 +137,16 @@ func (client SolutionsClient) CreateOrUpdateResponder(resp *http.Response) (resu
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// solutionName - user Solution Name.
func (client SolutionsClient) Delete(ctx context.Context, resourceGroupName string, solutionName string) (result SolutionsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SolutionsClient.Delete")
+ 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},
@@ -183,10 +200,6 @@ func (client SolutionsClient) DeleteSender(req *http.Request) (future SolutionsD
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -208,6 +221,16 @@ func (client SolutionsClient) DeleteResponder(resp *http.Response) (result autor
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
// solutionName - user Solution Name.
func (client SolutionsClient) Get(ctx context.Context, resourceGroupName string, solutionName string) (result Solution, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SolutionsClient.Get")
+ 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},
@@ -282,6 +305,16 @@ func (client SolutionsClient) GetResponder(resp *http.Response) (result Solution
// Parameters:
// resourceGroupName - the name of the resource group to get. The name is case insensitive.
func (client SolutionsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result SolutionPropertiesList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SolutionsClient.ListByResourceGroup")
+ 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},
@@ -353,6 +386,16 @@ func (client SolutionsClient) ListByResourceGroupResponder(resp *http.Response)
// ListBySubscription retrieves the solution list. It will retrieve both first party and third party solutions
func (client SolutionsClient) ListBySubscription(ctx context.Context) (result SolutionPropertiesList, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SolutionsClient.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "operationsmanagement.SolutionsClient", "ListBySubscription", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go
similarity index 91%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go
index 38085ea838dc..88fc535e7d5d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/client.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/client.go
@@ -25,6 +25,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -56,6 +57,16 @@ func NewWithBaseURI(baseURI string) BaseClient {
// Parameters:
// checkNameAvailabilityRequest - management group name availability check parameters.
func (client BaseClient) CheckNameAvailability(ctx context.Context, checkNameAvailabilityRequest CheckNameAvailabilityRequest) (result CheckNameAvailabilityResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.CheckNameAvailability")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CheckNameAvailabilityPreparer(ctx, checkNameAvailabilityRequest)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "CheckNameAvailability", nil, "Failure preparing request")
@@ -116,6 +127,16 @@ func (client BaseClient) CheckNameAvailabilityResponder(resp *http.Response) (re
// StartTenantBackfill starts backfilling subscriptions for the Tenant.
func (client BaseClient) StartTenantBackfill(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.StartTenantBackfill")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.StartTenantBackfillPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "StartTenantBackfill", nil, "Failure preparing request")
@@ -174,6 +195,16 @@ func (client BaseClient) StartTenantBackfillResponder(resp *http.Response) (resu
// TenantBackfillStatus gets tenant backfill status
func (client BaseClient) TenantBackfillStatus(ctx context.Context) (result TenantBackfillStatusResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BaseClient.TenantBackfillStatus")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.TenantBackfillStatusPreparer(ctx)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.BaseClient", "TenantBackfillStatus", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go
similarity index 90%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go
index b3b576119866..1d57821e7cf9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/entities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/entities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -59,7 +60,7 @@ func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient {
// added as children of the requested entity. With $search=ParentAndFirstLevelChildren the API will return the
// parent and first level of children that the user has either direct access to or indirect access via one of
// their descendants.
-// filter - the filter parameter allows you to filter on the the name or display name fields. You can check for
+// filter - the filter parameter allows you to filter on the name or display name fields. You can check for
// equality on the name field (e.g. name eq '{entityName}') and you can check for substrings on either the
// name or display name fields(e.g. contains(name, '{substringToSearch}'), contains(displayName,
// '{substringToSearch')). Note that the '{entityName}' and '{substringToSearch}' fields are checked case
@@ -70,6 +71,16 @@ func NewEntitiesClientWithBaseURI(baseURI string) EntitiesClient {
// eq 'groupName'")
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client EntitiesClient) List(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.List")
+ defer func() {
+ sc := -1
+ if result.elr.Response.Response != nil {
+ sc = result.elr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
if err != nil {
@@ -159,8 +170,8 @@ func (client EntitiesClient) ListResponder(resp *http.Response) (result EntityLi
}
// listNextResults retrieves the next set of results, if any.
-func (client EntitiesClient) listNextResults(lastResults EntityListResult) (result EntityListResult, err error) {
- req, err := lastResults.entityListResultPreparer()
+func (client EntitiesClient) listNextResults(ctx context.Context, lastResults EntityListResult) (result EntityListResult, err error) {
+ req, err := lastResults.entityListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "managementgroups.EntitiesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -181,6 +192,16 @@ func (client EntitiesClient) listNextResults(lastResults EntityListResult) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client EntitiesClient) ListComplete(ctx context.Context, skiptoken string, skip *int32, top *int32, selectParameter string, search string, filter string, view string, groupName string, cacheControl string) (result EntityListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntitiesClient.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, skiptoken, skip, top, selectParameter, search, filter, view, groupName, cacheControl)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go
similarity index 91%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go
index c5b8f0aab454..92701c7e88fa 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/managementgroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/managementgroups.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewClientWithBaseURI(baseURI string) Client {
// createManagementGroupRequest - management group creation parameters.
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client Client) CreateOrUpdate(ctx context.Context, groupID string, createManagementGroupRequest CreateManagementGroupRequest, cacheControl string) (result CreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, groupID, createManagementGroupRequest, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.Client", "CreateOrUpdate", nil, "Failure preparing request")
@@ -99,10 +110,6 @@ func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result SetObj
// groupID - management Group ID.
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client Client) Delete(ctx context.Context, groupID string, cacheControl string) (result DeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, groupID, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.Client", "Delete", nil, "Failure preparing request")
@@ -175,10 +192,6 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -207,6 +220,16 @@ func (client Client) DeleteResponder(resp *http.Response) (result OperationResul
// ne Subscription')
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client Client) Get(ctx context.Context, groupID string, expand string, recurse *bool, filter string, cacheControl string) (result ManagementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, groupID, expand, recurse, filter, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.Client", "Get", nil, "Failure preparing request")
@@ -290,6 +313,16 @@ func (client Client) GetResponder(resp *http.Response) (result ManagementGroup,
// previous response contains a nextLink element, the value of the nextLink element will include a token
// parameter that specifies a starting point to use for subsequent calls.
func (client Client) List(ctx context.Context, cacheControl string, skiptoken string) (result ListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.List")
+ defer func() {
+ sc := -1
+ if result.lr.Response.Response != nil {
+ sc = result.lr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, cacheControl, skiptoken)
if err != nil {
@@ -358,8 +391,8 @@ func (client Client) ListResponder(resp *http.Response) (result ListResult, err
}
// listNextResults retrieves the next set of results, if any.
-func (client Client) listNextResults(lastResults ListResult) (result ListResult, err error) {
- req, err := lastResults.listResultPreparer()
+func (client Client) listNextResults(ctx context.Context, lastResults ListResult) (result ListResult, err error) {
+ req, err := lastResults.listResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "managementgroups.Client", "listNextResults", nil, "Failure preparing next results request")
}
@@ -380,6 +413,16 @@ func (client Client) listNextResults(lastResults ListResult) (result ListResult,
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListComplete(ctx context.Context, cacheControl string, skiptoken string) (result ListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.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, cacheControl, skiptoken)
return
}
@@ -390,6 +433,16 @@ func (client Client) ListComplete(ctx context.Context, cacheControl string, skip
// patchGroupRequest - management group patch parameters.
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client Client) Update(ctx context.Context, groupID string, patchGroupRequest PatchManagementGroupRequest, cacheControl string) (result ManagementGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, groupID, patchGroupRequest, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.Client", "Update", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/models.go
similarity index 87%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/models.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/models.go
index 29e4166d6620..254b8122cff2 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/models.go
@@ -18,14 +18,19 @@ package managementgroups
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups"
+
// InheritedPermissions enumerates the values for inherited permissions.
type InheritedPermissions string
@@ -185,7 +190,8 @@ type CheckNameAvailabilityRequest struct {
Type Type `json:"type,omitempty"`
}
-// CheckNameAvailabilityResult describes the result of the request to check management group name availability.
+// CheckNameAvailabilityResult describes the result of the request to check management group name
+// availability.
type CheckNameAvailabilityResult struct {
autorest.Response `json:"-"`
// NameAvailable - Required. True indicates name is valid and available. False indicates the name is invalid, unavailable, or both.
@@ -332,7 +338,8 @@ func (cmgr *CreateManagementGroupRequest) UnmarshalJSON(body []byte) error {
return nil
}
-// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CreateOrUpdateFuture struct {
azure.Future
}
@@ -618,14 +625,24 @@ type EntityListResultIterator struct {
page EntityListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *EntityListResultIterator) Next() error {
+func (iter *EntityListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -634,6 +651,13 @@ func (iter *EntityListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *EntityListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter EntityListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -653,6 +677,11 @@ func (iter EntityListResultIterator) Value() EntityInfo {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the EntityListResultIterator type.
+func NewEntityListResultIterator(page EntityListResultPage) EntityListResultIterator {
+ return EntityListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (elr EntityListResult) IsEmpty() bool {
return elr.Value == nil || len(*elr.Value) == 0
@@ -660,11 +689,11 @@ func (elr EntityListResult) IsEmpty() bool {
// entityListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (elr EntityListResult) entityListResultPreparer() (*http.Request, error) {
+func (elr EntityListResult) entityListResultPreparer(ctx context.Context) (*http.Request, error) {
if elr.NextLink == nil || len(to.String(elr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(elr.NextLink)))
@@ -672,14 +701,24 @@ func (elr EntityListResult) entityListResultPreparer() (*http.Request, error) {
// EntityListResultPage contains a page of EntityInfo values.
type EntityListResultPage struct {
- fn func(EntityListResult) (EntityListResult, error)
+ fn func(context.Context, EntityListResult) (EntityListResult, error)
elr EntityListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *EntityListResultPage) Next() error {
- next, err := page.fn(page.elr)
+func (page *EntityListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EntityListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.elr)
if err != nil {
return err
}
@@ -687,6 +726,13 @@ func (page *EntityListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *EntityListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page EntityListResultPage) NotDone() bool {
return !page.elr.IsEmpty()
@@ -705,6 +751,11 @@ func (page EntityListResultPage) Values() []EntityInfo {
return *page.elr.Value
}
+// Creates a new instance of the EntityListResultPage type.
+func NewEntityListResultPage(getNextPage func(context.Context, EntityListResult) (EntityListResult, error)) EntityListResultPage {
+ return EntityListResultPage{fn: getNextPage}
+}
+
// EntityParentGroupInfo (Optional) The ID of the parent management group.
type EntityParentGroupInfo struct {
// ID - The fully qualified ID for the parent management group. For example, /providers/Microsoft.Management/managementGroups/0000000-0000-0000-0000-000000000000
@@ -829,14 +880,24 @@ type ListResultIterator struct {
page ListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ListResultIterator) Next() error {
+func (iter *ListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -845,6 +906,13 @@ func (iter *ListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -864,6 +932,11 @@ func (iter ListResultIterator) Value() Info {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ListResultIterator type.
+func NewListResultIterator(page ListResultPage) ListResultIterator {
+ return ListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (lr ListResult) IsEmpty() bool {
return lr.Value == nil || len(*lr.Value) == 0
@@ -871,11 +944,11 @@ func (lr ListResult) IsEmpty() bool {
// listResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (lr ListResult) listResultPreparer() (*http.Request, error) {
+func (lr ListResult) listResultPreparer(ctx context.Context) (*http.Request, error) {
if lr.NextLink == nil || len(to.String(lr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(lr.NextLink)))
@@ -883,14 +956,24 @@ func (lr ListResult) listResultPreparer() (*http.Request, error) {
// ListResultPage contains a page of Info values.
type ListResultPage struct {
- fn func(ListResult) (ListResult, error)
+ fn func(context.Context, ListResult) (ListResult, error)
lr ListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ListResultPage) Next() error {
- next, err := page.fn(page.lr)
+func (page *ListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.lr)
if err != nil {
return err
}
@@ -898,6 +981,13 @@ func (page *ListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ListResultPage) NotDone() bool {
return !page.lr.IsEmpty()
@@ -916,6 +1006,11 @@ func (page ListResultPage) Values() []Info {
return *page.lr.Value
}
+// Creates a new instance of the ListResultPage type.
+func NewListResultPage(getNextPage func(context.Context, ListResult) (ListResult, error)) ListResultPage {
+ return ListResultPage{fn: getNextPage}
+}
+
// ManagementGroup the management group details.
type ManagementGroup struct {
autorest.Response `json:"-"`
@@ -1031,14 +1126,24 @@ type OperationListResultIterator struct {
page OperationListResultPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListResultIterator) Next() error {
+func (iter *OperationListResultIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1047,6 +1152,13 @@ func (iter *OperationListResultIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListResultIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListResultIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1066,6 +1178,11 @@ func (iter OperationListResultIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListResultIterator type.
+func NewOperationListResultIterator(page OperationListResultPage) OperationListResultIterator {
+ return OperationListResultIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (olr OperationListResult) IsEmpty() bool {
return olr.Value == nil || len(*olr.Value) == 0
@@ -1073,11 +1190,11 @@ func (olr OperationListResult) IsEmpty() bool {
// operationListResultPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (olr OperationListResult) operationListResultPreparer() (*http.Request, error) {
+func (olr OperationListResult) operationListResultPreparer(ctx context.Context) (*http.Request, error) {
if olr.NextLink == nil || len(to.String(olr.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(olr.NextLink)))
@@ -1085,14 +1202,24 @@ func (olr OperationListResult) operationListResultPreparer() (*http.Request, err
// OperationListResultPage contains a page of Operation values.
type OperationListResultPage struct {
- fn func(OperationListResult) (OperationListResult, error)
+ fn func(context.Context, OperationListResult) (OperationListResult, error)
olr OperationListResult
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListResultPage) Next() error {
- next, err := page.fn(page.olr)
+func (page *OperationListResultPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListResultPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.olr)
if err != nil {
return err
}
@@ -1100,6 +1227,13 @@ func (page *OperationListResultPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListResultPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListResultPage) NotDone() bool {
return !page.olr.IsEmpty()
@@ -1118,6 +1252,11 @@ func (page OperationListResultPage) Values() []Operation {
return *page.olr.Value
}
+// Creates a new instance of the OperationListResultPage type.
+func NewOperationListResultPage(getNextPage func(context.Context, OperationListResult) (OperationListResult, error)) OperationListResultPage {
+ return OperationListResultPage{fn: getNextPage}
+}
+
// OperationResults the results of an asynchronous operation.
type OperationResults struct {
autorest.Response `json:"-"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go
similarity index 86%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go
index 26c8dd75895a..fce7931591a8 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewOperationsClientWithBaseURI(baseURI string) OperationsClient {
// List lists all of the available Management REST API operations.
func (client OperationsClient) List(ctx context.Context) (result OperationListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.olr.Response.Response != nil {
+ sc = result.olr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -101,8 +112,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationListResult) (result OperationListResult, err error) {
- req, err := lastResults.operationListResultPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationListResult) (result OperationListResult, err error) {
+ req, err := lastResults.operationListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "managementgroups.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -123,6 +134,16 @@ func (client OperationsClient) listNextResults(lastResults OperationListResult)
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go
similarity index 93%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go
index 50a883ff3d4c..b13454cbb50d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/subscriptions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/subscriptions.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewSubscriptionsClientWithBaseURI(baseURI string) SubscriptionsClient {
// subscriptionID - subscription ID.
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client SubscriptionsClient) Create(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, groupID, subscriptionID, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Create", nil, "Failure preparing request")
@@ -120,6 +131,16 @@ func (client SubscriptionsClient) CreateResponder(resp *http.Response) (result a
// subscriptionID - subscription ID.
// cacheControl - indicates that the request shouldn't utilize any caches.
func (client SubscriptionsClient) Delete(ctx context.Context, groupID string, subscriptionID string, cacheControl string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SubscriptionsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, groupID, subscriptionID, cacheControl)
if err != nil {
err = autorest.NewErrorWithError(err, "managementgroups.SubscriptionsClient", "Delete", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/version.go
similarity index 100%
rename from vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/management/version.go
rename to vendor/github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2018-03-01-preview/managementgroups/version.go
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/advancedthreatprotection.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/advancedthreatprotection.go
index 92aaddbf2f52..996094264e72 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/advancedthreatprotection.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/advancedthreatprotection.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewAdvancedThreatProtectionClientWithBaseURI(baseURI string, subscriptionID
// resourceID - the identifier of the resource.
// advancedThreatProtectionSetting - advanced Threat Protection Settings
func (client AdvancedThreatProtectionClient) Create(ctx context.Context, resourceID string, advancedThreatProtectionSetting AdvancedThreatProtectionSetting) (result AdvancedThreatProtectionSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AdvancedThreatProtectionClient.Create")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreatePreparer(ctx, resourceID, advancedThreatProtectionSetting)
if err != nil {
err = autorest.NewErrorWithError(err, "security.AdvancedThreatProtectionClient", "Create", nil, "Failure preparing request")
@@ -111,6 +122,16 @@ func (client AdvancedThreatProtectionClient) CreateResponder(resp *http.Response
// Parameters:
// resourceID - the identifier of the resource.
func (client AdvancedThreatProtectionClient) Get(ctx context.Context, resourceID string) (result AdvancedThreatProtectionSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AdvancedThreatProtectionClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceID)
if err != nil {
err = autorest.NewErrorWithError(err, "security.AdvancedThreatProtectionClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/alerts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/alerts.go
index 75b2552d9932..81dcc08f63a0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/alerts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/alerts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewAlertsClientWithBaseURI(baseURI string, subscriptionID string, ascLocati
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
func (client AlertsClient) GetResourceGroupLevelAlerts(ctx context.Context, alertName string, resourceGroupName string) (result Alert, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetResourceGroupLevelAlerts")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -123,6 +134,16 @@ func (client AlertsClient) GetResourceGroupLevelAlertsResponder(resp *http.Respo
// Parameters:
// alertName - name of the alert object
func (client AlertsClient) GetSubscriptionLevelAlert(ctx context.Context, alertName string) (result Alert, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.GetSubscriptionLevelAlert")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -197,6 +218,16 @@ func (client AlertsClient) GetSubscriptionLevelAlertResponder(resp *http.Respons
// selectParameter - oData select. Optional.
// expand - oData expand. Optional.
func (client AlertsClient) List(ctx context.Context, filter string, selectParameter string, expand string) (result AlertListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.List")
+ defer func() {
+ sc := -1
+ if result.al.Response.Response != nil {
+ sc = result.al.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -274,8 +305,8 @@ func (client AlertsClient) ListResponder(resp *http.Response) (result AlertList,
}
// listNextResults retrieves the next set of results, if any.
-func (client AlertsClient) listNextResults(lastResults AlertList) (result AlertList, err error) {
- req, err := lastResults.alertListPreparer()
+func (client AlertsClient) listNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) {
+ req, err := lastResults.alertListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -296,11 +327,21 @@ func (client AlertsClient) listNextResults(lastResults AlertList) (result AlertL
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListComplete(ctx context.Context, filter string, selectParameter string, expand string) (result AlertListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.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, filter, selectParameter, expand)
return
}
-// ListByResourceGroup list all the alerts alerts that are associated with the resource group
+// ListByResourceGroup list all the alerts that are associated with the resource group
// Parameters:
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
@@ -308,6 +349,16 @@ func (client AlertsClient) ListComplete(ctx context.Context, filter string, sele
// selectParameter - oData select. Optional.
// expand - oData expand. Optional.
func (client AlertsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result AlertListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.al.Response.Response != nil {
+ sc = result.al.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -390,8 +441,8 @@ func (client AlertsClient) ListByResourceGroupResponder(resp *http.Response) (re
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client AlertsClient) listByResourceGroupNextResults(lastResults AlertList) (result AlertList, err error) {
- req, err := lastResults.alertListPreparer()
+func (client AlertsClient) listByResourceGroupNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) {
+ req, err := lastResults.alertListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -412,6 +463,16 @@ func (client AlertsClient) listByResourceGroupNextResults(lastResults AlertList)
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result AlertListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, filter, selectParameter, expand)
return
}
@@ -425,6 +486,16 @@ func (client AlertsClient) ListByResourceGroupComplete(ctx context.Context, reso
// selectParameter - oData select. Optional.
// expand - oData expand. Optional.
func (client AlertsClient) ListResourceGroupLevelAlertsByRegion(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result AlertListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelAlertsByRegion")
+ defer func() {
+ sc := -1
+ if result.al.Response.Response != nil {
+ sc = result.al.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -508,8 +579,8 @@ func (client AlertsClient) ListResourceGroupLevelAlertsByRegionResponder(resp *h
}
// listResourceGroupLevelAlertsByRegionNextResults retrieves the next set of results, if any.
-func (client AlertsClient) listResourceGroupLevelAlertsByRegionNextResults(lastResults AlertList) (result AlertList, err error) {
- req, err := lastResults.alertListPreparer()
+func (client AlertsClient) listResourceGroupLevelAlertsByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) {
+ req, err := lastResults.alertListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listResourceGroupLevelAlertsByRegionNextResults", nil, "Failure preparing next results request")
}
@@ -530,6 +601,16 @@ func (client AlertsClient) listResourceGroupLevelAlertsByRegionNextResults(lastR
// ListResourceGroupLevelAlertsByRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListResourceGroupLevelAlertsByRegionComplete(ctx context.Context, resourceGroupName string, filter string, selectParameter string, expand string) (result AlertListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListResourceGroupLevelAlertsByRegion")
+ 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.ListResourceGroupLevelAlertsByRegion(ctx, resourceGroupName, filter, selectParameter, expand)
return
}
@@ -541,6 +622,16 @@ func (client AlertsClient) ListResourceGroupLevelAlertsByRegionComplete(ctx cont
// selectParameter - oData select. Optional.
// expand - oData expand. Optional.
func (client AlertsClient) ListSubscriptionLevelAlertsByRegion(ctx context.Context, filter string, selectParameter string, expand string) (result AlertListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelAlertsByRegion")
+ defer func() {
+ sc := -1
+ if result.al.Response.Response != nil {
+ sc = result.al.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -619,8 +710,8 @@ func (client AlertsClient) ListSubscriptionLevelAlertsByRegionResponder(resp *ht
}
// listSubscriptionLevelAlertsByRegionNextResults retrieves the next set of results, if any.
-func (client AlertsClient) listSubscriptionLevelAlertsByRegionNextResults(lastResults AlertList) (result AlertList, err error) {
- req, err := lastResults.alertListPreparer()
+func (client AlertsClient) listSubscriptionLevelAlertsByRegionNextResults(ctx context.Context, lastResults AlertList) (result AlertList, err error) {
+ req, err := lastResults.alertListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.AlertsClient", "listSubscriptionLevelAlertsByRegionNextResults", nil, "Failure preparing next results request")
}
@@ -641,6 +732,16 @@ func (client AlertsClient) listSubscriptionLevelAlertsByRegionNextResults(lastRe
// ListSubscriptionLevelAlertsByRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx context.Context, filter string, selectParameter string, expand string) (result AlertListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.ListSubscriptionLevelAlertsByRegion")
+ 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.ListSubscriptionLevelAlertsByRegion(ctx, filter, selectParameter, expand)
return
}
@@ -652,6 +753,16 @@ func (client AlertsClient) ListSubscriptionLevelAlertsByRegionComplete(ctx conte
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
func (client AlertsClient) UpdateResourceGroupLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string, resourceGroupName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateResourceGroupLevelAlertState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -730,6 +841,16 @@ func (client AlertsClient) UpdateResourceGroupLevelAlertStateResponder(resp *htt
// alertName - name of the alert object
// alertUpdateActionType - type of the action to do on the alert
func (client AlertsClient) UpdateSubscriptionLevelAlertState(ctx context.Context, alertName string, alertUpdateActionType string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertsClient.UpdateSubscriptionLevelAlertState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/allowedconnections.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/allowedconnections.go
new file mode 100644
index 000000000000..85f0a2e38e3f
--- /dev/null
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/allowedconnections.go
@@ -0,0 +1,365 @@
+package security
+
+// Copyright (c) Microsoft and contributors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+import (
+ "context"
+ "github.com/Azure/go-autorest/autorest"
+ "github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
+ "net/http"
+)
+
+// AllowedConnectionsClient is the API spec for Microsoft.Security (Azure Security Center) resource provider
+type AllowedConnectionsClient struct {
+ BaseClient
+}
+
+// NewAllowedConnectionsClient creates an instance of the AllowedConnectionsClient client.
+func NewAllowedConnectionsClient(subscriptionID string, ascLocation string) AllowedConnectionsClient {
+ return NewAllowedConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID, ascLocation)
+}
+
+// NewAllowedConnectionsClientWithBaseURI creates an instance of the AllowedConnectionsClient client.
+func NewAllowedConnectionsClientWithBaseURI(baseURI string, subscriptionID string, ascLocation string) AllowedConnectionsClient {
+ return AllowedConnectionsClient{NewWithBaseURI(baseURI, subscriptionID, ascLocation)}
+}
+
+// Get gets the list of all possible traffic between resources for the subscription and location, based on connection
+// type.
+// Parameters:
+// resourceGroupName - the name of the resource group within the user's subscription. The name is case
+// insensitive.
+// connectionType - the type of allowed connections (Internal, External)
+func (client AllowedConnectionsClient) Get(ctx context.Context, resourceGroupName string, connectionType ConnectionType) (result AllowedConnectionsResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsClient.Get")
+ 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: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
+ {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("security.AllowedConnectionsClient", "Get", err.Error())
+ }
+
+ req, err := client.GetPreparer(ctx, resourceGroupName, connectionType)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "Get", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.GetSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "Get", resp, "Failure sending request")
+ return
+ }
+
+ result, err = client.GetResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "Get", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// GetPreparer prepares the Get request.
+func (client AllowedConnectionsClient) GetPreparer(ctx context.Context, resourceGroupName string, connectionType ConnectionType) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "ascLocation": autorest.Encode("path", client.AscLocation),
+ "connectionType": autorest.Encode("path", connectionType),
+ "resourceGroupName": autorest.Encode("path", resourceGroupName),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2015-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections/{connectionType}", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// GetSender sends the Get request. The method will close the
+// http.Response Body if it receives an error.
+func (client AllowedConnectionsClient) GetSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// GetResponder handles the response to the Get request. The method always
+// closes the http.Response Body.
+func (client AllowedConnectionsClient) GetResponder(resp *http.Response) (result AllowedConnectionsResource, 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 gets the list of all possible traffic between resources for the subscription
+func (client AllowedConnectionsClient) List(ctx context.Context) (result AllowedConnectionsListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsClient.List")
+ defer func() {
+ sc := -1
+ if result.ACL.Response.Response != nil {
+ sc = result.ACL.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("security.AllowedConnectionsClient", "List", err.Error())
+ }
+
+ result.fn = client.listNextResults
+ req, err := client.ListPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "List", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListSender(req)
+ if err != nil {
+ result.ACL.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "List", resp, "Failure sending request")
+ return
+ }
+
+ result.ACL, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "List", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListPreparer prepares the List request.
+func (client AllowedConnectionsClient) ListPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2015-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/allowedConnections", 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 AllowedConnectionsClient) ListSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListResponder handles the response to the List request. The method always
+// closes the http.Response Body.
+func (client AllowedConnectionsClient) ListResponder(resp *http.Response) (result AllowedConnectionsList, 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 AllowedConnectionsClient) listNextResults(ctx context.Context, lastResults AllowedConnectionsList) (result AllowedConnectionsList, err error) {
+ req, err := lastResults.allowedConnectionsListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "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, "security.AllowedConnectionsClient", "listNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "listNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AllowedConnectionsClient) ListComplete(ctx context.Context) (result AllowedConnectionsListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsClient.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
+}
+
+// ListByHomeRegion gets the list of all possible traffic between resources for the subscription and location.
+func (client AllowedConnectionsClient) ListByHomeRegion(ctx context.Context) (result AllowedConnectionsListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsClient.ListByHomeRegion")
+ defer func() {
+ sc := -1
+ if result.ACL.Response.Response != nil {
+ sc = result.ACL.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ if err := validation.Validate([]validation.Validation{
+ {TargetValue: client.SubscriptionID,
+ Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
+ return result, validation.NewError("security.AllowedConnectionsClient", "ListByHomeRegion", err.Error())
+ }
+
+ result.fn = client.listByHomeRegionNextResults
+ req, err := client.ListByHomeRegionPreparer(ctx)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "ListByHomeRegion", nil, "Failure preparing request")
+ return
+ }
+
+ resp, err := client.ListByHomeRegionSender(req)
+ if err != nil {
+ result.ACL.Response = autorest.Response{Response: resp}
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "ListByHomeRegion", resp, "Failure sending request")
+ return
+ }
+
+ result.ACL, err = client.ListByHomeRegionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "ListByHomeRegion", resp, "Failure responding to request")
+ }
+
+ return
+}
+
+// ListByHomeRegionPreparer prepares the ListByHomeRegion request.
+func (client AllowedConnectionsClient) ListByHomeRegionPreparer(ctx context.Context) (*http.Request, error) {
+ pathParameters := map[string]interface{}{
+ "ascLocation": autorest.Encode("path", client.AscLocation),
+ "subscriptionId": autorest.Encode("path", client.SubscriptionID),
+ }
+
+ const APIVersion = "2015-06-01-preview"
+ queryParameters := map[string]interface{}{
+ "api-version": APIVersion,
+ }
+
+ preparer := autorest.CreatePreparer(
+ autorest.AsGet(),
+ autorest.WithBaseURL(client.BaseURI),
+ autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Security/locations/{ascLocation}/allowedConnections", pathParameters),
+ autorest.WithQueryParameters(queryParameters))
+ return preparer.Prepare((&http.Request{}).WithContext(ctx))
+}
+
+// ListByHomeRegionSender sends the ListByHomeRegion request. The method will close the
+// http.Response Body if it receives an error.
+func (client AllowedConnectionsClient) ListByHomeRegionSender(req *http.Request) (*http.Response, error) {
+ return autorest.SendWithSender(client, req,
+ azure.DoRetryWithRegistration(client.Client))
+}
+
+// ListByHomeRegionResponder handles the response to the ListByHomeRegion request. The method always
+// closes the http.Response Body.
+func (client AllowedConnectionsClient) ListByHomeRegionResponder(resp *http.Response) (result AllowedConnectionsList, err error) {
+ err = autorest.Respond(
+ resp,
+ client.ByInspecting(),
+ azure.WithErrorUnlessStatusCode(http.StatusOK),
+ autorest.ByUnmarshallingJSON(&result),
+ autorest.ByClosing())
+ result.Response = autorest.Response{Response: resp}
+ return
+}
+
+// listByHomeRegionNextResults retrieves the next set of results, if any.
+func (client AllowedConnectionsClient) listByHomeRegionNextResults(ctx context.Context, lastResults AllowedConnectionsList) (result AllowedConnectionsList, err error) {
+ req, err := lastResults.allowedConnectionsListPreparer(ctx)
+ if err != nil {
+ return result, autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "listByHomeRegionNextResults", nil, "Failure preparing next results request")
+ }
+ if req == nil {
+ return
+ }
+ resp, err := client.ListByHomeRegionSender(req)
+ if err != nil {
+ result.Response = autorest.Response{Response: resp}
+ return result, autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "listByHomeRegionNextResults", resp, "Failure sending next results request")
+ }
+ result, err = client.ListByHomeRegionResponder(resp)
+ if err != nil {
+ err = autorest.NewErrorWithError(err, "security.AllowedConnectionsClient", "listByHomeRegionNextResults", resp, "Failure responding to next results request")
+ }
+ return
+}
+
+// ListByHomeRegionComplete enumerates all values, automatically crossing page boundaries as required.
+func (client AllowedConnectionsClient) ListByHomeRegionComplete(ctx context.Context) (result AllowedConnectionsListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsClient.ListByHomeRegion")
+ 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.ListByHomeRegion(ctx)
+ return
+}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/autoprovisioningsettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/autoprovisioningsettings.go
index eaa03e36e5b8..58d4229f09d0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/autoprovisioningsettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/autoprovisioningsettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewAutoProvisioningSettingsClientWithBaseURI(baseURI string, subscriptionID
// settingName - auto provisioning setting key
// setting - auto provisioning setting key
func (client AutoProvisioningSettingsClient) Create(ctx context.Context, settingName string, setting AutoProvisioningSetting) (result AutoProvisioningSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingsClient.Create")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -118,6 +129,16 @@ func (client AutoProvisioningSettingsClient) CreateResponder(resp *http.Response
// Parameters:
// settingName - auto provisioning setting key
func (client AutoProvisioningSettingsClient) Get(ctx context.Context, settingName string) (result AutoProvisioningSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -187,6 +208,16 @@ func (client AutoProvisioningSettingsClient) GetResponder(resp *http.Response) (
// List exposes the auto provisioning settings of the subscriptions
func (client AutoProvisioningSettingsClient) List(ctx context.Context) (result AutoProvisioningSettingListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingsClient.List")
+ defer func() {
+ sc := -1
+ if result.apsl.Response.Response != nil {
+ sc = result.apsl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -255,8 +286,8 @@ func (client AutoProvisioningSettingsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client AutoProvisioningSettingsClient) listNextResults(lastResults AutoProvisioningSettingList) (result AutoProvisioningSettingList, err error) {
- req, err := lastResults.autoProvisioningSettingListPreparer()
+func (client AutoProvisioningSettingsClient) listNextResults(ctx context.Context, lastResults AutoProvisioningSettingList) (result AutoProvisioningSettingList, err error) {
+ req, err := lastResults.autoProvisioningSettingListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.AutoProvisioningSettingsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -277,6 +308,16 @@ func (client AutoProvisioningSettingsClient) listNextResults(lastResults AutoPro
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client AutoProvisioningSettingsClient) ListComplete(ctx context.Context) (result AutoProvisioningSettingListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/compliances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/compliances.go
index c8ebf1067465..80e836fda707 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/compliances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/compliances.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewCompliancesClientWithBaseURI(baseURI string, subscriptionID string, ascL
// management group (/providers/Microsoft.Management/managementGroups/mgName).
// complianceName - name of the Compliance
func (client CompliancesClient) Get(ctx context.Context, scope string, complianceName string) (result Compliance, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CompliancesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, scope, complianceName)
if err != nil {
err = autorest.NewErrorWithError(err, "security.CompliancesClient", "Get", nil, "Failure preparing request")
@@ -111,6 +122,16 @@ func (client CompliancesClient) GetResponder(resp *http.Response) (result Compli
// scope - scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or
// management group (/providers/Microsoft.Management/managementGroups/mgName).
func (client CompliancesClient) List(ctx context.Context, scope string) (result ComplianceListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CompliancesClient.List")
+ defer func() {
+ sc := -1
+ if result.cl.Response.Response != nil {
+ sc = result.cl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, scope)
if err != nil {
@@ -173,8 +194,8 @@ func (client CompliancesClient) ListResponder(resp *http.Response) (result Compl
}
// listNextResults retrieves the next set of results, if any.
-func (client CompliancesClient) listNextResults(lastResults ComplianceList) (result ComplianceList, err error) {
- req, err := lastResults.complianceListPreparer()
+func (client CompliancesClient) listNextResults(ctx context.Context, lastResults ComplianceList) (result ComplianceList, err error) {
+ req, err := lastResults.complianceListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.CompliancesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -195,6 +216,16 @@ func (client CompliancesClient) listNextResults(lastResults ComplianceList) (res
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client CompliancesClient) ListComplete(ctx context.Context, scope string) (result ComplianceListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CompliancesClient.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, scope)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/contacts.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/contacts.go
index 13eaffbee663..0edd662d33de 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/contacts.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/contacts.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,14 +46,22 @@ func NewContactsClientWithBaseURI(baseURI string, subscriptionID string, ascLoca
// securityContactName - name of the security contact object
// securityContact - security contact object
func (client ContactsClient) Create(ctx context.Context, securityContactName string, securityContact Contact) (result Contact, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.Create")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
{TargetValue: securityContact,
Constraints: []validation.Constraint{{Target: "securityContact.ContactProperties", Name: validation.Null, Rule: false,
- Chain: []validation.Constraint{{Target: "securityContact.ContactProperties.Email", Name: validation.Null, Rule: true, Chain: nil},
- {Target: "securityContact.ContactProperties.Phone", Name: validation.Null, Rule: true, Chain: nil},
- }}}}}); err != nil {
+ Chain: []validation.Constraint{{Target: "securityContact.ContactProperties.Email", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
return result, validation.NewError("security.ContactsClient", "Create", err.Error())
}
@@ -123,6 +132,16 @@ func (client ContactsClient) CreateResponder(resp *http.Response) (result Contac
// Parameters:
// securityContactName - name of the security contact object
func (client ContactsClient) Delete(ctx context.Context, securityContactName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -193,6 +212,16 @@ func (client ContactsClient) DeleteResponder(resp *http.Response) (result autore
// Parameters:
// securityContactName - name of the security contact object
func (client ContactsClient) Get(ctx context.Context, securityContactName string) (result Contact, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -262,6 +291,16 @@ func (client ContactsClient) GetResponder(resp *http.Response) (result Contact,
// List security contact configurations for the subscription
func (client ContactsClient) List(ctx context.Context) (result ContactListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.List")
+ defer func() {
+ sc := -1
+ if result.cl.Response.Response != nil {
+ sc = result.cl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -330,8 +369,8 @@ func (client ContactsClient) ListResponder(resp *http.Response) (result ContactL
}
// listNextResults retrieves the next set of results, if any.
-func (client ContactsClient) listNextResults(lastResults ContactList) (result ContactList, err error) {
- req, err := lastResults.contactListPreparer()
+func (client ContactsClient) listNextResults(ctx context.Context, lastResults ContactList) (result ContactList, err error) {
+ req, err := lastResults.contactListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.ContactsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -352,6 +391,16 @@ func (client ContactsClient) listNextResults(lastResults ContactList) (result Co
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ContactsClient) ListComplete(ctx context.Context) (result ContactListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.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
}
@@ -361,6 +410,16 @@ func (client ContactsClient) ListComplete(ctx context.Context) (result ContactLi
// securityContactName - name of the security contact object
// securityContact - security contact object
func (client ContactsClient) Update(ctx context.Context, securityContactName string, securityContact Contact) (result Contact, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactsClient.Update")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/discoveredsecuritysolutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/discoveredsecuritysolutions.go
index cdc013d710ba..ad4f2d3af5b1 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/discoveredsecuritysolutions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/discoveredsecuritysolutions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewDiscoveredSecuritySolutionsClientWithBaseURI(baseURI string, subscriptio
// insensitive.
// discoveredSecuritySolutionName - name of a discovered security solution.
func (client DiscoveredSecuritySolutionsClient) Get(ctx context.Context, resourceGroupName string, discoveredSecuritySolutionName string) (result DiscoveredSecuritySolution, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -121,6 +132,16 @@ func (client DiscoveredSecuritySolutionsClient) GetResponder(resp *http.Response
// List gets a list of discovered Security Solutions for the subscription.
func (client DiscoveredSecuritySolutionsClient) List(ctx context.Context) (result DiscoveredSecuritySolutionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionsClient.List")
+ defer func() {
+ sc := -1
+ if result.dssl.Response.Response != nil {
+ sc = result.dssl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -189,8 +210,8 @@ func (client DiscoveredSecuritySolutionsClient) ListResponder(resp *http.Respons
}
// listNextResults retrieves the next set of results, if any.
-func (client DiscoveredSecuritySolutionsClient) listNextResults(lastResults DiscoveredSecuritySolutionList) (result DiscoveredSecuritySolutionList, err error) {
- req, err := lastResults.discoveredSecuritySolutionListPreparer()
+func (client DiscoveredSecuritySolutionsClient) listNextResults(ctx context.Context, lastResults DiscoveredSecuritySolutionList) (result DiscoveredSecuritySolutionList, err error) {
+ req, err := lastResults.discoveredSecuritySolutionListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.DiscoveredSecuritySolutionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -211,12 +232,32 @@ func (client DiscoveredSecuritySolutionsClient) listNextResults(lastResults Disc
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client DiscoveredSecuritySolutionsClient) ListComplete(ctx context.Context) (result DiscoveredSecuritySolutionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionsClient.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
}
// ListByHomeRegion gets a list of discovered Security Solutions for the subscription and location.
func (client DiscoveredSecuritySolutionsClient) ListByHomeRegion(ctx context.Context) (result DiscoveredSecuritySolutionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionsClient.ListByHomeRegion")
+ defer func() {
+ sc := -1
+ if result.dssl.Response.Response != nil {
+ sc = result.dssl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -286,8 +327,8 @@ func (client DiscoveredSecuritySolutionsClient) ListByHomeRegionResponder(resp *
}
// listByHomeRegionNextResults retrieves the next set of results, if any.
-func (client DiscoveredSecuritySolutionsClient) listByHomeRegionNextResults(lastResults DiscoveredSecuritySolutionList) (result DiscoveredSecuritySolutionList, err error) {
- req, err := lastResults.discoveredSecuritySolutionListPreparer()
+func (client DiscoveredSecuritySolutionsClient) listByHomeRegionNextResults(ctx context.Context, lastResults DiscoveredSecuritySolutionList) (result DiscoveredSecuritySolutionList, err error) {
+ req, err := lastResults.discoveredSecuritySolutionListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.DiscoveredSecuritySolutionsClient", "listByHomeRegionNextResults", nil, "Failure preparing next results request")
}
@@ -308,6 +349,16 @@ func (client DiscoveredSecuritySolutionsClient) listByHomeRegionNextResults(last
// ListByHomeRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client DiscoveredSecuritySolutionsClient) ListByHomeRegionComplete(ctx context.Context) (result DiscoveredSecuritySolutionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionsClient.ListByHomeRegion")
+ 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.ListByHomeRegion(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/externalsecuritysolutions.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/externalsecuritysolutions.go
index 5f4247a52f1f..9fa25abf8aa0 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/externalsecuritysolutions.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/externalsecuritysolutions.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewExternalSecuritySolutionsClientWithBaseURI(baseURI string, subscriptionI
// insensitive.
// externalSecuritySolutionsName - name of an external security solution.
func (client ExternalSecuritySolutionsClient) Get(ctx context.Context, resourceGroupName string, externalSecuritySolutionsName string) (result ExternalSecuritySolutionModel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -121,6 +132,16 @@ func (client ExternalSecuritySolutionsClient) GetResponder(resp *http.Response)
// List gets a list of external security solutions for the subscription.
func (client ExternalSecuritySolutionsClient) List(ctx context.Context) (result ExternalSecuritySolutionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionsClient.List")
+ defer func() {
+ sc := -1
+ if result.essl.Response.Response != nil {
+ sc = result.essl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -189,8 +210,8 @@ func (client ExternalSecuritySolutionsClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client ExternalSecuritySolutionsClient) listNextResults(lastResults ExternalSecuritySolutionList) (result ExternalSecuritySolutionList, err error) {
- req, err := lastResults.externalSecuritySolutionListPreparer()
+func (client ExternalSecuritySolutionsClient) listNextResults(ctx context.Context, lastResults ExternalSecuritySolutionList) (result ExternalSecuritySolutionList, err error) {
+ req, err := lastResults.externalSecuritySolutionListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.ExternalSecuritySolutionsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -211,12 +232,32 @@ func (client ExternalSecuritySolutionsClient) listNextResults(lastResults Extern
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExternalSecuritySolutionsClient) ListComplete(ctx context.Context) (result ExternalSecuritySolutionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionsClient.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
}
// ListByHomeRegion gets a list of external Security Solutions for the subscription and location.
func (client ExternalSecuritySolutionsClient) ListByHomeRegion(ctx context.Context) (result ExternalSecuritySolutionListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionsClient.ListByHomeRegion")
+ defer func() {
+ sc := -1
+ if result.essl.Response.Response != nil {
+ sc = result.essl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -286,8 +327,8 @@ func (client ExternalSecuritySolutionsClient) ListByHomeRegionResponder(resp *ht
}
// listByHomeRegionNextResults retrieves the next set of results, if any.
-func (client ExternalSecuritySolutionsClient) listByHomeRegionNextResults(lastResults ExternalSecuritySolutionList) (result ExternalSecuritySolutionList, err error) {
- req, err := lastResults.externalSecuritySolutionListPreparer()
+func (client ExternalSecuritySolutionsClient) listByHomeRegionNextResults(ctx context.Context, lastResults ExternalSecuritySolutionList) (result ExternalSecuritySolutionList, err error) {
+ req, err := lastResults.externalSecuritySolutionListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.ExternalSecuritySolutionsClient", "listByHomeRegionNextResults", nil, "Failure preparing next results request")
}
@@ -308,6 +349,16 @@ func (client ExternalSecuritySolutionsClient) listByHomeRegionNextResults(lastRe
// ListByHomeRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client ExternalSecuritySolutionsClient) ListByHomeRegionComplete(ctx context.Context) (result ExternalSecuritySolutionListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionsClient.ListByHomeRegion")
+ 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.ListByHomeRegion(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/informationprotectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/informationprotectionpolicies.go
index 5d0e8558021d..97706b5260b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/informationprotectionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/informationprotectionpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewInformationProtectionPoliciesClientWithBaseURI(baseURI string, subscript
// management group (/providers/Microsoft.Management/managementGroups/mgName).
// informationProtectionPolicyName - name of the information protection policy.
func (client InformationProtectionPoliciesClient) CreateOrUpdate(ctx context.Context, scope string, informationProtectionPolicyName string) (result InformationProtectionPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, scope, informationProtectionPolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "security.InformationProtectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -113,6 +124,16 @@ func (client InformationProtectionPoliciesClient) CreateOrUpdateResponder(resp *
// management group (/providers/Microsoft.Management/managementGroups/mgName).
// informationProtectionPolicyName - name of the information protection policy.
func (client InformationProtectionPoliciesClient) Get(ctx context.Context, scope string, informationProtectionPolicyName string) (result InformationProtectionPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, scope, informationProtectionPolicyName)
if err != nil {
err = autorest.NewErrorWithError(err, "security.InformationProtectionPoliciesClient", "Get", nil, "Failure preparing request")
@@ -179,6 +200,16 @@ func (client InformationProtectionPoliciesClient) GetResponder(resp *http.Respon
// scope - scope of the query, can be subscription (/subscriptions/0b06d9ea-afe6-4779-bd59-30e5c2d9d13f) or
// management group (/providers/Microsoft.Management/managementGroups/mgName).
func (client InformationProtectionPoliciesClient) List(ctx context.Context, scope string) (result InformationProtectionPolicyListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPoliciesClient.List")
+ defer func() {
+ sc := -1
+ if result.ippl.Response.Response != nil {
+ sc = result.ippl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, scope)
if err != nil {
@@ -241,8 +272,8 @@ func (client InformationProtectionPoliciesClient) ListResponder(resp *http.Respo
}
// listNextResults retrieves the next set of results, if any.
-func (client InformationProtectionPoliciesClient) listNextResults(lastResults InformationProtectionPolicyList) (result InformationProtectionPolicyList, err error) {
- req, err := lastResults.informationProtectionPolicyListPreparer()
+func (client InformationProtectionPoliciesClient) listNextResults(ctx context.Context, lastResults InformationProtectionPolicyList) (result InformationProtectionPolicyList, err error) {
+ req, err := lastResults.informationProtectionPolicyListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.InformationProtectionPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -263,6 +294,16 @@ func (client InformationProtectionPoliciesClient) listNextResults(lastResults In
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client InformationProtectionPoliciesClient) ListComplete(ctx context.Context, scope string) (result InformationProtectionPolicyListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPoliciesClient.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, scope)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/jitnetworkaccesspolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/jitnetworkaccesspolicies.go
index 9377e0528767..40efd8479c66 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/jitnetworkaccesspolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/jitnetworkaccesspolicies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewJitNetworkAccessPoliciesClientWithBaseURI(baseURI string, subscriptionID
// insensitive.
// jitNetworkAccessPolicyName - name of a Just-in-Time access configuration policy.
func (client JitNetworkAccessPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string, body JitNetworkAccessPolicy) (result JitNetworkAccessPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.CreateOrUpdate")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -130,6 +141,16 @@ func (client JitNetworkAccessPoliciesClient) CreateOrUpdateResponder(resp *http.
// insensitive.
// jitNetworkAccessPolicyName - name of a Just-in-Time access configuration policy.
func (client JitNetworkAccessPoliciesClient) Delete(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -208,6 +229,16 @@ func (client JitNetworkAccessPoliciesClient) DeleteResponder(resp *http.Response
// insensitive.
// jitNetworkAccessPolicyName - name of a Just-in-Time access configuration policy.
func (client JitNetworkAccessPoliciesClient) Get(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string) (result JitNetworkAccessPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -287,6 +318,16 @@ func (client JitNetworkAccessPoliciesClient) GetResponder(resp *http.Response) (
// insensitive.
// jitNetworkAccessPolicyName - name of a Just-in-Time access configuration policy.
func (client JitNetworkAccessPoliciesClient) Initiate(ctx context.Context, resourceGroupName string, jitNetworkAccessPolicyName string, body JitNetworkAccessPolicyInitiateRequest) (result JitNetworkAccessRequest, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.Initiate")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -367,6 +408,16 @@ func (client JitNetworkAccessPoliciesClient) InitiateResponder(resp *http.Respon
// List policies for protecting resources using Just-in-Time access control.
func (client JitNetworkAccessPoliciesClient) List(ctx context.Context) (result JitNetworkAccessPoliciesListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.List")
+ defer func() {
+ sc := -1
+ if result.jnapl.Response.Response != nil {
+ sc = result.jnapl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -435,8 +486,8 @@ func (client JitNetworkAccessPoliciesClient) ListResponder(resp *http.Response)
}
// listNextResults retrieves the next set of results, if any.
-func (client JitNetworkAccessPoliciesClient) listNextResults(lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
- req, err := lastResults.jitNetworkAccessPoliciesListPreparer()
+func (client JitNetworkAccessPoliciesClient) listNextResults(ctx context.Context, lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
+ req, err := lastResults.jitNetworkAccessPoliciesListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.JitNetworkAccessPoliciesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -457,12 +508,32 @@ func (client JitNetworkAccessPoliciesClient) listNextResults(lastResults JitNetw
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client JitNetworkAccessPoliciesClient) ListComplete(ctx context.Context) (result JitNetworkAccessPoliciesListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.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
}
// ListByRegion policies for protecting resources using Just-in-Time access control for the subscription, location
func (client JitNetworkAccessPoliciesClient) ListByRegion(ctx context.Context) (result JitNetworkAccessPoliciesListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByRegion")
+ defer func() {
+ sc := -1
+ if result.jnapl.Response.Response != nil {
+ sc = result.jnapl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -532,8 +603,8 @@ func (client JitNetworkAccessPoliciesClient) ListByRegionResponder(resp *http.Re
}
// listByRegionNextResults retrieves the next set of results, if any.
-func (client JitNetworkAccessPoliciesClient) listByRegionNextResults(lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
- req, err := lastResults.jitNetworkAccessPoliciesListPreparer()
+func (client JitNetworkAccessPoliciesClient) listByRegionNextResults(ctx context.Context, lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
+ req, err := lastResults.jitNetworkAccessPoliciesListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.JitNetworkAccessPoliciesClient", "listByRegionNextResults", nil, "Failure preparing next results request")
}
@@ -554,6 +625,16 @@ func (client JitNetworkAccessPoliciesClient) listByRegionNextResults(lastResults
// ListByRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client JitNetworkAccessPoliciesClient) ListByRegionComplete(ctx context.Context) (result JitNetworkAccessPoliciesListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByRegion")
+ 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.ListByRegion(ctx)
return
}
@@ -564,6 +645,16 @@ func (client JitNetworkAccessPoliciesClient) ListByRegionComplete(ctx context.Co
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
func (client JitNetworkAccessPoliciesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result JitNetworkAccessPoliciesListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.jnapl.Response.Response != nil {
+ sc = result.jnapl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -637,8 +728,8 @@ func (client JitNetworkAccessPoliciesClient) ListByResourceGroupResponder(resp *
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client JitNetworkAccessPoliciesClient) listByResourceGroupNextResults(lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
- req, err := lastResults.jitNetworkAccessPoliciesListPreparer()
+func (client JitNetworkAccessPoliciesClient) listByResourceGroupNextResults(ctx context.Context, lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
+ req, err := lastResults.jitNetworkAccessPoliciesListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.JitNetworkAccessPoliciesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -659,6 +750,16 @@ func (client JitNetworkAccessPoliciesClient) listByResourceGroupNextResults(last
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client JitNetworkAccessPoliciesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result JitNetworkAccessPoliciesListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -669,6 +770,16 @@ func (client JitNetworkAccessPoliciesClient) ListByResourceGroupComplete(ctx con
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
func (client JitNetworkAccessPoliciesClient) ListByResourceGroupAndRegion(ctx context.Context, resourceGroupName string) (result JitNetworkAccessPoliciesListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByResourceGroupAndRegion")
+ defer func() {
+ sc := -1
+ if result.jnapl.Response.Response != nil {
+ sc = result.jnapl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -743,8 +854,8 @@ func (client JitNetworkAccessPoliciesClient) ListByResourceGroupAndRegionRespond
}
// listByResourceGroupAndRegionNextResults retrieves the next set of results, if any.
-func (client JitNetworkAccessPoliciesClient) listByResourceGroupAndRegionNextResults(lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
- req, err := lastResults.jitNetworkAccessPoliciesListPreparer()
+func (client JitNetworkAccessPoliciesClient) listByResourceGroupAndRegionNextResults(ctx context.Context, lastResults JitNetworkAccessPoliciesList) (result JitNetworkAccessPoliciesList, err error) {
+ req, err := lastResults.jitNetworkAccessPoliciesListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.JitNetworkAccessPoliciesClient", "listByResourceGroupAndRegionNextResults", nil, "Failure preparing next results request")
}
@@ -765,6 +876,16 @@ func (client JitNetworkAccessPoliciesClient) listByResourceGroupAndRegionNextRes
// ListByResourceGroupAndRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client JitNetworkAccessPoliciesClient) ListByResourceGroupAndRegionComplete(ctx context.Context, resourceGroupName string) (result JitNetworkAccessPoliciesListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesClient.ListByResourceGroupAndRegion")
+ 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.ListByResourceGroupAndRegion(ctx, resourceGroupName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/locations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/locations.go
index dcf9fe70c3df..fb4f84a4908e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/locations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/locations.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -42,6 +43,16 @@ func NewLocationsClientWithBaseURI(baseURI string, subscriptionID string, ascLoc
// Get details of a specific location
func (client LocationsClient) Get(ctx context.Context) (result AscLocation, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -113,6 +124,16 @@ func (client LocationsClient) GetResponder(resp *http.Response) (result AscLocat
// only one responsible location. The location in the response should be used to read or write other resources in ASC
// according to their ID.
func (client LocationsClient) List(ctx context.Context) (result AscLocationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.List")
+ defer func() {
+ sc := -1
+ if result.all.Response.Response != nil {
+ sc = result.all.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -181,8 +202,8 @@ func (client LocationsClient) ListResponder(resp *http.Response) (result AscLoca
}
// listNextResults retrieves the next set of results, if any.
-func (client LocationsClient) listNextResults(lastResults AscLocationList) (result AscLocationList, err error) {
- req, err := lastResults.ascLocationListPreparer()
+func (client LocationsClient) listNextResults(ctx context.Context, lastResults AscLocationList) (result AscLocationList, err error) {
+ req, err := lastResults.ascLocationListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.LocationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -203,6 +224,16 @@ func (client LocationsClient) listNextResults(lastResults AscLocationList) (resu
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client LocationsClient) ListComplete(ctx context.Context) (result AscLocationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/LocationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/models.go
index e8a69db480c3..f9d944e2d421 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/models.go
@@ -18,14 +18,19 @@ package security
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security"
+
// AadConnectivityState enumerates the values for aad connectivity state.
type AadConnectivityState string
@@ -88,6 +93,21 @@ func PossibleAutoProvisionValues() []AutoProvision {
return []AutoProvision{AutoProvisionOff, AutoProvisionOn}
}
+// ConnectionType enumerates the values for connection type.
+type ConnectionType string
+
+const (
+ // External ...
+ External ConnectionType = "External"
+ // Internal ...
+ Internal ConnectionType = "Internal"
+)
+
+// PossibleConnectionTypeValues returns an array of possible values for the ConnectionType const type.
+func PossibleConnectionTypeValues() []ConnectionType {
+ return []ConnectionType{External, Internal}
+}
+
// ExternalSecuritySolutionKind enumerates the values for external security solution kind.
type ExternalSecuritySolutionKind string
@@ -241,7 +261,8 @@ type AadConnectivityState1 struct {
ConnectivityState AadConnectivityState `json:"connectivityState,omitempty"`
}
-// AadExternalSecuritySolution represents an AAD identity protection solution which sends logs to an OMS workspace.
+// AadExternalSecuritySolution represents an AAD identity protection solution which sends logs to an OMS
+// workspace.
type AadExternalSecuritySolution struct {
Properties *AadSolutionProperties `json:"properties,omitempty"`
// ID - Resource Id
@@ -561,14 +582,24 @@ type AlertListIterator struct {
page AlertListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AlertListIterator) Next() error {
+func (iter *AlertListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -577,6 +608,13 @@ func (iter *AlertListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AlertListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AlertListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -596,6 +634,11 @@ func (iter AlertListIterator) Value() Alert {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AlertListIterator type.
+func NewAlertListIterator(page AlertListPage) AlertListIterator {
+ return AlertListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (al AlertList) IsEmpty() bool {
return al.Value == nil || len(*al.Value) == 0
@@ -603,11 +646,11 @@ func (al AlertList) IsEmpty() bool {
// alertListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (al AlertList) alertListPreparer() (*http.Request, error) {
+func (al AlertList) alertListPreparer(ctx context.Context) (*http.Request, error) {
if al.NextLink == nil || len(to.String(al.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(al.NextLink)))
@@ -615,14 +658,24 @@ func (al AlertList) alertListPreparer() (*http.Request, error) {
// AlertListPage contains a page of Alert values.
type AlertListPage struct {
- fn func(AlertList) (AlertList, error)
+ fn func(context.Context, AlertList) (AlertList, error)
al AlertList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AlertListPage) Next() error {
- next, err := page.fn(page.al)
+func (page *AlertListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AlertListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.al)
if err != nil {
return err
}
@@ -630,6 +683,13 @@ func (page *AlertListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AlertListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AlertListPage) NotDone() bool {
return !page.al.IsEmpty()
@@ -648,6 +708,11 @@ func (page AlertListPage) Values() []Alert {
return *page.al.Value
}
+// Creates a new instance of the AlertListPage type.
+func NewAlertListPage(getNextPage func(context.Context, AlertList) (AlertList, error)) AlertListPage {
+ return AlertListPage{fn: getNextPage}
+}
+
// AlertProperties describes security alert properties.
type AlertProperties struct {
// State - State of the alert (Active, Dismissed etc.)
@@ -762,6 +827,256 @@ func (ap AlertProperties) MarshalJSON() ([]byte, error) {
return json.Marshal(objectMap)
}
+// AllowedConnectionsList list of all possible traffic between Azure resources
+type AllowedConnectionsList struct {
+ autorest.Response `json:"-"`
+ Value *[]AllowedConnectionsResource `json:"value,omitempty"`
+ // NextLink - The URI to fetch the next page.
+ NextLink *string `json:"nextLink,omitempty"`
+}
+
+// AllowedConnectionsListIterator provides access to a complete listing of AllowedConnectionsResource
+// values.
+type AllowedConnectionsListIterator struct {
+ i int
+ page AllowedConnectionsListPage
+}
+
+// NextWithContext advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+func (iter *AllowedConnectionsListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ iter.i++
+ if iter.i < len(iter.page.Values()) {
+ return nil
+ }
+ err = iter.page.NextWithContext(ctx)
+ if err != nil {
+ iter.i--
+ return err
+ }
+ iter.i = 0
+ return nil
+}
+
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AllowedConnectionsListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the enumeration should be started or is not yet complete.
+func (iter AllowedConnectionsListIterator) NotDone() bool {
+ return iter.page.NotDone() && iter.i < len(iter.page.Values())
+}
+
+// Response returns the raw server response from the last page request.
+func (iter AllowedConnectionsListIterator) Response() AllowedConnectionsList {
+ return iter.page.Response()
+}
+
+// Value returns the current value or a zero-initialized value if the
+// iterator has advanced beyond the end of the collection.
+func (iter AllowedConnectionsListIterator) Value() AllowedConnectionsResource {
+ if !iter.page.NotDone() {
+ return AllowedConnectionsResource{}
+ }
+ return iter.page.Values()[iter.i]
+}
+
+// Creates a new instance of the AllowedConnectionsListIterator type.
+func NewAllowedConnectionsListIterator(page AllowedConnectionsListPage) AllowedConnectionsListIterator {
+ return AllowedConnectionsListIterator{page: page}
+}
+
+// IsEmpty returns true if the ListResult contains no values.
+func (ACL AllowedConnectionsList) IsEmpty() bool {
+ return ACL.Value == nil || len(*ACL.Value) == 0
+}
+
+// allowedConnectionsListPreparer prepares a request to retrieve the next set of results.
+// It returns nil if no more results exist.
+func (ACL AllowedConnectionsList) allowedConnectionsListPreparer(ctx context.Context) (*http.Request, error) {
+ if ACL.NextLink == nil || len(to.String(ACL.NextLink)) < 1 {
+ return nil, nil
+ }
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
+ autorest.AsJSON(),
+ autorest.AsGet(),
+ autorest.WithBaseURL(to.String(ACL.NextLink)))
+}
+
+// AllowedConnectionsListPage contains a page of AllowedConnectionsResource values.
+type AllowedConnectionsListPage struct {
+ fn func(context.Context, AllowedConnectionsList) (AllowedConnectionsList, error)
+ ACL AllowedConnectionsList
+}
+
+// NextWithContext advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+func (page *AllowedConnectionsListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AllowedConnectionsListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ACL)
+ if err != nil {
+ return err
+ }
+ page.ACL = next
+ return nil
+}
+
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AllowedConnectionsListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
+// NotDone returns true if the page enumeration should be started or is not yet complete.
+func (page AllowedConnectionsListPage) NotDone() bool {
+ return !page.ACL.IsEmpty()
+}
+
+// Response returns the raw server response from the last page request.
+func (page AllowedConnectionsListPage) Response() AllowedConnectionsList {
+ return page.ACL
+}
+
+// Values returns the slice of values for the current page or nil if there are no values.
+func (page AllowedConnectionsListPage) Values() []AllowedConnectionsResource {
+ if page.ACL.IsEmpty() {
+ return nil
+ }
+ return *page.ACL.Value
+}
+
+// Creates a new instance of the AllowedConnectionsListPage type.
+func NewAllowedConnectionsListPage(getNextPage func(context.Context, AllowedConnectionsList) (AllowedConnectionsList, error)) AllowedConnectionsListPage {
+ return AllowedConnectionsListPage{fn: getNextPage}
+}
+
+// AllowedConnectionsResource the resource whose properties describes the allowed traffic between Azure
+// resources
+type AllowedConnectionsResource struct {
+ autorest.Response `json:"-"`
+ // ID - Resource Id
+ ID *string `json:"id,omitempty"`
+ // Name - Resource name
+ Name *string `json:"name,omitempty"`
+ // Type - Resource type
+ Type *string `json:"type,omitempty"`
+ // Location - Location where the resource is stored
+ Location *string `json:"location,omitempty"`
+ *AllowedConnectionsResourceProperties `json:"properties,omitempty"`
+}
+
+// MarshalJSON is the custom marshaler for AllowedConnectionsResource.
+func (acr AllowedConnectionsResource) MarshalJSON() ([]byte, error) {
+ objectMap := make(map[string]interface{})
+ if acr.ID != nil {
+ objectMap["id"] = acr.ID
+ }
+ if acr.Name != nil {
+ objectMap["name"] = acr.Name
+ }
+ if acr.Type != nil {
+ objectMap["type"] = acr.Type
+ }
+ if acr.Location != nil {
+ objectMap["location"] = acr.Location
+ }
+ if acr.AllowedConnectionsResourceProperties != nil {
+ objectMap["properties"] = acr.AllowedConnectionsResourceProperties
+ }
+ return json.Marshal(objectMap)
+}
+
+// UnmarshalJSON is the custom unmarshaler for AllowedConnectionsResource struct.
+func (acr *AllowedConnectionsResource) UnmarshalJSON(body []byte) error {
+ var m map[string]*json.RawMessage
+ err := json.Unmarshal(body, &m)
+ if err != nil {
+ return err
+ }
+ for k, v := range m {
+ switch k {
+ case "id":
+ if v != nil {
+ var ID string
+ err = json.Unmarshal(*v, &ID)
+ if err != nil {
+ return err
+ }
+ acr.ID = &ID
+ }
+ case "name":
+ if v != nil {
+ var name string
+ err = json.Unmarshal(*v, &name)
+ if err != nil {
+ return err
+ }
+ acr.Name = &name
+ }
+ case "type":
+ if v != nil {
+ var typeVar string
+ err = json.Unmarshal(*v, &typeVar)
+ if err != nil {
+ return err
+ }
+ acr.Type = &typeVar
+ }
+ case "location":
+ if v != nil {
+ var location string
+ err = json.Unmarshal(*v, &location)
+ if err != nil {
+ return err
+ }
+ acr.Location = &location
+ }
+ case "properties":
+ if v != nil {
+ var allowedConnectionsResourceProperties AllowedConnectionsResourceProperties
+ err = json.Unmarshal(*v, &allowedConnectionsResourceProperties)
+ if err != nil {
+ return err
+ }
+ acr.AllowedConnectionsResourceProperties = &allowedConnectionsResourceProperties
+ }
+ }
+ }
+
+ return nil
+}
+
+// AllowedConnectionsResourceProperties describes the allowed traffic between Azure resources
+type AllowedConnectionsResourceProperties struct {
+ // CalculatedDateTime - The UTC time on which the allowed connections resource was calculated
+ CalculatedDateTime *date.Time `json:"calculatedDateTime,omitempty"`
+ // ConnectableResources - List of connectable resources
+ ConnectableResources *[]ConnectableResource `json:"connectableResources,omitempty"`
+}
+
// AscLocation the ASC location of the subscription is in the "name" field
type AscLocation struct {
autorest.Response `json:"-"`
@@ -788,14 +1103,24 @@ type AscLocationListIterator struct {
page AscLocationListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AscLocationListIterator) Next() error {
+func (iter *AscLocationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AscLocationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -804,6 +1129,13 @@ func (iter *AscLocationListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AscLocationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AscLocationListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -823,6 +1155,11 @@ func (iter AscLocationListIterator) Value() AscLocation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AscLocationListIterator type.
+func NewAscLocationListIterator(page AscLocationListPage) AscLocationListIterator {
+ return AscLocationListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (all AscLocationList) IsEmpty() bool {
return all.Value == nil || len(*all.Value) == 0
@@ -830,11 +1167,11 @@ func (all AscLocationList) IsEmpty() bool {
// ascLocationListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (all AscLocationList) ascLocationListPreparer() (*http.Request, error) {
+func (all AscLocationList) ascLocationListPreparer(ctx context.Context) (*http.Request, error) {
if all.NextLink == nil || len(to.String(all.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(all.NextLink)))
@@ -842,14 +1179,24 @@ func (all AscLocationList) ascLocationListPreparer() (*http.Request, error) {
// AscLocationListPage contains a page of AscLocation values.
type AscLocationListPage struct {
- fn func(AscLocationList) (AscLocationList, error)
+ fn func(context.Context, AscLocationList) (AscLocationList, error)
all AscLocationList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AscLocationListPage) Next() error {
- next, err := page.fn(page.all)
+func (page *AscLocationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AscLocationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.all)
if err != nil {
return err
}
@@ -857,6 +1204,13 @@ func (page *AscLocationListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AscLocationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AscLocationListPage) NotDone() bool {
return !page.all.IsEmpty()
@@ -875,6 +1229,11 @@ func (page AscLocationListPage) Values() []AscLocation {
return *page.all.Value
}
+// Creates a new instance of the AscLocationListPage type.
+func NewAscLocationListPage(getNextPage func(context.Context, AscLocationList) (AscLocationList, error)) AscLocationListPage {
+ return AscLocationListPage{fn: getNextPage}
+}
+
// AtaExternalSecuritySolution represents an ATA security solution which sends logs to an OMS workspace
type AtaExternalSecuritySolution struct {
Properties *AtaSolutionProperties `json:"properties,omitempty"`
@@ -1125,20 +1484,31 @@ type AutoProvisioningSettingList struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// AutoProvisioningSettingListIterator provides access to a complete listing of AutoProvisioningSetting values.
+// AutoProvisioningSettingListIterator provides access to a complete listing of AutoProvisioningSetting
+// values.
type AutoProvisioningSettingListIterator struct {
i int
page AutoProvisioningSettingListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *AutoProvisioningSettingListIterator) Next() error {
+func (iter *AutoProvisioningSettingListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1147,6 +1517,13 @@ func (iter *AutoProvisioningSettingListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *AutoProvisioningSettingListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter AutoProvisioningSettingListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1166,6 +1543,11 @@ func (iter AutoProvisioningSettingListIterator) Value() AutoProvisioningSetting
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the AutoProvisioningSettingListIterator type.
+func NewAutoProvisioningSettingListIterator(page AutoProvisioningSettingListPage) AutoProvisioningSettingListIterator {
+ return AutoProvisioningSettingListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (apsl AutoProvisioningSettingList) IsEmpty() bool {
return apsl.Value == nil || len(*apsl.Value) == 0
@@ -1173,11 +1555,11 @@ func (apsl AutoProvisioningSettingList) IsEmpty() bool {
// autoProvisioningSettingListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (apsl AutoProvisioningSettingList) autoProvisioningSettingListPreparer() (*http.Request, error) {
+func (apsl AutoProvisioningSettingList) autoProvisioningSettingListPreparer(ctx context.Context) (*http.Request, error) {
if apsl.NextLink == nil || len(to.String(apsl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(apsl.NextLink)))
@@ -1185,14 +1567,24 @@ func (apsl AutoProvisioningSettingList) autoProvisioningSettingListPreparer() (*
// AutoProvisioningSettingListPage contains a page of AutoProvisioningSetting values.
type AutoProvisioningSettingListPage struct {
- fn func(AutoProvisioningSettingList) (AutoProvisioningSettingList, error)
+ fn func(context.Context, AutoProvisioningSettingList) (AutoProvisioningSettingList, error)
apsl AutoProvisioningSettingList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *AutoProvisioningSettingListPage) Next() error {
- next, err := page.fn(page.apsl)
+func (page *AutoProvisioningSettingListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/AutoProvisioningSettingListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.apsl)
if err != nil {
return err
}
@@ -1200,6 +1592,13 @@ func (page *AutoProvisioningSettingListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *AutoProvisioningSettingListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page AutoProvisioningSettingListPage) NotDone() bool {
return !page.apsl.IsEmpty()
@@ -1218,6 +1617,11 @@ func (page AutoProvisioningSettingListPage) Values() []AutoProvisioningSetting {
return *page.apsl.Value
}
+// Creates a new instance of the AutoProvisioningSettingListPage type.
+func NewAutoProvisioningSettingListPage(getNextPage func(context.Context, AutoProvisioningSettingList) (AutoProvisioningSettingList, error)) AutoProvisioningSettingListPage {
+ return AutoProvisioningSettingListPage{fn: getNextPage}
+}
+
// AutoProvisioningSettingProperties describes properties of an auto provisioning setting
type AutoProvisioningSettingProperties struct {
// AutoProvision - Describes what kind of security agent provisioning action to take. Possible values include: 'AutoProvisionOn', 'AutoProvisionOff'
@@ -1553,14 +1957,24 @@ type ComplianceListIterator struct {
page ComplianceListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ComplianceListIterator) Next() error {
+func (iter *ComplianceListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComplianceListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1569,6 +1983,13 @@ func (iter *ComplianceListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ComplianceListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ComplianceListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1588,6 +2009,11 @@ func (iter ComplianceListIterator) Value() Compliance {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ComplianceListIterator type.
+func NewComplianceListIterator(page ComplianceListPage) ComplianceListIterator {
+ return ComplianceListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cl ComplianceList) IsEmpty() bool {
return cl.Value == nil || len(*cl.Value) == 0
@@ -1595,11 +2021,11 @@ func (cl ComplianceList) IsEmpty() bool {
// complianceListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cl ComplianceList) complianceListPreparer() (*http.Request, error) {
+func (cl ComplianceList) complianceListPreparer(ctx context.Context) (*http.Request, error) {
if cl.NextLink == nil || len(to.String(cl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cl.NextLink)))
@@ -1607,14 +2033,24 @@ func (cl ComplianceList) complianceListPreparer() (*http.Request, error) {
// ComplianceListPage contains a page of Compliance values.
type ComplianceListPage struct {
- fn func(ComplianceList) (ComplianceList, error)
+ fn func(context.Context, ComplianceList) (ComplianceList, error)
cl ComplianceList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ComplianceListPage) Next() error {
- next, err := page.fn(page.cl)
+func (page *ComplianceListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ComplianceListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cl)
if err != nil {
return err
}
@@ -1622,6 +2058,13 @@ func (page *ComplianceListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ComplianceListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ComplianceListPage) NotDone() bool {
return !page.cl.IsEmpty()
@@ -1640,9 +2083,14 @@ func (page ComplianceListPage) Values() []Compliance {
return *page.cl.Value
}
-// ComplianceProperties the Compliance score (percentage) of a Subscription is a sum of all Resources' Compliances
-// under the given Subscription. A Resource Compliance is defined as the compliant ('healthy') Policy Definitions
-// out of all Policy Definitions applicable to a given resource.
+// Creates a new instance of the ComplianceListPage type.
+func NewComplianceListPage(getNextPage func(context.Context, ComplianceList) (ComplianceList, error)) ComplianceListPage {
+ return ComplianceListPage{fn: getNextPage}
+}
+
+// ComplianceProperties the Compliance score (percentage) of a Subscription is a sum of all Resources'
+// Compliances under the given Subscription. A Resource Compliance is defined as the compliant ('healthy')
+// Policy Definitions out of all Policy Definitions applicable to a given resource.
type ComplianceProperties struct {
// AssessmentTimestampUtcDate - The timestamp when the Compliance calculation was conducted.
AssessmentTimestampUtcDate *date.Time `json:"assessmentTimestampUtcDate,omitempty"`
@@ -1660,6 +2108,26 @@ type ComplianceSegment struct {
Percentage *float64 `json:"percentage,omitempty"`
}
+// ConnectableResource describes the allowed inbound and outbound traffic of an Azure resource
+type ConnectableResource struct {
+ // ID - The Azure resource id
+ ID *string `json:"id,omitempty"`
+ // InboundConnectedResources - The list of Azure resources that the resource has inbound allowed connection from
+ InboundConnectedResources *[]ConnectedResource `json:"inboundConnectedResources,omitempty"`
+ // OutboundConnectedResources - The list of Azure resources that the resource has outbound allowed connection to
+ OutboundConnectedResources *[]ConnectedResource `json:"outboundConnectedResources,omitempty"`
+}
+
+// ConnectedResource describes properties of a connected resource
+type ConnectedResource struct {
+ // ConnectedResourceID - The Azure resource id of the connected resource
+ ConnectedResourceID *string `json:"connectedResourceId,omitempty"`
+ // TCPPorts - The allowed tcp ports
+ TCPPorts *string `json:"tcpPorts,omitempty"`
+ // UDPPorts - The allowed udp ports
+ UDPPorts *string `json:"udpPorts,omitempty"`
+}
+
// ConnectedWorkspace ...
type ConnectedWorkspace struct {
// ID - Azure resource ID of the connected OMS workspace
@@ -1763,14 +2231,24 @@ type ContactListIterator struct {
page ContactListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ContactListIterator) Next() error {
+func (iter *ContactListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -1779,6 +2257,13 @@ func (iter *ContactListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ContactListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ContactListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -1798,6 +2283,11 @@ func (iter ContactListIterator) Value() Contact {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ContactListIterator type.
+func NewContactListIterator(page ContactListPage) ContactListIterator {
+ return ContactListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (cl ContactList) IsEmpty() bool {
return cl.Value == nil || len(*cl.Value) == 0
@@ -1805,11 +2295,11 @@ func (cl ContactList) IsEmpty() bool {
// contactListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (cl ContactList) contactListPreparer() (*http.Request, error) {
+func (cl ContactList) contactListPreparer(ctx context.Context) (*http.Request, error) {
if cl.NextLink == nil || len(to.String(cl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(cl.NextLink)))
@@ -1817,14 +2307,24 @@ func (cl ContactList) contactListPreparer() (*http.Request, error) {
// ContactListPage contains a page of Contact values.
type ContactListPage struct {
- fn func(ContactList) (ContactList, error)
+ fn func(context.Context, ContactList) (ContactList, error)
cl ContactList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ContactListPage) Next() error {
- next, err := page.fn(page.cl)
+func (page *ContactListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ContactListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.cl)
if err != nil {
return err
}
@@ -1832,6 +2332,13 @@ func (page *ContactListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ContactListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ContactListPage) NotDone() bool {
return !page.cl.IsEmpty()
@@ -1850,6 +2357,11 @@ func (page ContactListPage) Values() []Contact {
return *page.cl.Value
}
+// Creates a new instance of the ContactListPage type.
+func NewContactListPage(getNextPage func(context.Context, ContactList) (ContactList, error)) ContactListPage {
+ return ContactListPage{fn: getNextPage}
+}
+
// ContactProperties describes security contact properties
type ContactProperties struct {
// Email - The email of this security contact
@@ -2082,21 +2594,31 @@ type DiscoveredSecuritySolutionList struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// DiscoveredSecuritySolutionListIterator provides access to a complete listing of DiscoveredSecuritySolution
-// values.
+// DiscoveredSecuritySolutionListIterator provides access to a complete listing of
+// DiscoveredSecuritySolution values.
type DiscoveredSecuritySolutionListIterator struct {
i int
page DiscoveredSecuritySolutionListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *DiscoveredSecuritySolutionListIterator) Next() error {
+func (iter *DiscoveredSecuritySolutionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2105,6 +2627,13 @@ func (iter *DiscoveredSecuritySolutionListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *DiscoveredSecuritySolutionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter DiscoveredSecuritySolutionListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2124,6 +2653,11 @@ func (iter DiscoveredSecuritySolutionListIterator) Value() DiscoveredSecuritySol
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the DiscoveredSecuritySolutionListIterator type.
+func NewDiscoveredSecuritySolutionListIterator(page DiscoveredSecuritySolutionListPage) DiscoveredSecuritySolutionListIterator {
+ return DiscoveredSecuritySolutionListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (dssl DiscoveredSecuritySolutionList) IsEmpty() bool {
return dssl.Value == nil || len(*dssl.Value) == 0
@@ -2131,11 +2665,11 @@ func (dssl DiscoveredSecuritySolutionList) IsEmpty() bool {
// discoveredSecuritySolutionListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (dssl DiscoveredSecuritySolutionList) discoveredSecuritySolutionListPreparer() (*http.Request, error) {
+func (dssl DiscoveredSecuritySolutionList) discoveredSecuritySolutionListPreparer(ctx context.Context) (*http.Request, error) {
if dssl.NextLink == nil || len(to.String(dssl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(dssl.NextLink)))
@@ -2143,14 +2677,24 @@ func (dssl DiscoveredSecuritySolutionList) discoveredSecuritySolutionListPrepare
// DiscoveredSecuritySolutionListPage contains a page of DiscoveredSecuritySolution values.
type DiscoveredSecuritySolutionListPage struct {
- fn func(DiscoveredSecuritySolutionList) (DiscoveredSecuritySolutionList, error)
+ fn func(context.Context, DiscoveredSecuritySolutionList) (DiscoveredSecuritySolutionList, error)
dssl DiscoveredSecuritySolutionList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *DiscoveredSecuritySolutionListPage) Next() error {
- next, err := page.fn(page.dssl)
+func (page *DiscoveredSecuritySolutionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DiscoveredSecuritySolutionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.dssl)
if err != nil {
return err
}
@@ -2158,6 +2702,13 @@ func (page *DiscoveredSecuritySolutionListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *DiscoveredSecuritySolutionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page DiscoveredSecuritySolutionListPage) NotDone() bool {
return !page.dssl.IsEmpty()
@@ -2176,6 +2727,11 @@ func (page DiscoveredSecuritySolutionListPage) Values() []DiscoveredSecuritySolu
return *page.dssl.Value
}
+// Creates a new instance of the DiscoveredSecuritySolutionListPage type.
+func NewDiscoveredSecuritySolutionListPage(getNextPage func(context.Context, DiscoveredSecuritySolutionList) (DiscoveredSecuritySolutionList, error)) DiscoveredSecuritySolutionListPage {
+ return DiscoveredSecuritySolutionListPage{fn: getNextPage}
+}
+
// DiscoveredSecuritySolutionProperties ...
type DiscoveredSecuritySolutionProperties struct {
// SecurityFamily - The security family of the discovered solution. Possible values include: 'Waf', 'Ngfw', 'SaasWaf', 'Va'
@@ -2189,7 +2745,7 @@ type DiscoveredSecuritySolutionProperties struct {
}
// BasicExternalSecuritySolution represents a security solution external to Azure Security Center which sends
-// information to an OMS workspace and whos data is displayed by Azure Security Center.
+// information to an OMS workspace and whose data is displayed by Azure Security Center.
type BasicExternalSecuritySolution interface {
AsCefExternalSecuritySolution() (*CefExternalSecuritySolution, bool)
AsAtaExternalSecuritySolution() (*AtaExternalSecuritySolution, bool)
@@ -2198,7 +2754,7 @@ type BasicExternalSecuritySolution interface {
}
// ExternalSecuritySolution represents a security solution external to Azure Security Center which sends
-// information to an OMS workspace and whos data is displayed by Azure Security Center.
+// information to an OMS workspace and whose data is displayed by Azure Security Center.
type ExternalSecuritySolution struct {
autorest.Response `json:"-"`
// ID - Resource Id
@@ -2351,20 +2907,31 @@ func (essl *ExternalSecuritySolutionList) UnmarshalJSON(body []byte) error {
return nil
}
-// ExternalSecuritySolutionListIterator provides access to a complete listing of ExternalSecuritySolution values.
+// ExternalSecuritySolutionListIterator provides access to a complete listing of ExternalSecuritySolution
+// values.
type ExternalSecuritySolutionListIterator struct {
i int
page ExternalSecuritySolutionListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ExternalSecuritySolutionListIterator) Next() error {
+func (iter *ExternalSecuritySolutionListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2373,6 +2940,13 @@ func (iter *ExternalSecuritySolutionListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ExternalSecuritySolutionListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ExternalSecuritySolutionListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2392,6 +2966,11 @@ func (iter ExternalSecuritySolutionListIterator) Value() BasicExternalSecuritySo
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ExternalSecuritySolutionListIterator type.
+func NewExternalSecuritySolutionListIterator(page ExternalSecuritySolutionListPage) ExternalSecuritySolutionListIterator {
+ return ExternalSecuritySolutionListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (essl ExternalSecuritySolutionList) IsEmpty() bool {
return essl.Value == nil || len(*essl.Value) == 0
@@ -2399,11 +2978,11 @@ func (essl ExternalSecuritySolutionList) IsEmpty() bool {
// externalSecuritySolutionListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (essl ExternalSecuritySolutionList) externalSecuritySolutionListPreparer() (*http.Request, error) {
+func (essl ExternalSecuritySolutionList) externalSecuritySolutionListPreparer(ctx context.Context) (*http.Request, error) {
if essl.NextLink == nil || len(to.String(essl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(essl.NextLink)))
@@ -2411,14 +2990,24 @@ func (essl ExternalSecuritySolutionList) externalSecuritySolutionListPreparer()
// ExternalSecuritySolutionListPage contains a page of BasicExternalSecuritySolution values.
type ExternalSecuritySolutionListPage struct {
- fn func(ExternalSecuritySolutionList) (ExternalSecuritySolutionList, error)
+ fn func(context.Context, ExternalSecuritySolutionList) (ExternalSecuritySolutionList, error)
essl ExternalSecuritySolutionList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ExternalSecuritySolutionListPage) Next() error {
- next, err := page.fn(page.essl)
+func (page *ExternalSecuritySolutionListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ExternalSecuritySolutionListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.essl)
if err != nil {
return err
}
@@ -2426,6 +3015,13 @@ func (page *ExternalSecuritySolutionListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ExternalSecuritySolutionListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ExternalSecuritySolutionListPage) NotDone() bool {
return !page.essl.IsEmpty()
@@ -2444,6 +3040,11 @@ func (page ExternalSecuritySolutionListPage) Values() []BasicExternalSecuritySol
return *page.essl.Value
}
+// Creates a new instance of the ExternalSecuritySolutionListPage type.
+func NewExternalSecuritySolutionListPage(getNextPage func(context.Context, ExternalSecuritySolutionList) (ExternalSecuritySolutionList, error)) ExternalSecuritySolutionListPage {
+ return ExternalSecuritySolutionListPage{fn: getNextPage}
+}
+
// ExternalSecuritySolutionModel ...
type ExternalSecuritySolutionModel struct {
autorest.Response `json:"-"`
@@ -2645,21 +3246,31 @@ type InformationProtectionPolicyList struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// InformationProtectionPolicyListIterator provides access to a complete listing of InformationProtectionPolicy
-// values.
+// InformationProtectionPolicyListIterator provides access to a complete listing of
+// InformationProtectionPolicy values.
type InformationProtectionPolicyListIterator struct {
i int
page InformationProtectionPolicyListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *InformationProtectionPolicyListIterator) Next() error {
+func (iter *InformationProtectionPolicyListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPolicyListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2668,6 +3279,13 @@ func (iter *InformationProtectionPolicyListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *InformationProtectionPolicyListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter InformationProtectionPolicyListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2687,6 +3305,11 @@ func (iter InformationProtectionPolicyListIterator) Value() InformationProtectio
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the InformationProtectionPolicyListIterator type.
+func NewInformationProtectionPolicyListIterator(page InformationProtectionPolicyListPage) InformationProtectionPolicyListIterator {
+ return InformationProtectionPolicyListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ippl InformationProtectionPolicyList) IsEmpty() bool {
return ippl.Value == nil || len(*ippl.Value) == 0
@@ -2694,11 +3317,11 @@ func (ippl InformationProtectionPolicyList) IsEmpty() bool {
// informationProtectionPolicyListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ippl InformationProtectionPolicyList) informationProtectionPolicyListPreparer() (*http.Request, error) {
+func (ippl InformationProtectionPolicyList) informationProtectionPolicyListPreparer(ctx context.Context) (*http.Request, error) {
if ippl.NextLink == nil || len(to.String(ippl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ippl.NextLink)))
@@ -2706,14 +3329,24 @@ func (ippl InformationProtectionPolicyList) informationProtectionPolicyListPrepa
// InformationProtectionPolicyListPage contains a page of InformationProtectionPolicy values.
type InformationProtectionPolicyListPage struct {
- fn func(InformationProtectionPolicyList) (InformationProtectionPolicyList, error)
+ fn func(context.Context, InformationProtectionPolicyList) (InformationProtectionPolicyList, error)
ippl InformationProtectionPolicyList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *InformationProtectionPolicyListPage) Next() error {
- next, err := page.fn(page.ippl)
+func (page *InformationProtectionPolicyListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/InformationProtectionPolicyListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ippl)
if err != nil {
return err
}
@@ -2721,6 +3354,13 @@ func (page *InformationProtectionPolicyListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *InformationProtectionPolicyListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page InformationProtectionPolicyListPage) NotDone() bool {
return !page.ippl.IsEmpty()
@@ -2739,6 +3379,11 @@ func (page InformationProtectionPolicyListPage) Values() []InformationProtection
return *page.ippl.Value
}
+// Creates a new instance of the InformationProtectionPolicyListPage type.
+func NewInformationProtectionPolicyListPage(getNextPage func(context.Context, InformationProtectionPolicyList) (InformationProtectionPolicyList, error)) InformationProtectionPolicyListPage {
+ return InformationProtectionPolicyListPage{fn: getNextPage}
+}
+
// InformationProtectionPolicyProperties describes properties of an information protection policy.
type InformationProtectionPolicyProperties struct {
// LastModifiedUtc - Describes the last UTC time the policy was modified.
@@ -2788,20 +3433,31 @@ type JitNetworkAccessPoliciesList struct {
NextLink *string `json:"nextLink,omitempty"`
}
-// JitNetworkAccessPoliciesListIterator provides access to a complete listing of JitNetworkAccessPolicy values.
+// JitNetworkAccessPoliciesListIterator provides access to a complete listing of JitNetworkAccessPolicy
+// values.
type JitNetworkAccessPoliciesListIterator struct {
i int
page JitNetworkAccessPoliciesListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *JitNetworkAccessPoliciesListIterator) Next() error {
+func (iter *JitNetworkAccessPoliciesListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -2810,6 +3466,13 @@ func (iter *JitNetworkAccessPoliciesListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *JitNetworkAccessPoliciesListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter JitNetworkAccessPoliciesListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -2829,6 +3492,11 @@ func (iter JitNetworkAccessPoliciesListIterator) Value() JitNetworkAccessPolicy
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the JitNetworkAccessPoliciesListIterator type.
+func NewJitNetworkAccessPoliciesListIterator(page JitNetworkAccessPoliciesListPage) JitNetworkAccessPoliciesListIterator {
+ return JitNetworkAccessPoliciesListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (jnapl JitNetworkAccessPoliciesList) IsEmpty() bool {
return jnapl.Value == nil || len(*jnapl.Value) == 0
@@ -2836,11 +3504,11 @@ func (jnapl JitNetworkAccessPoliciesList) IsEmpty() bool {
// jitNetworkAccessPoliciesListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (jnapl JitNetworkAccessPoliciesList) jitNetworkAccessPoliciesListPreparer() (*http.Request, error) {
+func (jnapl JitNetworkAccessPoliciesList) jitNetworkAccessPoliciesListPreparer(ctx context.Context) (*http.Request, error) {
if jnapl.NextLink == nil || len(to.String(jnapl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(jnapl.NextLink)))
@@ -2848,14 +3516,24 @@ func (jnapl JitNetworkAccessPoliciesList) jitNetworkAccessPoliciesListPreparer()
// JitNetworkAccessPoliciesListPage contains a page of JitNetworkAccessPolicy values.
type JitNetworkAccessPoliciesListPage struct {
- fn func(JitNetworkAccessPoliciesList) (JitNetworkAccessPoliciesList, error)
+ fn func(context.Context, JitNetworkAccessPoliciesList) (JitNetworkAccessPoliciesList, error)
jnapl JitNetworkAccessPoliciesList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *JitNetworkAccessPoliciesListPage) Next() error {
- next, err := page.fn(page.jnapl)
+func (page *JitNetworkAccessPoliciesListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/JitNetworkAccessPoliciesListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.jnapl)
if err != nil {
return err
}
@@ -2863,6 +3541,13 @@ func (page *JitNetworkAccessPoliciesListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *JitNetworkAccessPoliciesListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page JitNetworkAccessPoliciesListPage) NotDone() bool {
return !page.jnapl.IsEmpty()
@@ -2881,6 +3566,11 @@ func (page JitNetworkAccessPoliciesListPage) Values() []JitNetworkAccessPolicy {
return *page.jnapl.Value
}
+// Creates a new instance of the JitNetworkAccessPoliciesListPage type.
+func NewJitNetworkAccessPoliciesListPage(getNextPage func(context.Context, JitNetworkAccessPoliciesList) (JitNetworkAccessPoliciesList, error)) JitNetworkAccessPoliciesListPage {
+ return JitNetworkAccessPoliciesListPage{fn: getNextPage}
+}
+
// JitNetworkAccessPolicy ...
type JitNetworkAccessPolicy struct {
autorest.Response `json:"-"`
@@ -3124,14 +3814,24 @@ type OperationListIterator struct {
page OperationListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListIterator) Next() error {
+func (iter *OperationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3140,6 +3840,13 @@ func (iter *OperationListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3159,6 +3866,11 @@ func (iter OperationListIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListIterator type.
+func NewOperationListIterator(page OperationListPage) OperationListIterator {
+ return OperationListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ol OperationList) IsEmpty() bool {
return ol.Value == nil || len(*ol.Value) == 0
@@ -3166,11 +3878,11 @@ func (ol OperationList) IsEmpty() bool {
// operationListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ol OperationList) operationListPreparer() (*http.Request, error) {
+func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) {
if ol.NextLink == nil || len(to.String(ol.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ol.NextLink)))
@@ -3178,14 +3890,24 @@ func (ol OperationList) operationListPreparer() (*http.Request, error) {
// OperationListPage contains a page of Operation values.
type OperationListPage struct {
- fn func(OperationList) (OperationList, error)
+ fn func(context.Context, OperationList) (OperationList, error)
ol OperationList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListPage) Next() error {
- next, err := page.fn(page.ol)
+func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ol)
if err != nil {
return err
}
@@ -3193,6 +3915,13 @@ func (page *OperationListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListPage) NotDone() bool {
return !page.ol.IsEmpty()
@@ -3211,6 +3940,11 @@ func (page OperationListPage) Values() []Operation {
return *page.ol.Value
}
+// Creates a new instance of the OperationListPage type.
+func NewOperationListPage(getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage {
+ return OperationListPage{fn: getNextPage}
+}
+
// Pricing pricing tier will be applied for the scope based on the resource ID
type Pricing struct {
autorest.Response `json:"-"`
@@ -3308,14 +4042,24 @@ type PricingListIterator struct {
page PricingListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *PricingListIterator) Next() error {
+func (iter *PricingListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3324,6 +4068,13 @@ func (iter *PricingListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *PricingListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter PricingListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3343,6 +4094,11 @@ func (iter PricingListIterator) Value() Pricing {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the PricingListIterator type.
+func NewPricingListIterator(page PricingListPage) PricingListIterator {
+ return PricingListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (pl PricingList) IsEmpty() bool {
return pl.Value == nil || len(*pl.Value) == 0
@@ -3350,11 +4106,11 @@ func (pl PricingList) IsEmpty() bool {
// pricingListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (pl PricingList) pricingListPreparer() (*http.Request, error) {
+func (pl PricingList) pricingListPreparer(ctx context.Context) (*http.Request, error) {
if pl.NextLink == nil || len(to.String(pl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(pl.NextLink)))
@@ -3362,14 +4118,24 @@ func (pl PricingList) pricingListPreparer() (*http.Request, error) {
// PricingListPage contains a page of Pricing values.
type PricingListPage struct {
- fn func(PricingList) (PricingList, error)
+ fn func(context.Context, PricingList) (PricingList, error)
pl PricingList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *PricingListPage) Next() error {
- next, err := page.fn(page.pl)
+func (page *PricingListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.pl)
if err != nil {
return err
}
@@ -3377,6 +4143,13 @@ func (page *PricingListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *PricingListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page PricingListPage) NotDone() bool {
return !page.pl.IsEmpty()
@@ -3395,6 +4168,11 @@ func (page PricingListPage) Values() []Pricing {
return *page.pl.Value
}
+// Creates a new instance of the PricingListPage type.
+func NewPricingListPage(getNextPage func(context.Context, PricingList) (PricingList, error)) PricingListPage {
+ return PricingListPage{fn: getNextPage}
+}
+
// PricingProperties pricing data
type PricingProperties struct {
// PricingTier - Pricing tier type. Possible values include: 'Free', 'Standard'
@@ -3581,14 +4359,24 @@ type SettingsListIterator struct {
page SettingsListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *SettingsListIterator) Next() error {
+func (iter *SettingsListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3597,6 +4385,13 @@ func (iter *SettingsListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *SettingsListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter SettingsListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3616,6 +4411,11 @@ func (iter SettingsListIterator) Value() BasicSetting {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the SettingsListIterator type.
+func NewSettingsListIterator(page SettingsListPage) SettingsListIterator {
+ return SettingsListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (sl SettingsList) IsEmpty() bool {
return sl.Value == nil || len(*sl.Value) == 0
@@ -3623,11 +4423,11 @@ func (sl SettingsList) IsEmpty() bool {
// settingsListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (sl SettingsList) settingsListPreparer() (*http.Request, error) {
+func (sl SettingsList) settingsListPreparer(ctx context.Context) (*http.Request, error) {
if sl.NextLink == nil || len(to.String(sl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(sl.NextLink)))
@@ -3635,14 +4435,24 @@ func (sl SettingsList) settingsListPreparer() (*http.Request, error) {
// SettingsListPage contains a page of BasicSetting values.
type SettingsListPage struct {
- fn func(SettingsList) (SettingsList, error)
+ fn func(context.Context, SettingsList) (SettingsList, error)
sl SettingsList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *SettingsListPage) Next() error {
- next, err := page.fn(page.sl)
+func (page *SettingsListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.sl)
if err != nil {
return err
}
@@ -3650,6 +4460,13 @@ func (page *SettingsListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *SettingsListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page SettingsListPage) NotDone() bool {
return !page.sl.IsEmpty()
@@ -3668,6 +4485,11 @@ func (page SettingsListPage) Values() []BasicSetting {
return *page.sl.Value
}
+// Creates a new instance of the SettingsListPage type.
+func NewSettingsListPage(getNextPage func(context.Context, SettingsList) (SettingsList, error)) SettingsListPage {
+ return SettingsListPage{fn: getNextPage}
+}
+
// Task security task that we recommend to do in order to strengthen security
type Task struct {
autorest.Response `json:"-"`
@@ -3763,14 +4585,24 @@ type TaskListIterator struct {
page TaskListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TaskListIterator) Next() error {
+func (iter *TaskListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TaskListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3779,6 +4611,13 @@ func (iter *TaskListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TaskListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TaskListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3798,6 +4637,11 @@ func (iter TaskListIterator) Value() Task {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TaskListIterator type.
+func NewTaskListIterator(page TaskListPage) TaskListIterator {
+ return TaskListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (tl TaskList) IsEmpty() bool {
return tl.Value == nil || len(*tl.Value) == 0
@@ -3805,11 +4649,11 @@ func (tl TaskList) IsEmpty() bool {
// taskListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (tl TaskList) taskListPreparer() (*http.Request, error) {
+func (tl TaskList) taskListPreparer(ctx context.Context) (*http.Request, error) {
if tl.NextLink == nil || len(to.String(tl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(tl.NextLink)))
@@ -3817,14 +4661,24 @@ func (tl TaskList) taskListPreparer() (*http.Request, error) {
// TaskListPage contains a page of Task values.
type TaskListPage struct {
- fn func(TaskList) (TaskList, error)
+ fn func(context.Context, TaskList) (TaskList, error)
tl TaskList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TaskListPage) Next() error {
- next, err := page.fn(page.tl)
+func (page *TaskListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TaskListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tl)
if err != nil {
return err
}
@@ -3832,6 +4686,13 @@ func (page *TaskListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TaskListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TaskListPage) NotDone() bool {
return !page.tl.IsEmpty()
@@ -3850,7 +4711,13 @@ func (page TaskListPage) Values() []Task {
return *page.tl.Value
}
-// TaskParameters changing set of properties, depending on the task type that is derived from the name field
+// Creates a new instance of the TaskListPage type.
+func NewTaskListPage(getNextPage func(context.Context, TaskList) (TaskList, error)) TaskListPage {
+ return TaskListPage{fn: getNextPage}
+}
+
+// TaskParameters changing set of properties, depending on the task type that is derived from the name
+// field
type TaskParameters struct {
// AdditionalProperties - Unmatched properties from the message are deserialized this collection
AdditionalProperties map[string]interface{} `json:""`
@@ -3933,14 +4800,24 @@ type TopologyListIterator struct {
page TopologyListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *TopologyListIterator) Next() error {
+func (iter *TopologyListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -3949,6 +4826,13 @@ func (iter *TopologyListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *TopologyListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter TopologyListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -3968,6 +4852,11 @@ func (iter TopologyListIterator) Value() TopologyResource {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the TopologyListIterator type.
+func NewTopologyListIterator(page TopologyListPage) TopologyListIterator {
+ return TopologyListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (tl TopologyList) IsEmpty() bool {
return tl.Value == nil || len(*tl.Value) == 0
@@ -3975,11 +4864,11 @@ func (tl TopologyList) IsEmpty() bool {
// topologyListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (tl TopologyList) topologyListPreparer() (*http.Request, error) {
+func (tl TopologyList) topologyListPreparer(ctx context.Context) (*http.Request, error) {
if tl.NextLink == nil || len(to.String(tl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(tl.NextLink)))
@@ -3987,14 +4876,24 @@ func (tl TopologyList) topologyListPreparer() (*http.Request, error) {
// TopologyListPage contains a page of TopologyResource values.
type TopologyListPage struct {
- fn func(TopologyList) (TopologyList, error)
+ fn func(context.Context, TopologyList) (TopologyList, error)
tl TopologyList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *TopologyListPage) Next() error {
- next, err := page.fn(page.tl)
+func (page *TopologyListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.tl)
if err != nil {
return err
}
@@ -4002,6 +4901,13 @@ func (page *TopologyListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *TopologyListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page TopologyListPage) NotDone() bool {
return !page.tl.IsEmpty()
@@ -4020,6 +4926,11 @@ func (page TopologyListPage) Values() []TopologyResource {
return *page.tl.Value
}
+// Creates a new instance of the TopologyListPage type.
+func NewTopologyListPage(getNextPage func(context.Context, TopologyList) (TopologyList, error)) TopologyListPage {
+ return TopologyListPage{fn: getNextPage}
+}
+
// TopologyResource ...
type TopologyResource struct {
autorest.Response `json:"-"`
@@ -4252,14 +5163,24 @@ type WorkspaceSettingListIterator struct {
page WorkspaceSettingListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *WorkspaceSettingListIterator) Next() error {
+func (iter *WorkspaceSettingListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -4268,6 +5189,13 @@ func (iter *WorkspaceSettingListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *WorkspaceSettingListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter WorkspaceSettingListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -4287,6 +5215,11 @@ func (iter WorkspaceSettingListIterator) Value() WorkspaceSetting {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the WorkspaceSettingListIterator type.
+func NewWorkspaceSettingListIterator(page WorkspaceSettingListPage) WorkspaceSettingListIterator {
+ return WorkspaceSettingListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (wsl WorkspaceSettingList) IsEmpty() bool {
return wsl.Value == nil || len(*wsl.Value) == 0
@@ -4294,11 +5227,11 @@ func (wsl WorkspaceSettingList) IsEmpty() bool {
// workspaceSettingListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (wsl WorkspaceSettingList) workspaceSettingListPreparer() (*http.Request, error) {
+func (wsl WorkspaceSettingList) workspaceSettingListPreparer(ctx context.Context) (*http.Request, error) {
if wsl.NextLink == nil || len(to.String(wsl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(wsl.NextLink)))
@@ -4306,14 +5239,24 @@ func (wsl WorkspaceSettingList) workspaceSettingListPreparer() (*http.Request, e
// WorkspaceSettingListPage contains a page of WorkspaceSetting values.
type WorkspaceSettingListPage struct {
- fn func(WorkspaceSettingList) (WorkspaceSettingList, error)
+ fn func(context.Context, WorkspaceSettingList) (WorkspaceSettingList, error)
wsl WorkspaceSettingList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *WorkspaceSettingListPage) Next() error {
- next, err := page.fn(page.wsl)
+func (page *WorkspaceSettingListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.wsl)
if err != nil {
return err
}
@@ -4321,6 +5264,13 @@ func (page *WorkspaceSettingListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *WorkspaceSettingListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page WorkspaceSettingListPage) NotDone() bool {
return !page.wsl.IsEmpty()
@@ -4339,6 +5289,11 @@ func (page WorkspaceSettingListPage) Values() []WorkspaceSetting {
return *page.wsl.Value
}
+// Creates a new instance of the WorkspaceSettingListPage type.
+func NewWorkspaceSettingListPage(getNextPage func(context.Context, WorkspaceSettingList) (WorkspaceSettingList, error)) WorkspaceSettingListPage {
+ return WorkspaceSettingListPage{fn: getNextPage}
+}
+
// WorkspaceSettingProperties workspace setting data
type WorkspaceSettingProperties struct {
// WorkspaceID - The full Azure ID of the workspace to save the data in
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/operations.go
index 806fc8906346..2da21a2645da 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string, ascLo
// List exposes all available operations for discovery purposes.
func (client OperationsClient) List(ctx context.Context) (result OperationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.ol.Response.Response != nil {
+ sc = result.ol.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationList) (result OperationList, err error) {
- req, err := lastResults.operationListPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationList) (result OperationList, err error) {
+ req, err := lastResults.operationListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationList) (resul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/pricings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/pricings.go
index cf813ee8c0a8..e4149dda58e6 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/pricings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/pricings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -47,6 +48,16 @@ func NewPricingsClientWithBaseURI(baseURI string, subscriptionID string, ascLoca
// pricingName - name of the pricing configuration
// pricing - pricing object
func (client PricingsClient) CreateOrUpdateResourceGroupPricing(ctx context.Context, resourceGroupName string, pricingName string, pricing Pricing) (result Pricing, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.CreateOrUpdateResourceGroupPricing")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -127,6 +138,16 @@ func (client PricingsClient) CreateOrUpdateResourceGroupPricingResponder(resp *h
// insensitive.
// pricingName - name of the pricing configuration
func (client PricingsClient) GetResourceGroupPricing(ctx context.Context, resourceGroupName string, pricingName string) (result Pricing, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.GetResourceGroupPricing")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -204,6 +225,16 @@ func (client PricingsClient) GetResourceGroupPricingResponder(resp *http.Respons
// Parameters:
// pricingName - name of the pricing configuration
func (client PricingsClient) GetSubscriptionPricing(ctx context.Context, pricingName string) (result Pricing, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.GetSubscriptionPricing")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -273,6 +304,16 @@ func (client PricingsClient) GetSubscriptionPricingResponder(resp *http.Response
// List security pricing configurations in the subscription
func (client PricingsClient) List(ctx context.Context) (result PricingListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.List")
+ defer func() {
+ sc := -1
+ if result.pl.Response.Response != nil {
+ sc = result.pl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -341,8 +382,8 @@ func (client PricingsClient) ListResponder(resp *http.Response) (result PricingL
}
// listNextResults retrieves the next set of results, if any.
-func (client PricingsClient) listNextResults(lastResults PricingList) (result PricingList, err error) {
- req, err := lastResults.pricingListPreparer()
+func (client PricingsClient) listNextResults(ctx context.Context, lastResults PricingList) (result PricingList, err error) {
+ req, err := lastResults.pricingListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.PricingsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -363,6 +404,16 @@ func (client PricingsClient) listNextResults(lastResults PricingList) (result Pr
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client PricingsClient) ListComplete(ctx context.Context) (result PricingListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.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
}
@@ -372,6 +423,16 @@ func (client PricingsClient) ListComplete(ctx context.Context) (result PricingLi
// resourceGroupName - the name of the resource group within the user's subscription. The name is case
// insensitive.
func (client PricingsClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result PricingListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.pl.Response.Response != nil {
+ sc = result.pl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -445,8 +506,8 @@ func (client PricingsClient) ListByResourceGroupResponder(resp *http.Response) (
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client PricingsClient) listByResourceGroupNextResults(lastResults PricingList) (result PricingList, err error) {
- req, err := lastResults.pricingListPreparer()
+func (client PricingsClient) listByResourceGroupNextResults(ctx context.Context, lastResults PricingList) (result PricingList, err error) {
+ req, err := lastResults.pricingListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.PricingsClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -467,6 +528,16 @@ func (client PricingsClient) listByResourceGroupNextResults(lastResults PricingL
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client PricingsClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result PricingListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -476,6 +547,16 @@ func (client PricingsClient) ListByResourceGroupComplete(ctx context.Context, re
// pricingName - name of the pricing configuration
// pricing - pricing object
func (client PricingsClient) UpdateSubscriptionPricing(ctx context.Context, pricingName string, pricing Pricing) (result Pricing, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/PricingsClient.UpdateSubscriptionPricing")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/settings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/settings.go
index 6991ea8df8a2..3b45ca6bda24 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/settings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/settings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -44,6 +45,16 @@ func NewSettingsClientWithBaseURI(baseURI string, subscriptionID string, ascLoca
// Parameters:
// settingName - name of setting
func (client SettingsClient) Get(ctx context.Context, settingName string) (result SettingModel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -113,6 +124,16 @@ func (client SettingsClient) GetResponder(resp *http.Response) (result SettingMo
// List settings about different configurations in security center
func (client SettingsClient) List(ctx context.Context) (result SettingsListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.List")
+ defer func() {
+ sc := -1
+ if result.sl.Response.Response != nil {
+ sc = result.sl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -181,8 +202,8 @@ func (client SettingsClient) ListResponder(resp *http.Response) (result Settings
}
// listNextResults retrieves the next set of results, if any.
-func (client SettingsClient) listNextResults(lastResults SettingsList) (result SettingsList, err error) {
- req, err := lastResults.settingsListPreparer()
+func (client SettingsClient) listNextResults(ctx context.Context, lastResults SettingsList) (result SettingsList, err error) {
+ req, err := lastResults.settingsListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.SettingsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -203,6 +224,16 @@ func (client SettingsClient) listNextResults(lastResults SettingsList) (result S
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client SettingsClient) ListComplete(ctx context.Context) (result SettingsListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.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
}
@@ -212,6 +243,16 @@ func (client SettingsClient) ListComplete(ctx context.Context) (result SettingsL
// settingName - name of setting
// setting - setting object
func (client SettingsClient) Update(ctx context.Context, settingName string, setting BasicSetting) (result SettingModel, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/SettingsClient.Update")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/tasks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/tasks.go
index b4c89c0f399d..2710f6f7c567 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/tasks.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/tasks.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewTasksClientWithBaseURI(baseURI string, subscriptionID string, ascLocatio
// insensitive.
// taskName - name of the task object, will be a GUID
func (client TasksClient) GetResourceGroupLevelTask(ctx context.Context, resourceGroupName string, taskName string) (result Task, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.GetResourceGroupLevelTask")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -123,6 +134,16 @@ func (client TasksClient) GetResourceGroupLevelTaskResponder(resp *http.Response
// Parameters:
// taskName - name of the task object, will be a GUID
func (client TasksClient) GetSubscriptionLevelTask(ctx context.Context, taskName string) (result Task, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.GetSubscriptionLevelTask")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -195,6 +216,16 @@ func (client TasksClient) GetSubscriptionLevelTaskResponder(resp *http.Response)
// Parameters:
// filter - oData filter. Optional.
func (client TasksClient) List(ctx context.Context, filter string) (result TaskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.List")
+ defer func() {
+ sc := -1
+ if result.tl.Response.Response != nil {
+ sc = result.tl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -266,8 +297,8 @@ func (client TasksClient) ListResponder(resp *http.Response) (result TaskList, e
}
// listNextResults retrieves the next set of results, if any.
-func (client TasksClient) listNextResults(lastResults TaskList) (result TaskList, err error) {
- req, err := lastResults.taskListPreparer()
+func (client TasksClient) listNextResults(ctx context.Context, lastResults TaskList) (result TaskList, err error) {
+ req, err := lastResults.taskListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.TasksClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -288,6 +319,16 @@ func (client TasksClient) listNextResults(lastResults TaskList) (result TaskList
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client TasksClient) ListComplete(ctx context.Context, filter string) (result TaskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.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, filter)
return
}
@@ -296,6 +337,16 @@ func (client TasksClient) ListComplete(ctx context.Context, filter string) (resu
// Parameters:
// filter - oData filter. Optional.
func (client TasksClient) ListByHomeRegion(ctx context.Context, filter string) (result TaskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.ListByHomeRegion")
+ defer func() {
+ sc := -1
+ if result.tl.Response.Response != nil {
+ sc = result.tl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -368,8 +419,8 @@ func (client TasksClient) ListByHomeRegionResponder(resp *http.Response) (result
}
// listByHomeRegionNextResults retrieves the next set of results, if any.
-func (client TasksClient) listByHomeRegionNextResults(lastResults TaskList) (result TaskList, err error) {
- req, err := lastResults.taskListPreparer()
+func (client TasksClient) listByHomeRegionNextResults(ctx context.Context, lastResults TaskList) (result TaskList, err error) {
+ req, err := lastResults.taskListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.TasksClient", "listByHomeRegionNextResults", nil, "Failure preparing next results request")
}
@@ -390,6 +441,16 @@ func (client TasksClient) listByHomeRegionNextResults(lastResults TaskList) (res
// ListByHomeRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client TasksClient) ListByHomeRegionComplete(ctx context.Context, filter string) (result TaskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.ListByHomeRegion")
+ 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.ListByHomeRegion(ctx, filter)
return
}
@@ -400,6 +461,16 @@ func (client TasksClient) ListByHomeRegionComplete(ctx context.Context, filter s
// insensitive.
// filter - oData filter. Optional.
func (client TasksClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result TaskListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.tl.Response.Response != nil {
+ sc = result.tl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -477,8 +548,8 @@ func (client TasksClient) ListByResourceGroupResponder(resp *http.Response) (res
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client TasksClient) listByResourceGroupNextResults(lastResults TaskList) (result TaskList, err error) {
- req, err := lastResults.taskListPreparer()
+func (client TasksClient) listByResourceGroupNextResults(ctx context.Context, lastResults TaskList) (result TaskList, err error) {
+ req, err := lastResults.taskListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.TasksClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -499,6 +570,16 @@ func (client TasksClient) listByResourceGroupNextResults(lastResults TaskList) (
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client TasksClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result TaskListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName, filter)
return
}
@@ -511,6 +592,16 @@ func (client TasksClient) ListByResourceGroupComplete(ctx context.Context, resou
// taskName - name of the task object, will be a GUID
// taskUpdateActionType - type of the action to do on the task
func (client TasksClient) UpdateResourceGroupLevelTaskState(ctx context.Context, resourceGroupName string, taskName string, taskUpdateActionType string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.UpdateResourceGroupLevelTaskState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -590,6 +681,16 @@ func (client TasksClient) UpdateResourceGroupLevelTaskStateResponder(resp *http.
// taskName - name of the task object, will be a GUID
// taskUpdateActionType - type of the action to do on the task
func (client TasksClient) UpdateSubscriptionLevelTaskState(ctx context.Context, taskName string, taskUpdateActionType string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TasksClient.UpdateSubscriptionLevelTaskState")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/topology.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/topology.go
index f489d565b27b..b3fdac5a8e64 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/topology.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/topology.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -46,6 +47,16 @@ func NewTopologyClientWithBaseURI(baseURI string, subscriptionID string, ascLoca
// insensitive.
// topologyResourceName - name of a topology resources collection.
func (client TopologyClient) Get(ctx context.Context, resourceGroupName string, topologyResourceName string) (result TopologyResource, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -121,6 +132,16 @@ func (client TopologyClient) GetResponder(resp *http.Response) (result TopologyR
// List gets a list that allows to build a topology view of a subscription.
func (client TopologyClient) List(ctx context.Context) (result TopologyListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyClient.List")
+ defer func() {
+ sc := -1
+ if result.tl.Response.Response != nil {
+ sc = result.tl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -189,8 +210,8 @@ func (client TopologyClient) ListResponder(resp *http.Response) (result Topology
}
// listNextResults retrieves the next set of results, if any.
-func (client TopologyClient) listNextResults(lastResults TopologyList) (result TopologyList, err error) {
- req, err := lastResults.topologyListPreparer()
+func (client TopologyClient) listNextResults(ctx context.Context, lastResults TopologyList) (result TopologyList, err error) {
+ req, err := lastResults.topologyListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.TopologyClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -211,12 +232,32 @@ func (client TopologyClient) listNextResults(lastResults TopologyList) (result T
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client TopologyClient) ListComplete(ctx context.Context) (result TopologyListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyClient.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
}
// ListByHomeRegion gets a list that allows to build a topology view of a subscription and location.
func (client TopologyClient) ListByHomeRegion(ctx context.Context) (result TopologyListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyClient.ListByHomeRegion")
+ defer func() {
+ sc := -1
+ if result.tl.Response.Response != nil {
+ sc = result.tl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -286,8 +327,8 @@ func (client TopologyClient) ListByHomeRegionResponder(resp *http.Response) (res
}
// listByHomeRegionNextResults retrieves the next set of results, if any.
-func (client TopologyClient) listByHomeRegionNextResults(lastResults TopologyList) (result TopologyList, err error) {
- req, err := lastResults.topologyListPreparer()
+func (client TopologyClient) listByHomeRegionNextResults(ctx context.Context, lastResults TopologyList) (result TopologyList, err error) {
+ req, err := lastResults.topologyListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.TopologyClient", "listByHomeRegionNextResults", nil, "Failure preparing next results request")
}
@@ -308,6 +349,16 @@ func (client TopologyClient) listByHomeRegionNextResults(lastResults TopologyLis
// ListByHomeRegionComplete enumerates all values, automatically crossing page boundaries as required.
func (client TopologyClient) ListByHomeRegionComplete(ctx context.Context) (result TopologyListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/TopologyClient.ListByHomeRegion")
+ 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.ListByHomeRegion(ctx)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/workspacesettings.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/workspacesettings.go
index 59eb1d2610a2..26cfb662aee3 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/workspacesettings.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/2017-08-01-preview/security/workspacesettings.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewWorkspaceSettingsClientWithBaseURI(baseURI string, subscriptionID string
// workspaceSettingName - name of the security setting
// workspaceSetting - security data setting object
func (client WorkspaceSettingsClient) Create(ctx context.Context, workspaceSettingName string, workspaceSetting WorkspaceSetting) (result WorkspaceSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.Create")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}},
@@ -123,6 +134,16 @@ func (client WorkspaceSettingsClient) CreateResponder(resp *http.Response) (resu
// Parameters:
// workspaceSettingName - name of the security setting
func (client WorkspaceSettingsClient) Delete(ctx context.Context, workspaceSettingName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -193,6 +214,16 @@ func (client WorkspaceSettingsClient) DeleteResponder(resp *http.Response) (resu
// Parameters:
// workspaceSettingName - name of the security setting
func (client WorkspaceSettingsClient) Get(ctx context.Context, workspaceSettingName string) (result WorkspaceSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.Get")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -262,6 +293,16 @@ func (client WorkspaceSettingsClient) GetResponder(resp *http.Response) (result
// List settings about where we should store your security data and logs
func (client WorkspaceSettingsClient) List(ctx context.Context) (result WorkspaceSettingListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.List")
+ defer func() {
+ sc := -1
+ if result.wsl.Response.Response != nil {
+ sc = result.wsl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
@@ -330,8 +371,8 @@ func (client WorkspaceSettingsClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client WorkspaceSettingsClient) listNextResults(lastResults WorkspaceSettingList) (result WorkspaceSettingList, err error) {
- req, err := lastResults.workspaceSettingListPreparer()
+func (client WorkspaceSettingsClient) listNextResults(ctx context.Context, lastResults WorkspaceSettingList) (result WorkspaceSettingList, err error) {
+ req, err := lastResults.workspaceSettingListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "security.WorkspaceSettingsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -352,6 +393,16 @@ func (client WorkspaceSettingsClient) listNextResults(lastResults WorkspaceSetti
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client WorkspaceSettingsClient) ListComplete(ctx context.Context) (result WorkspaceSettingListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.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
}
@@ -361,6 +412,16 @@ func (client WorkspaceSettingsClient) ListComplete(ctx context.Context) (result
// workspaceSettingName - name of the security setting
// workspaceSetting - security data setting object
func (client WorkspaceSettingsClient) Update(ctx context.Context, workspaceSettingName string, workspaceSetting WorkspaceSetting) (result WorkspaceSetting, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/WorkspaceSettingsClient.Update")
+ 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: client.SubscriptionID,
Constraints: []validation.Constraint{{Target: "client.SubscriptionID", Name: validation.Pattern, Rule: `^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$`, Chain: nil}}}}); err != nil {
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
index 1496ae977ff7..d827439ad115 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/models.go
@@ -18,13 +18,18 @@ package signalr
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr"
+
// KeyType enumerates the values for key type.
type KeyType string
@@ -88,7 +93,8 @@ func PossibleSkuTierValues() []SkuTier {
return []SkuTier{Basic, Free, Premium, Standard}
}
-// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// CreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type CreateOrUpdateFuture struct {
azure.Future
}
@@ -225,8 +231,8 @@ type MetricSpecification struct {
Dimensions *[]Dimension `json:"dimensions,omitempty"`
}
-// NameAvailability result of the request to check name availability. It contains a flag and possible reason of
-// failure.
+// NameAvailability result of the request to check name availability. It contains a flag and possible
+// reason of failure.
type NameAvailability struct {
autorest.Response `json:"-"`
// NameAvailable - Indicates whether the name is available or not.
@@ -285,14 +291,24 @@ type OperationListIterator struct {
page OperationListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *OperationListIterator) Next() error {
+func (iter *OperationListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -301,6 +317,13 @@ func (iter *OperationListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *OperationListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter OperationListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -320,6 +343,11 @@ func (iter OperationListIterator) Value() Operation {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the OperationListIterator type.
+func NewOperationListIterator(page OperationListPage) OperationListIterator {
+ return OperationListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ol OperationList) IsEmpty() bool {
return ol.Value == nil || len(*ol.Value) == 0
@@ -327,11 +355,11 @@ func (ol OperationList) IsEmpty() bool {
// operationListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ol OperationList) operationListPreparer() (*http.Request, error) {
+func (ol OperationList) operationListPreparer(ctx context.Context) (*http.Request, error) {
if ol.NextLink == nil || len(to.String(ol.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ol.NextLink)))
@@ -339,14 +367,24 @@ func (ol OperationList) operationListPreparer() (*http.Request, error) {
// OperationListPage contains a page of Operation values.
type OperationListPage struct {
- fn func(OperationList) (OperationList, error)
+ fn func(context.Context, OperationList) (OperationList, error)
ol OperationList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *OperationListPage) Next() error {
- next, err := page.fn(page.ol)
+func (page *OperationListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ol)
if err != nil {
return err
}
@@ -354,6 +392,13 @@ func (page *OperationListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *OperationListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page OperationListPage) NotDone() bool {
return !page.ol.IsEmpty()
@@ -372,14 +417,19 @@ func (page OperationListPage) Values() []Operation {
return *page.ol.Value
}
+// Creates a new instance of the OperationListPage type.
+func NewOperationListPage(getNextPage func(context.Context, OperationList) (OperationList, error)) OperationListPage {
+ return OperationListPage{fn: getNextPage}
+}
+
// OperationProperties extra Operation properties.
type OperationProperties struct {
// ServiceSpecification - The service specifications.
ServiceSpecification *ServiceSpecification `json:"serviceSpecification,omitempty"`
}
-// Properties a class that describes the properties of the SignalR service that should contain more read-only
-// properties than AzSignalR.Models.SignalRCreateOrUpdateProperties
+// Properties a class that describes the properties of the SignalR service that should contain more
+// read-only properties than AzSignalR.Models.SignalRCreateOrUpdateProperties
type Properties struct {
// ProvisioningState - Provisioning state of the resource. Possible values include: 'Unknown', 'Succeeded', 'Failed', 'Canceled', 'Running', 'Creating', 'Updating', 'Deleting', 'Moving'
ProvisioningState ProvisioningState `json:"provisioningState,omitempty"`
@@ -398,7 +448,8 @@ type Properties struct {
HostNamePrefix *string `json:"hostNamePrefix,omitempty"`
}
-// RegenerateKeyFuture an abstraction for monitoring and retrieving the results of a long-running operation.
+// RegenerateKeyFuture an abstraction for monitoring and retrieving the results of a long-running
+// operation.
type RegenerateKeyFuture struct {
azure.Future
}
@@ -436,7 +487,7 @@ type RegenerateKeyParameters struct {
type Resource struct {
// ID - Fully qualified resource Id for the resource.
ID *string `json:"id,omitempty"`
- // Name - The name of the resouce.
+ // Name - The name of the resource.
Name *string `json:"name,omitempty"`
// Type - The type of the service - e.g. "Microsoft.SignalRService/SignalR"
Type *string `json:"type,omitempty"`
@@ -458,14 +509,24 @@ type ResourceListIterator struct {
page ResourceListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *ResourceListIterator) Next() error {
+func (iter *ResourceListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -474,6 +535,13 @@ func (iter *ResourceListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *ResourceListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter ResourceListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -493,6 +561,11 @@ func (iter ResourceListIterator) Value() ResourceType {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the ResourceListIterator type.
+func NewResourceListIterator(page ResourceListPage) ResourceListIterator {
+ return ResourceListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (rl ResourceList) IsEmpty() bool {
return rl.Value == nil || len(*rl.Value) == 0
@@ -500,11 +573,11 @@ func (rl ResourceList) IsEmpty() bool {
// resourceListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (rl ResourceList) resourceListPreparer() (*http.Request, error) {
+func (rl ResourceList) resourceListPreparer(ctx context.Context) (*http.Request, error) {
if rl.NextLink == nil || len(to.String(rl.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(rl.NextLink)))
@@ -512,14 +585,24 @@ func (rl ResourceList) resourceListPreparer() (*http.Request, error) {
// ResourceListPage contains a page of ResourceType values.
type ResourceListPage struct {
- fn func(ResourceList) (ResourceList, error)
+ fn func(context.Context, ResourceList) (ResourceList, error)
rl ResourceList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *ResourceListPage) Next() error {
- next, err := page.fn(page.rl)
+func (page *ResourceListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ResourceListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.rl)
if err != nil {
return err
}
@@ -527,6 +610,13 @@ func (page *ResourceListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *ResourceListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page ResourceListPage) NotDone() bool {
return !page.rl.IsEmpty()
@@ -545,6 +635,11 @@ func (page ResourceListPage) Values() []ResourceType {
return *page.rl.Value
}
+// Creates a new instance of the ResourceListPage type.
+func NewResourceListPage(getNextPage func(context.Context, ResourceList) (ResourceList, error)) ResourceListPage {
+ return ResourceListPage{fn: getNextPage}
+}
+
// ResourceSku the billing information of the resource.(e.g. basic vs. standard)
type ResourceSku struct {
// Name - The name of the SKU. This is typically a letter + number code, such as A0 or P3. Required (if sku is specified)
@@ -573,7 +668,7 @@ type ResourceType struct {
Tags map[string]*string `json:"tags"`
// ID - Fully qualified resource Id for the resource.
ID *string `json:"id,omitempty"`
- // Name - The name of the resouce.
+ // Name - The name of the resource.
Name *string `json:"name,omitempty"`
// Type - The type of the service - e.g. "Microsoft.SignalRService/SignalR"
Type *string `json:"type,omitempty"`
@@ -698,7 +793,7 @@ type TrackedResource struct {
Tags map[string]*string `json:"tags"`
// ID - Fully qualified resource Id for the resource.
ID *string `json:"id,omitempty"`
- // Name - The name of the resouce.
+ // Name - The name of the resource.
Name *string `json:"name,omitempty"`
// Type - The type of the service - e.g. "Microsoft.SignalRService/SignalR"
Type *string `json:"type,omitempty"`
@@ -808,14 +903,24 @@ type UsageListIterator struct {
page UsageListPage
}
-// Next advances to the next value. If there was an error making
+// NextWithContext advances to the next value. If there was an error making
// the request the iterator does not advance and the error is returned.
-func (iter *UsageListIterator) Next() error {
+func (iter *UsageListIterator) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageListIterator.NextWithContext")
+ defer func() {
+ sc := -1
+ if iter.Response().Response.Response != nil {
+ sc = iter.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
iter.i++
if iter.i < len(iter.page.Values()) {
return nil
}
- err := iter.page.Next()
+ err = iter.page.NextWithContext(ctx)
if err != nil {
iter.i--
return err
@@ -824,6 +929,13 @@ func (iter *UsageListIterator) Next() error {
return nil
}
+// Next advances to the next value. If there was an error making
+// the request the iterator does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (iter *UsageListIterator) Next() error {
+ return iter.NextWithContext(context.Background())
+}
+
// NotDone returns true if the enumeration should be started or is not yet complete.
func (iter UsageListIterator) NotDone() bool {
return iter.page.NotDone() && iter.i < len(iter.page.Values())
@@ -843,6 +955,11 @@ func (iter UsageListIterator) Value() Usage {
return iter.page.Values()[iter.i]
}
+// Creates a new instance of the UsageListIterator type.
+func NewUsageListIterator(page UsageListPage) UsageListIterator {
+ return UsageListIterator{page: page}
+}
+
// IsEmpty returns true if the ListResult contains no values.
func (ul UsageList) IsEmpty() bool {
return ul.Value == nil || len(*ul.Value) == 0
@@ -850,11 +967,11 @@ func (ul UsageList) IsEmpty() bool {
// usageListPreparer prepares a request to retrieve the next set of results.
// It returns nil if no more results exist.
-func (ul UsageList) usageListPreparer() (*http.Request, error) {
+func (ul UsageList) usageListPreparer(ctx context.Context) (*http.Request, error) {
if ul.NextLink == nil || len(to.String(ul.NextLink)) < 1 {
return nil, nil
}
- return autorest.Prepare(&http.Request{},
+ return autorest.Prepare((&http.Request{}).WithContext(ctx),
autorest.AsJSON(),
autorest.AsGet(),
autorest.WithBaseURL(to.String(ul.NextLink)))
@@ -862,14 +979,24 @@ func (ul UsageList) usageListPreparer() (*http.Request, error) {
// UsageListPage contains a page of Usage values.
type UsageListPage struct {
- fn func(UsageList) (UsageList, error)
+ fn func(context.Context, UsageList) (UsageList, error)
ul UsageList
}
-// Next advances to the next page of values. If there was an error making
+// NextWithContext advances to the next page of values. If there was an error making
// the request the page does not advance and the error is returned.
-func (page *UsageListPage) Next() error {
- next, err := page.fn(page.ul)
+func (page *UsageListPage) NextWithContext(ctx context.Context) (err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsageListPage.NextWithContext")
+ defer func() {
+ sc := -1
+ if page.Response().Response.Response != nil {
+ sc = page.Response().Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
+ next, err := page.fn(ctx, page.ul)
if err != nil {
return err
}
@@ -877,6 +1004,13 @@ func (page *UsageListPage) Next() error {
return nil
}
+// Next advances to the next page of values. If there was an error making
+// the request the page does not advance and the error is returned.
+// Deprecated: Use NextWithContext() instead.
+func (page *UsageListPage) Next() error {
+ return page.NextWithContext(context.Background())
+}
+
// NotDone returns true if the page enumeration should be started or is not yet complete.
func (page UsageListPage) NotDone() bool {
return !page.ul.IsEmpty()
@@ -895,9 +1029,14 @@ func (page UsageListPage) Values() []Usage {
return *page.ul.Value
}
+// Creates a new instance of the UsageListPage type.
+func NewUsageListPage(getNextPage func(context.Context, UsageList) (UsageList, error)) UsageListPage {
+ return UsageListPage{fn: getNextPage}
+}
+
// UsageName localizable String object containing the name and a localized value.
type UsageName struct {
- // Value - The indentifier of the usage.
+ // Value - The identifier of the usage.
Value *string `json:"value,omitempty"`
// LocalizedValue - Localized name of the usage.
LocalizedValue *string `json:"localizedValue,omitempty"`
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go
index 7cfb1829f396..d86726c4b262 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/operations.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -41,6 +42,16 @@ func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) Opera
// List lists all of the available REST API operations of the Microsoft.SignalRService provider.
func (client OperationsClient) List(ctx context.Context) (result OperationListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.List")
+ defer func() {
+ sc := -1
+ if result.ol.Response.Response != nil {
+ sc = result.ol.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -99,8 +110,8 @@ func (client OperationsClient) ListResponder(resp *http.Response) (result Operat
}
// listNextResults retrieves the next set of results, if any.
-func (client OperationsClient) listNextResults(lastResults OperationList) (result OperationList, err error) {
- req, err := lastResults.operationListPreparer()
+func (client OperationsClient) listNextResults(ctx context.Context, lastResults OperationList) (result OperationList, err error) {
+ req, err := lastResults.operationListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "signalr.OperationsClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -121,6 +132,16 @@ func (client OperationsClient) listNextResults(lastResults OperationList) (resul
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client OperationsClient) ListComplete(ctx context.Context) (result OperationListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/OperationsClient.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
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
index 35f6efcb642c..930e80cdbc8e 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/signalr.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewClientWithBaseURI(baseURI string, subscriptionID string) Client {
// location - the region
// parameters - parameters supplied to the operation.
func (client Client) CheckNameAvailability(ctx context.Context, location string, parameters *NameAvailabilityParameters) (result NameAvailability, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CheckNameAvailability")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
@@ -127,6 +138,16 @@ func (client Client) CheckNameAvailabilityResponder(resp *http.Response) (result
// resourceName - the name of the SignalR resource.
// parameters - parameters for the create or update operation
func (client Client) CreateOrUpdate(ctx context.Context, resourceGroupName string, resourceName string, parameters *CreateParameters) (result CreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters", Name: validation.Null, Rule: false,
@@ -184,10 +205,6 @@ func (client Client) CreateOrUpdateSender(req *http.Request) (future CreateOrUpd
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -211,6 +228,16 @@ func (client Client) CreateOrUpdateResponder(resp *http.Response) (result Resour
// from the Azure Resource Manager API or the portal.
// resourceName - the name of the SignalR resource.
func (client Client) Delete(ctx context.Context, resourceGroupName string, resourceName string) (result DeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "Delete", nil, "Failure preparing request")
@@ -256,10 +283,6 @@ func (client Client) DeleteSender(req *http.Request) (future DeleteFuture, err e
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -282,6 +305,16 @@ func (client Client) DeleteResponder(resp *http.Response) (result autorest.Respo
// from the Azure Resource Manager API or the portal.
// resourceName - the name of the SignalR resource.
func (client Client) Get(ctx context.Context, resourceGroupName string, resourceName string) (result ResourceType, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "Get", nil, "Failure preparing request")
@@ -349,6 +382,16 @@ func (client Client) GetResponder(resp *http.Response) (result ResourceType, err
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
func (client Client) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ResourceListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.rl.Response.Response != nil {
+ sc = result.rl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -412,8 +455,8 @@ func (client Client) ListByResourceGroupResponder(resp *http.Response) (result R
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client Client) listByResourceGroupNextResults(lastResults ResourceList) (result ResourceList, err error) {
- req, err := lastResults.resourceListPreparer()
+func (client Client) listByResourceGroupNextResults(ctx context.Context, lastResults ResourceList) (result ResourceList, err error) {
+ req, err := lastResults.resourceListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "signalr.Client", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -434,12 +477,32 @@ func (client Client) listByResourceGroupNextResults(lastResults ResourceList) (r
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ResourceListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
// ListBySubscription handles requests to list all resources in a subscription.
func (client Client) ListBySubscription(ctx context.Context) (result ResourceListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListBySubscription")
+ defer func() {
+ sc := -1
+ if result.rl.Response.Response != nil {
+ sc = result.rl.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listBySubscriptionNextResults
req, err := client.ListBySubscriptionPreparer(ctx)
if err != nil {
@@ -502,8 +565,8 @@ func (client Client) ListBySubscriptionResponder(resp *http.Response) (result Re
}
// listBySubscriptionNextResults retrieves the next set of results, if any.
-func (client Client) listBySubscriptionNextResults(lastResults ResourceList) (result ResourceList, err error) {
- req, err := lastResults.resourceListPreparer()
+func (client Client) listBySubscriptionNextResults(ctx context.Context, lastResults ResourceList) (result ResourceList, err error) {
+ req, err := lastResults.resourceListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "signalr.Client", "listBySubscriptionNextResults", nil, "Failure preparing next results request")
}
@@ -524,6 +587,16 @@ func (client Client) listBySubscriptionNextResults(lastResults ResourceList) (re
// ListBySubscriptionComplete enumerates all values, automatically crossing page boundaries as required.
func (client Client) ListBySubscriptionComplete(ctx context.Context) (result ResourceListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListBySubscription")
+ 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.ListBySubscription(ctx)
return
}
@@ -534,6 +607,16 @@ func (client Client) ListBySubscriptionComplete(ctx context.Context) (result Res
// from the Azure Resource Manager API or the portal.
// resourceName - the name of the SignalR resource.
func (client Client) ListKeys(ctx context.Context, resourceGroupName string, resourceName string) (result Keys, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.ListKeys")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListKeysPreparer(ctx, resourceGroupName, resourceName)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "ListKeys", nil, "Failure preparing request")
@@ -604,6 +687,16 @@ func (client Client) ListKeysResponder(resp *http.Response) (result Keys, err er
// resourceName - the name of the SignalR resource.
// parameters - parameter that describes the Regenerate Key Operation.
func (client Client) RegenerateKey(ctx context.Context, resourceGroupName string, resourceName string, parameters *RegenerateKeyParameters) (result RegenerateKeyFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.RegenerateKey")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.RegenerateKeyPreparer(ctx, resourceGroupName, resourceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "RegenerateKey", nil, "Failure preparing request")
@@ -654,10 +747,6 @@ func (client Client) RegenerateKeySender(req *http.Request) (future RegenerateKe
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -682,6 +771,16 @@ func (client Client) RegenerateKeyResponder(resp *http.Response) (result Keys, e
// resourceName - the name of the SignalR resource.
// parameters - parameters for the update operation
func (client Client) Update(ctx context.Context, resourceGroupName string, resourceName string, parameters *UpdateParameters) (result UpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/Client.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, resourceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "signalr.Client", "Update", nil, "Failure preparing request")
@@ -732,10 +831,6 @@ func (client Client) UpdateSender(req *http.Request) (future UpdateFuture, err e
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go
index 9c67bf88fd60..7663321aeb8d 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/signalr/mgmt/2018-03-01-preview/signalr/usages.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -43,6 +44,16 @@ func NewUsagesClientWithBaseURI(baseURI string, subscriptionID string) UsagesCli
// Parameters:
// location - the location like "eastus"
func (client UsagesClient) List(ctx context.Context, location string) (result UsageListPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.List")
+ defer func() {
+ sc := -1
+ if result.ul.Response.Response != nil {
+ sc = result.ul.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx, location)
if err != nil {
@@ -106,8 +117,8 @@ func (client UsagesClient) ListResponder(resp *http.Response) (result UsageList,
}
// listNextResults retrieves the next set of results, if any.
-func (client UsagesClient) listNextResults(lastResults UsageList) (result UsageList, err error) {
- req, err := lastResults.usageListPreparer()
+func (client UsagesClient) listNextResults(ctx context.Context, lastResults UsageList) (result UsageList, err error) {
+ req, err := lastResults.usageListPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "signalr.UsagesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -128,6 +139,16 @@ func (client UsagesClient) listNextResults(lastResults UsageList) (result UsageL
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client UsagesClient) ListComplete(ctx context.Context, location string) (result UsageListIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/UsagesClient.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, location)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
index 4434c8d8829b..af99814dd267 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionpolicies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewBackupLongTermRetentionPoliciesClientWithBaseURI(baseURI string, subscri
// databaseName - the name of the database
// parameters - the required parameters to update a backup long term retention policy
func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters BackupLongTermRetentionPolicy) (result BackupLongTermRetentionPoliciesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionPolicyProperties", Name: validation.Null, Rule: false,
@@ -107,10 +118,6 @@ func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateSender(req *ht
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -135,6 +142,16 @@ func (client BackupLongTermRetentionPoliciesClient) CreateOrUpdateResponder(resp
// serverName - the name of the server.
// databaseName - the name of the database.
func (client BackupLongTermRetentionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result BackupLongTermRetentionPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "Get", nil, "Failure preparing request")
@@ -206,6 +223,16 @@ func (client BackupLongTermRetentionPoliciesClient) GetResponder(resp *http.Resp
// serverName - the name of the server.
// databaseName - the name of the database.
func (client BackupLongTermRetentionPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result BackupLongTermRetentionPolicyListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionPoliciesClient.ListByDatabase")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionPoliciesClient", "ListByDatabase", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
index 81316d00023a..96f1b8ac3a1c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/backuplongtermretentionvaults.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewBackupLongTermRetentionVaultsClientWithBaseURI(baseURI string, subscript
// serverName - the name of the server.
// parameters - the required parameters to update a backup long term retention vault
func (client BackupLongTermRetentionVaultsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters BackupLongTermRetentionVault) (result BackupLongTermRetentionVaultsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.BackupLongTermRetentionVaultProperties", Name: validation.Null, Rule: false,
@@ -105,10 +116,6 @@ func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateSender(req *http
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -132,6 +139,16 @@ func (client BackupLongTermRetentionVaultsClient) CreateOrUpdateResponder(resp *
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client BackupLongTermRetentionVaultsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result BackupLongTermRetentionVault, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "Get", nil, "Failure preparing request")
@@ -201,6 +218,16 @@ func (client BackupLongTermRetentionVaultsClient) GetResponder(resp *http.Respon
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client BackupLongTermRetentionVaultsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result BackupLongTermRetentionVaultListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/BackupLongTermRetentionVaultsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.BackupLongTermRetentionVaultsClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go
index eacb96270f4f..207b1612ac7f 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/capabilities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -45,6 +46,16 @@ func NewCapabilitiesClientWithBaseURI(baseURI string, subscriptionID string) Cap
// Parameters:
// locationName - the location name whose capabilities are retrieved.
func (client CapabilitiesClient) ListByLocation(ctx context.Context, locationName string) (result LocationCapabilities, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/CapabilitiesClient.ListByLocation")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByLocationPreparer(ctx, locationName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.CapabilitiesClient", "ListByLocation", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go
index 0633f3963616..7359f3b5526a 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseblobauditingpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewDatabaseBlobAuditingPoliciesClientWithBaseURI(baseURI string, subscripti
// databaseName - the name of the database.
// parameters - the database blob auditing policy.
func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseBlobAuditingPolicy) (result DatabaseBlobAuditingPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -123,6 +134,16 @@ func (client DatabaseBlobAuditingPoliciesClient) CreateOrUpdateResponder(resp *h
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabaseBlobAuditingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseBlobAuditingPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseBlobAuditingPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabaseBlobAuditingPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
index 8417ebc15b75..78c0fb8f5ee9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databases.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewDatabasesClientWithBaseURI(baseURI string, subscriptionID string) Databa
// databaseName - the name of the database to import into
// parameters - the required parameters for importing a Bacpac into a database.
func (client DatabasesClient) CreateImportOperation(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ImportExtensionRequest) (result DatabasesCreateImportOperationFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateImportOperation")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.ImportExtensionProperties", Name: validation.Null, Rule: false,
@@ -107,10 +118,6 @@ func (client DatabasesClient) CreateImportOperationSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -136,6 +143,16 @@ func (client DatabasesClient) CreateImportOperationResponder(resp *http.Response
// databaseName - the name of the database to be operated on (updated or created).
// parameters - the required parameters for creating or updating a database.
func (client DatabasesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters Database) (result DatabasesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -184,10 +201,6 @@ func (client DatabasesClient) CreateOrUpdateSender(req *http.Request) (future Da
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -212,6 +225,16 @@ func (client DatabasesClient) CreateOrUpdateResponder(resp *http.Response) (resu
// serverName - the name of the server.
// databaseName - the name of the database to be deleted.
func (client DatabasesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Delete", nil, "Failure preparing request")
@@ -282,6 +305,16 @@ func (client DatabasesClient) DeleteResponder(resp *http.Response) (result autor
// databaseName - the name of the database to be exported.
// parameters - the required parameters for exporting a database.
func (client DatabasesClient) Export(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters ExportRequest) (result DatabasesExportFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Export")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.StorageKey", Name: validation.Null, Rule: true, Chain: nil},
@@ -339,10 +372,6 @@ func (client DatabasesClient) ExportSender(req *http.Request) (future DatabasesE
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -369,6 +398,16 @@ func (client DatabasesClient) ExportResponder(resp *http.Response) (result Impor
// expand - a comma separated list of child objects to expand in the response. Possible properties:
// serviceTierAdvisors, transparentDataEncryption.
func (client DatabasesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string, expand string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName, expand)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Get", nil, "Failure preparing request")
@@ -443,6 +482,16 @@ func (client DatabasesClient) GetResponder(resp *http.Response) (result Database
// elasticPoolName - the name of the elastic pool to be retrieved.
// databaseName - the name of the database to be retrieved.
func (client DatabasesClient) GetByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, databaseName string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.GetByElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByElasticPool", nil, "Failure preparing request")
@@ -507,7 +556,7 @@ func (client DatabasesClient) GetByElasticPoolResponder(resp *http.Response) (re
return
}
-// GetByRecommendedElasticPool gets a database inside of a recommented elastic pool.
+// GetByRecommendedElasticPool gets a database inside of a recommended elastic pool.
// Parameters:
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
@@ -515,6 +564,16 @@ func (client DatabasesClient) GetByElasticPoolResponder(resp *http.Response) (re
// recommendedElasticPoolName - the name of the elastic pool to be retrieved.
// databaseName - the name of the database to be retrieved.
func (client DatabasesClient) GetByRecommendedElasticPool(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string, databaseName string) (result Database, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.GetByRecommendedElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetByRecommendedElasticPoolPreparer(ctx, resourceGroupName, serverName, recommendedElasticPoolName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "GetByRecommendedElasticPool", nil, "Failure preparing request")
@@ -586,6 +645,16 @@ func (client DatabasesClient) GetByRecommendedElasticPoolResponder(resp *http.Re
// serverName - the name of the server.
// parameters - the required parameters for importing a Bacpac into a database.
func (client DatabasesClient) Import(ctx context.Context, resourceGroupName string, serverName string, parameters ImportRequest) (result DatabasesImportFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Import")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.DatabaseName", Name: validation.Null, Rule: true, Chain: nil},
@@ -640,10 +709,6 @@ func (client DatabasesClient) ImportSender(req *http.Request) (future DatabasesI
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -668,6 +733,16 @@ func (client DatabasesClient) ImportResponder(resp *http.Response) (result Impor
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool to be retrieved.
func (client DatabasesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByElasticPool", nil, "Failure preparing request")
@@ -731,13 +806,23 @@ func (client DatabasesClient) ListByElasticPoolResponder(resp *http.Response) (r
return
}
-// ListByRecommendedElasticPool returns a list of databases inside a recommented elastic pool.
+// ListByRecommendedElasticPool returns a list of databases inside a recommended elastic pool.
// Parameters:
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
// recommendedElasticPoolName - the name of the recommended elastic pool to be retrieved.
func (client DatabasesClient) ListByRecommendedElasticPool(ctx context.Context, resourceGroupName string, serverName string, recommendedElasticPoolName string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByRecommendedElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByRecommendedElasticPoolPreparer(ctx, resourceGroupName, serverName, recommendedElasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByRecommendedElasticPool", nil, "Failure preparing request")
@@ -810,6 +895,16 @@ func (client DatabasesClient) ListByRecommendedElasticPoolResponder(resp *http.R
// serviceTierAdvisors, transparentDataEncryption.
// filter - an OData filter expression that describes a subset of databases to return.
func (client DatabasesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string, expand string, filter string) (result DatabaseListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName, expand, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListByServer", nil, "Failure preparing request")
@@ -885,6 +980,16 @@ func (client DatabasesClient) ListByServerResponder(resp *http.Response) (result
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabasesClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result MetricDefinitionListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListMetricDefinitions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetricDefinitions", nil, "Failure preparing request")
@@ -956,6 +1061,16 @@ func (client DatabasesClient) ListMetricDefinitionsResponder(resp *http.Response
// databaseName - the name of the database.
// filter - an OData filter expression that describes a subset of metrics to return.
func (client DatabasesClient) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, databaseName string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.ListMetrics")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListMetricsPreparer(ctx, resourceGroupName, serverName, databaseName, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "ListMetrics", nil, "Failure preparing request")
@@ -1027,6 +1142,16 @@ func (client DatabasesClient) ListMetricsResponder(resp *http.Response) (result
// serverName - the name of the server.
// databaseName - the name of the data warehouse to pause.
func (client DatabasesClient) Pause(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesPauseFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Pause")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.PausePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Pause", nil, "Failure preparing request")
@@ -1073,10 +1198,6 @@ func (client DatabasesClient) PauseSender(req *http.Request) (future DatabasesPa
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1100,6 +1221,16 @@ func (client DatabasesClient) PauseResponder(resp *http.Response) (result autore
// serverName - the name of the server.
// databaseName - the name of the data warehouse to resume.
func (client DatabasesClient) Resume(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabasesResumeFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Resume")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ResumePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Resume", nil, "Failure preparing request")
@@ -1146,10 +1277,6 @@ func (client DatabasesClient) ResumeSender(req *http.Request) (future DatabasesR
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -1174,6 +1301,16 @@ func (client DatabasesClient) ResumeResponder(resp *http.Response) (result autor
// databaseName - the name of the database to be updated.
// parameters - the required parameters for updating a database.
func (client DatabasesClient) Update(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseUpdate) (result DatabasesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabasesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabasesClient", "Update", nil, "Failure preparing request")
@@ -1222,10 +1359,6 @@ func (client DatabasesClient) UpdateSender(req *http.Request) (future DatabasesU
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go
index ff201caadaeb..3aa4499e4e11 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databasethreatdetectionpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewDatabaseThreatDetectionPoliciesClientWithBaseURI(baseURI string, subscri
// databaseName - the name of the database for which database Threat Detection policy is defined.
// parameters - the database Threat Detection policy.
func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DatabaseSecurityAlertPolicy) (result DatabaseSecurityAlertPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseThreatDetectionPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -123,6 +134,16 @@ func (client DatabaseThreatDetectionPoliciesClient) CreateOrUpdateResponder(resp
// serverName - the name of the server.
// databaseName - the name of the database for which database Threat Detection policy is defined.
func (client DatabaseThreatDetectionPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseSecurityAlertPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseThreatDetectionPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabaseThreatDetectionPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go
index cfca64ba5220..90828c770247 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/databaseusages.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewDatabaseUsagesClientWithBaseURI(baseURI string, subscriptionID string) D
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DatabaseUsagesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DatabaseUsageListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DatabaseUsagesClient.ListByDatabase")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DatabaseUsagesClient", "ListByDatabase", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go
index 886e172f4573..f6fe014bc83c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingpolicies.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewDataMaskingPoliciesClientWithBaseURI(baseURI string, subscriptionID stri
// databaseName - the name of the database.
// parameters - parameters for creating or updating a data masking policy.
func (client DataMaskingPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters DataMaskingPolicy) (result DataMaskingPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, databaseName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -122,6 +133,16 @@ func (client DataMaskingPoliciesClient) CreateOrUpdateResponder(resp *http.Respo
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DataMaskingPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DataMaskingPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DataMaskingPoliciesClient", "Get", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go
index 8655ec37bdaf..2d5b5e1073ca 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/datamaskingrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -51,6 +52,16 @@ func NewDataMaskingRulesClientWithBaseURI(baseURI string, subscriptionID string)
// dataMaskingRuleName - the name of the data masking rule.
// parameters - the required parameters for creating or updating a data masking rule.
func (client DataMaskingRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, dataMaskingRuleName string, parameters DataMaskingRule) (result DataMaskingRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.DataMaskingRuleProperties", Name: validation.Null, Rule: false,
@@ -135,6 +146,16 @@ func (client DataMaskingRulesClient) CreateOrUpdateResponder(resp *http.Response
// serverName - the name of the server.
// databaseName - the name of the database.
func (client DataMaskingRulesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result DataMaskingRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/DataMaskingRulesClient.ListByDatabase")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.DataMaskingRulesClient", "ListByDatabase", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go
index 1ddcca4d4f4f..8da1c7eba741 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpoolactivities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewElasticPoolActivitiesClientWithBaseURI(baseURI string, subscriptionID st
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool for which to get the current activity.
func (client ElasticPoolActivitiesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolActivityListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolActivitiesClient.ListByElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolActivitiesClient", "ListByElasticPool", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go
index 4aa8be207f7a..c5a0a0b3cb9c 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpooldatabaseactivities.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewElasticPoolDatabaseActivitiesClientWithBaseURI(baseURI string, subscript
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool.
func (client ElasticPoolDatabaseActivitiesClient) ListByElasticPool(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPoolDatabaseActivityListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolDatabaseActivitiesClient.ListByElasticPool")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByElasticPoolPreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolDatabaseActivitiesClient", "ListByElasticPool", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
index c872c28ea70c..46b612572ccb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/elasticpools.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewElasticPoolsClientWithBaseURI(baseURI string, subscriptionID string) Ela
// elasticPoolName - the name of the elastic pool to be operated on (updated or created).
// parameters - the required parameters for creating or updating an elastic pool.
func (client ElasticPoolsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPool) (result ElasticPoolsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, elasticPoolName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -97,10 +108,6 @@ func (client ElasticPoolsClient) CreateOrUpdateSender(req *http.Request) (future
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -125,6 +132,16 @@ func (client ElasticPoolsClient) CreateOrUpdateResponder(resp *http.Response) (r
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool to be deleted.
func (client ElasticPoolsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Delete", nil, "Failure preparing request")
@@ -194,6 +211,16 @@ func (client ElasticPoolsClient) DeleteResponder(resp *http.Response) (result au
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool to be retrieved.
func (client ElasticPoolsClient) Get(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result ElasticPool, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Get", nil, "Failure preparing request")
@@ -263,6 +290,16 @@ func (client ElasticPoolsClient) GetResponder(resp *http.Response) (result Elast
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client ElasticPoolsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result ElasticPoolListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListByServer", nil, "Failure preparing request")
@@ -332,6 +369,16 @@ func (client ElasticPoolsClient) ListByServerResponder(resp *http.Response) (res
// serverName - the name of the server.
// elasticPoolName - the name of the elastic pool.
func (client ElasticPoolsClient) ListMetricDefinitions(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string) (result MetricDefinitionListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListMetricDefinitions")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListMetricDefinitionsPreparer(ctx, resourceGroupName, serverName, elasticPoolName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetricDefinitions", nil, "Failure preparing request")
@@ -403,6 +450,16 @@ func (client ElasticPoolsClient) ListMetricDefinitionsResponder(resp *http.Respo
// elasticPoolName - the name of the elastic pool.
// filter - an OData filter expression that describes a subset of metrics to return.
func (client ElasticPoolsClient) ListMetrics(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, filter string) (result MetricListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.ListMetrics")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListMetricsPreparer(ctx, resourceGroupName, serverName, elasticPoolName, filter)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "ListMetrics", nil, "Failure preparing request")
@@ -475,6 +532,16 @@ func (client ElasticPoolsClient) ListMetricsResponder(resp *http.Response) (resu
// elasticPoolName - the name of the elastic pool to be updated.
// parameters - the required parameters for updating an elastic pool.
func (client ElasticPoolsClient) Update(ctx context.Context, resourceGroupName string, serverName string, elasticPoolName string, parameters ElasticPoolUpdate) (result ElasticPoolsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ElasticPoolsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, elasticPoolName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ElasticPoolsClient", "Update", nil, "Failure preparing request")
@@ -523,10 +590,6 @@ func (client ElasticPoolsClient) UpdateSender(req *http.Request) (future Elastic
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
index 645c86c4c8e7..539ee9f88031 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/encryptionprotectors.go
@@ -21,6 +21,7 @@ import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -48,6 +49,16 @@ func NewEncryptionProtectorsClientWithBaseURI(baseURI string, subscriptionID str
// serverName - the name of the server.
// parameters - the requested encryption protector resource state.
func (client EncryptionProtectorsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, parameters EncryptionProtector) (result EncryptionProtectorsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, serverName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "CreateOrUpdate", nil, "Failure preparing request")
@@ -96,10 +107,6 @@ func (client EncryptionProtectorsClient) CreateOrUpdateSender(req *http.Request)
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -123,6 +130,16 @@ func (client EncryptionProtectorsClient) CreateOrUpdateResponder(resp *http.Resp
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client EncryptionProtectorsClient) Get(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtector, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "Get", nil, "Failure preparing request")
@@ -192,6 +209,16 @@ func (client EncryptionProtectorsClient) GetResponder(resp *http.Response) (resu
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client EncryptionProtectorsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtectorListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.eplr.Response.Response != nil {
+ sc = result.eplr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByServerNextResults
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
@@ -256,8 +283,8 @@ func (client EncryptionProtectorsClient) ListByServerResponder(resp *http.Respon
}
// listByServerNextResults retrieves the next set of results, if any.
-func (client EncryptionProtectorsClient) listByServerNextResults(lastResults EncryptionProtectorListResult) (result EncryptionProtectorListResult, err error) {
- req, err := lastResults.encryptionProtectorListResultPreparer()
+func (client EncryptionProtectorsClient) listByServerNextResults(ctx context.Context, lastResults EncryptionProtectorListResult) (result EncryptionProtectorListResult, err error) {
+ req, err := lastResults.encryptionProtectorListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "sql.EncryptionProtectorsClient", "listByServerNextResults", nil, "Failure preparing next results request")
}
@@ -278,6 +305,16 @@ func (client EncryptionProtectorsClient) listByServerNextResults(lastResults Enc
// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
func (client EncryptionProtectorsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result EncryptionProtectorListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/EncryptionProtectorsClient.ListByServer")
+ 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.ListByServer(ctx, resourceGroupName, serverName)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
index 114ab721211a..c2e5a585e1b9 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/failovergroups.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewFailoverGroupsClientWithBaseURI(baseURI string, subscriptionID string) F
// failoverGroupName - the name of the failover group.
// parameters - the failover group parameters.
func (client FailoverGroupsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroup) (result FailoverGroupsCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.FailoverGroupProperties", Name: validation.Null, Rule: false,
@@ -107,10 +118,6 @@ func (client FailoverGroupsClient) CreateOrUpdateSender(req *http.Request) (futu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -135,6 +142,16 @@ func (client FailoverGroupsClient) CreateOrUpdateResponder(resp *http.Response)
// serverName - the name of the server containing the failover group.
// failoverGroupName - the name of the failover group.
func (client FailoverGroupsClient) Delete(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, failoverGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Delete", nil, "Failure preparing request")
@@ -181,10 +198,6 @@ func (client FailoverGroupsClient) DeleteSender(req *http.Request) (future Failo
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -208,6 +221,16 @@ func (client FailoverGroupsClient) DeleteResponder(resp *http.Response) (result
// serverName - the name of the server containing the failover group.
// failoverGroupName - the name of the failover group.
func (client FailoverGroupsClient) Failover(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsFailoverFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Failover")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.FailoverPreparer(ctx, resourceGroupName, serverName, failoverGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Failover", nil, "Failure preparing request")
@@ -254,10 +277,6 @@ func (client FailoverGroupsClient) FailoverSender(req *http.Request) (future Fai
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -283,6 +302,16 @@ func (client FailoverGroupsClient) FailoverResponder(resp *http.Response) (resul
// serverName - the name of the server containing the failover group.
// failoverGroupName - the name of the failover group.
func (client FailoverGroupsClient) ForceFailoverAllowDataLoss(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroupsForceFailoverAllowDataLossFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ForceFailoverAllowDataLoss")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ForceFailoverAllowDataLossPreparer(ctx, resourceGroupName, serverName, failoverGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "ForceFailoverAllowDataLoss", nil, "Failure preparing request")
@@ -329,10 +358,6 @@ func (client FailoverGroupsClient) ForceFailoverAllowDataLossSender(req *http.Re
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -357,6 +382,16 @@ func (client FailoverGroupsClient) ForceFailoverAllowDataLossResponder(resp *htt
// serverName - the name of the server containing the failover group.
// failoverGroupName - the name of the failover group.
func (client FailoverGroupsClient) Get(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string) (result FailoverGroup, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, failoverGroupName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Get", nil, "Failure preparing request")
@@ -426,6 +461,16 @@ func (client FailoverGroupsClient) GetResponder(resp *http.Response) (result Fai
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server containing the failover group.
func (client FailoverGroupsClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FailoverGroupListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.fglr.Response.Response != nil {
+ sc = result.fglr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByServerNextResults
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
@@ -490,8 +535,8 @@ func (client FailoverGroupsClient) ListByServerResponder(resp *http.Response) (r
}
// listByServerNextResults retrieves the next set of results, if any.
-func (client FailoverGroupsClient) listByServerNextResults(lastResults FailoverGroupListResult) (result FailoverGroupListResult, err error) {
- req, err := lastResults.failoverGroupListResultPreparer()
+func (client FailoverGroupsClient) listByServerNextResults(ctx context.Context, lastResults FailoverGroupListResult) (result FailoverGroupListResult, err error) {
+ req, err := lastResults.failoverGroupListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "listByServerNextResults", nil, "Failure preparing next results request")
}
@@ -512,6 +557,16 @@ func (client FailoverGroupsClient) listByServerNextResults(lastResults FailoverG
// ListByServerComplete enumerates all values, automatically crossing page boundaries as required.
func (client FailoverGroupsClient) ListByServerComplete(ctx context.Context, resourceGroupName string, serverName string) (result FailoverGroupListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.ListByServer")
+ 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.ListByServer(ctx, resourceGroupName, serverName)
return
}
@@ -524,6 +579,16 @@ func (client FailoverGroupsClient) ListByServerComplete(ctx context.Context, res
// failoverGroupName - the name of the failover group.
// parameters - the failover group parameters.
func (client FailoverGroupsClient) Update(ctx context.Context, resourceGroupName string, serverName string, failoverGroupName string, parameters FailoverGroupUpdate) (result FailoverGroupsUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FailoverGroupsClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, serverName, failoverGroupName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FailoverGroupsClient", "Update", nil, "Failure preparing request")
@@ -572,10 +637,6 @@ func (client FailoverGroupsClient) UpdateSender(req *http.Request) (future Failo
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go
index 1f1b7f8a49f4..c3cbef3cce19 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/firewallrules.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewFirewallRulesClientWithBaseURI(baseURI string, subscriptionID string) Fi
// firewallRuleName - the name of the firewall rule.
// parameters - the required parameters for creating or updating a firewall rule.
func (client FirewallRulesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string, parameters FirewallRule) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.FirewallRuleProperties", Name: validation.Null, Rule: false,
@@ -131,6 +142,16 @@ func (client FirewallRulesClient) CreateOrUpdateResponder(resp *http.Response) (
// serverName - the name of the server.
// firewallRuleName - the name of the firewall rule.
func (client FirewallRulesClient) Delete(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result autorest.Response, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response != nil {
+ sc = result.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Delete", nil, "Failure preparing request")
@@ -200,6 +221,16 @@ func (client FirewallRulesClient) DeleteResponder(resp *http.Response) (result a
// serverName - the name of the server.
// firewallRuleName - the name of the firewall rule.
func (client FirewallRulesClient) Get(ctx context.Context, resourceGroupName string, serverName string, firewallRuleName string) (result FirewallRule, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, firewallRuleName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "Get", nil, "Failure preparing request")
@@ -269,6 +300,16 @@ func (client FirewallRulesClient) GetResponder(resp *http.Response) (result Fire
// from the Azure Resource Manager API or the portal.
// serverName - the name of the server.
func (client FirewallRulesClient) ListByServer(ctx context.Context, resourceGroupName string, serverName string) (result FirewallRuleListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/FirewallRulesClient.ListByServer")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByServerPreparer(ctx, resourceGroupName, serverName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.FirewallRulesClient", "ListByServer", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go
index 3e4c95df43e2..9e5f54876588 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/geobackuppolicies.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -50,6 +51,16 @@ func NewGeoBackupPoliciesClientWithBaseURI(baseURI string, subscriptionID string
// databaseName - the name of the database.
// parameters - the required parameters for creating or updating the geo backup policy.
func (client GeoBackupPoliciesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, serverName string, databaseName string, parameters GeoBackupPolicy) (result GeoBackupPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.CreateOrUpdate")
+ 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: parameters,
Constraints: []validation.Constraint{{Target: "parameters.GeoBackupPolicyProperties", Name: validation.Null, Rule: true, Chain: nil}}}}); err != nil {
@@ -129,6 +140,16 @@ func (client GeoBackupPoliciesClient) CreateOrUpdateResponder(resp *http.Respons
// serverName - the name of the server.
// databaseName - the name of the database.
func (client GeoBackupPoliciesClient) Get(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result GeoBackupPolicy, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "Get", nil, "Failure preparing request")
@@ -200,6 +221,16 @@ func (client GeoBackupPoliciesClient) GetResponder(resp *http.Response) (result
// serverName - the name of the server.
// databaseName - the name of the database.
func (client GeoBackupPoliciesClient) ListByDatabase(ctx context.Context, resourceGroupName string, serverName string, databaseName string) (result GeoBackupPolicyListResult, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/GeoBackupPoliciesClient.ListByDatabase")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.ListByDatabasePreparer(ctx, resourceGroupName, serverName, databaseName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.GeoBackupPoliciesClient", "ListByDatabase", nil, "Failure preparing request")
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
index 64efddd7e24c..60206e04c5bb 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/managedinstances.go
@@ -22,6 +22,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/validation"
+ "github.com/Azure/go-autorest/tracing"
"net/http"
)
@@ -49,6 +50,16 @@ func NewManagedInstancesClientWithBaseURI(baseURI string, subscriptionID string)
// managedInstanceName - the name of the managed instance.
// parameters - the requested managed instance resource state.
func (client ManagedInstancesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstance) (result ManagedInstancesCreateOrUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.CreateOrUpdate")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
@@ -103,10 +114,6 @@ func (client ManagedInstancesClient) CreateOrUpdateSender(req *http.Request) (fu
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -130,6 +137,16 @@ func (client ManagedInstancesClient) CreateOrUpdateResponder(resp *http.Response
// from the Azure Resource Manager API or the portal.
// managedInstanceName - the name of the managed instance.
func (client ManagedInstancesClient) Delete(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstancesDeleteFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Delete")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.DeletePreparer(ctx, resourceGroupName, managedInstanceName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Delete", nil, "Failure preparing request")
@@ -175,10 +192,6 @@ func (client ManagedInstancesClient) DeleteSender(req *http.Request) (future Man
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
@@ -201,6 +214,16 @@ func (client ManagedInstancesClient) DeleteResponder(resp *http.Response) (resul
// from the Azure Resource Manager API or the portal.
// managedInstanceName - the name of the managed instance.
func (client ManagedInstancesClient) Get(ctx context.Context, resourceGroupName string, managedInstanceName string) (result ManagedInstance, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Get")
+ defer func() {
+ sc := -1
+ if result.Response.Response != nil {
+ sc = result.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.GetPreparer(ctx, resourceGroupName, managedInstanceName)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Get", nil, "Failure preparing request")
@@ -265,6 +288,16 @@ func (client ManagedInstancesClient) GetResponder(resp *http.Response) (result M
// List gets a list of all managed instances in the subscription.
func (client ManagedInstancesClient) List(ctx context.Context) (result ManagedInstanceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.List")
+ defer func() {
+ sc := -1
+ if result.milr.Response.Response != nil {
+ sc = result.milr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listNextResults
req, err := client.ListPreparer(ctx)
if err != nil {
@@ -327,8 +360,8 @@ func (client ManagedInstancesClient) ListResponder(resp *http.Response) (result
}
// listNextResults retrieves the next set of results, if any.
-func (client ManagedInstancesClient) listNextResults(lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) {
- req, err := lastResults.managedInstanceListResultPreparer()
+func (client ManagedInstancesClient) listNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) {
+ req, err := lastResults.managedInstanceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listNextResults", nil, "Failure preparing next results request")
}
@@ -349,6 +382,16 @@ func (client ManagedInstancesClient) listNextResults(lastResults ManagedInstance
// ListComplete enumerates all values, automatically crossing page boundaries as required.
func (client ManagedInstancesClient) ListComplete(ctx context.Context) (result ManagedInstanceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.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
}
@@ -358,6 +401,16 @@ func (client ManagedInstancesClient) ListComplete(ctx context.Context) (result M
// resourceGroupName - the name of the resource group that contains the resource. You can obtain this value
// from the Azure Resource Manager API or the portal.
func (client ManagedInstancesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultPage, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup")
+ defer func() {
+ sc := -1
+ if result.milr.Response.Response != nil {
+ sc = result.milr.Response.Response.StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
result.fn = client.listByResourceGroupNextResults
req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName)
if err != nil {
@@ -421,8 +474,8 @@ func (client ManagedInstancesClient) ListByResourceGroupResponder(resp *http.Res
}
// listByResourceGroupNextResults retrieves the next set of results, if any.
-func (client ManagedInstancesClient) listByResourceGroupNextResults(lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) {
- req, err := lastResults.managedInstanceListResultPreparer()
+func (client ManagedInstancesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ManagedInstanceListResult) (result ManagedInstanceListResult, err error) {
+ req, err := lastResults.managedInstanceListResultPreparer(ctx)
if err != nil {
return result, autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request")
}
@@ -443,6 +496,16 @@ func (client ManagedInstancesClient) listByResourceGroupNextResults(lastResults
// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.
func (client ManagedInstancesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string) (result ManagedInstanceListResultIterator, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.ListByResourceGroup")
+ 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.ListByResourceGroup(ctx, resourceGroupName)
return
}
@@ -454,6 +517,16 @@ func (client ManagedInstancesClient) ListByResourceGroupComplete(ctx context.Con
// managedInstanceName - the name of the managed instance.
// parameters - the requested managed instance resource state.
func (client ManagedInstancesClient) Update(ctx context.Context, resourceGroupName string, managedInstanceName string, parameters ManagedInstanceUpdate) (result ManagedInstancesUpdateFuture, err error) {
+ if tracing.IsEnabled() {
+ ctx = tracing.StartSpan(ctx, fqdn+"/ManagedInstancesClient.Update")
+ defer func() {
+ sc := -1
+ if result.Response() != nil {
+ sc = result.Response().StatusCode
+ }
+ tracing.EndSpan(ctx, sc, err)
+ }()
+ }
req, err := client.UpdatePreparer(ctx, resourceGroupName, managedInstanceName, parameters)
if err != nil {
err = autorest.NewErrorWithError(err, "sql.ManagedInstancesClient", "Update", nil, "Failure preparing request")
@@ -501,10 +574,6 @@ func (client ManagedInstancesClient) UpdateSender(req *http.Request) (future Man
if err != nil {
return
}
- err = autorest.Respond(resp, azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted))
- if err != nil {
- return
- }
future.Future, err = azure.NewFutureFromResponse(resp)
return
}
diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
index 9226cd55a949..35fc4de49fa5 100644
--- a/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
+++ b/vendor/github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql/models.go
@@ -18,15 +18,20 @@ package sql
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
import (
+ "context"
"encoding/json"
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/azure"
"github.com/Azure/go-autorest/autorest/date"
"github.com/Azure/go-autorest/autorest/to"
+ "github.com/Azure/go-autorest/tracing"
"github.com/satori/go.uuid"
"net/http"
)
+// The package's fully qualified name.
+const fqdn = "github.com/Azure/azure-sdk-for-go/services/preview/sql/mgmt/2015-05-01-preview/sql"
+
// AuthenticationType enumerates the values for authentication type.
type AuthenticationType string
@@ -1032,8 +1037,8 @@ func PossibleVirtualNetworkRuleStateValues() []VirtualNetworkRuleState {
return []VirtualNetworkRuleState{Deleting, Initializing, InProgress, Ready, Unknown}
}
-// BackupLongTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of
-// a long-running operation.
+// BackupLongTermRetentionPoliciesCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type BackupLongTermRetentionPoliciesCreateOrUpdateFuture struct {
azure.Future
}
@@ -1157,7 +1162,8 @@ func (bltrp *BackupLongTermRetentionPolicy) UnmarshalJSON(body []byte) error {
return nil
}
-// BackupLongTermRetentionPolicyListResult represents the response to a list long-term retention policies request.
+// BackupLongTermRetentionPolicyListResult represents the response to a list long-term retention policies
+// request.
type BackupLongTermRetentionPolicyListResult struct {
autorest.Response `json:"-"`
// Value - The list of long-term retention policies in the database.
@@ -1281,8 +1287,8 @@ type BackupLongTermRetentionVaultProperties struct {
RecoveryServicesVaultResourceID *string `json:"recoveryServicesVaultResourceId,omitempty"`
}
-// BackupLongTermRetentionVaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a
-// long-running operation.
+// BackupLongTermRetentionVaultsCreateOrUpdateFuture an abstraction for monitoring and retrieving the
+// results of a long-running operation.
type BackupLongTermRetentionVaultsCreateOrUpdateFuture struct {
azure.Future
}
@@ -1318,7 +1324,8 @@ type CheckNameAvailabilityRequest struct {
Type *string `json:"type,omitempty"`
}
-// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is available.
+// CheckNameAvailabilityResponse a response indicating whether the specified name for a resource is
+// available.
type CheckNameAvailabilityResponse struct {
autorest.Response `json:"-"`
// Available - True if the name is available, otherwise false.
@@ -1553,13 +1560,13 @@ func (dbap *DatabaseBlobAuditingPolicy) UnmarshalJSON(body []byte) error {
// DatabaseBlobAuditingPolicyProperties properties of a database blob auditing policy.
type DatabaseBlobAuditingPolicyProperties struct {
- // State - Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
+ // State - Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'BlobAuditingPolicyStateEnabled', 'BlobAuditingPolicyStateDisabled'
State BlobAuditingPolicyState `json:"state,omitempty"`
// StorageEndpoint - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
StorageEndpoint *string `json:"storageEndpoint,omitempty"`
- // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled, storageAccountAccessKey is required.
+ // StorageAccountAccessKey - Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
StorageAccountAccessKey *string `json:"storageAccountAccessKey,omitempty"`
- // RetentionDays - Specifies the number of days to keep in the audit logs.
+ // RetentionDays - Specifies the number of days to keep in the audit logs in the storage account.
RetentionDays *int32 `json:"retentionDays,omitempty"`
// AuditActionsAndGroups - Specifies the Actions-Groups and Actions to audit.
//
@@ -1608,9 +1615,9 @@ type DatabaseBlobAuditingPolicyProperties struct {
// REFERENCES
//
// The general form for defining an action to be audited is:
- // ON