vendor: update all dependencies to latest versions
This commit is contained in:
+420
-112
@@ -14,9 +14,8 @@ package iothub
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
|
||||
// Changes may cause incorrect behavior and will be lost if the code is
|
||||
// regenerated.
|
||||
// Code generated by Microsoft (R) AutoRest Code Generator.
|
||||
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
||||
|
||||
import (
|
||||
"github.com/Azure/go-autorest/autorest"
|
||||
@@ -25,8 +24,7 @@ import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// ResourceClient is the use this API to manage the IoT hubs in your
|
||||
// subscription.
|
||||
// ResourceClient is the use this API to manage the IoT hubs in your Azure subscription.
|
||||
type ResourceClient struct {
|
||||
ManagementClient
|
||||
}
|
||||
@@ -36,16 +34,14 @@ func NewResourceClient(subscriptionID string) ResourceClient {
|
||||
return NewResourceClientWithBaseURI(DefaultBaseURI, subscriptionID)
|
||||
}
|
||||
|
||||
// NewResourceClientWithBaseURI creates an instance of the ResourceClient
|
||||
// client.
|
||||
// NewResourceClientWithBaseURI creates an instance of the ResourceClient client.
|
||||
func NewResourceClientWithBaseURI(baseURI string, subscriptionID string) ResourceClient {
|
||||
return ResourceClient{NewWithBaseURI(baseURI, subscriptionID)}
|
||||
}
|
||||
|
||||
// CheckNameAvailability check if an IoT hub name is available.
|
||||
//
|
||||
// operationInputs is set the name parameter in the OperationInputs structure
|
||||
// to the name of the IoT hub to check.
|
||||
// operationInputs is set the name parameter in the OperationInputs structure to the name of the IoT hub to check.
|
||||
func (client ResourceClient) CheckNameAvailability(operationInputs OperationInputs) (result NameAvailabilityInfo, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: operationInputs,
|
||||
@@ -80,7 +76,7 @@ func (client ResourceClient) CheckNameAvailabilityPreparer(operationInputs Opera
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -114,13 +110,11 @@ func (client ResourceClient) CheckNameAvailabilityResponder(resp *http.Response)
|
||||
return
|
||||
}
|
||||
|
||||
// CreateEventHubConsumerGroup add a consumer group to an Event Hub-compatible
|
||||
// endpoint in an IoT hub.
|
||||
// CreateEventHubConsumerGroup add a consumer group to an Event Hub-compatible endpoint in an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the
|
||||
// name of the Event Hub-compatible endpoint in the IoT hub. name is the name
|
||||
// of the consumer group to add.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the
|
||||
// consumer group to add.
|
||||
func (client ResourceClient) CreateEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) {
|
||||
req, err := client.CreateEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name)
|
||||
if err != nil {
|
||||
@@ -153,7 +147,7 @@ func (client ResourceClient) CreateEventHubConsumerGroupPreparer(resourceGroupNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -185,16 +179,13 @@ func (client ResourceClient) CreateEventHubConsumerGroupResponder(resp *http.Res
|
||||
return
|
||||
}
|
||||
|
||||
// CreateOrUpdate create or update the metadata of an Iot hub. The usual
|
||||
// pattern to modify a property is to retrieve the IoT hub metadata and
|
||||
// security metadata, and then combine them with the modified values in a new
|
||||
// body to update the IoT hub. This method may poll for completion. Polling can
|
||||
// be canceled by passing the cancel channel argument. The channel will be used
|
||||
// to cancel polling and any outstanding HTTP requests.
|
||||
// CreateOrUpdate create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve
|
||||
// the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update
|
||||
// the IoT hub. This method may poll for completion. Polling can be canceled by passing the cancel channel argument.
|
||||
// The channel will be used to cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub to create or update.
|
||||
// iotHubDescription is the IoT hub metadata and security metadata.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub to create or update. iotHubDescription is the IoT hub metadata and security metadata.
|
||||
func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceName string, iotHubDescription Description, cancel <-chan struct{}) (<-chan Description, <-chan error) {
|
||||
resultChan := make(chan Description, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -203,18 +194,28 @@ func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceNa
|
||||
Constraints: []validation.Constraint{{Target: "iotHubDescription.Subscriptionid", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "iotHubDescription.Resourcegroup", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
|
||||
}},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute.Source", Name: validation.Null, Rule: true, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.MaxItems, Rule: 1, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.Routing.FallbackRoute.EndpointNames", Name: validation.MinItems, Rule: 1, Chain: nil},
|
||||
}},
|
||||
}},
|
||||
{Target: "iotHubDescription.Properties.Routing.FallbackRoute.IsEnabled", Name: validation.Null, Rule: true, Chain: nil},
|
||||
}},
|
||||
}},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
|
||||
}},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.Feedback", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.Null, Rule: false,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMaximum, Rule: 100, Chain: nil},
|
||||
{Target: "iotHubDescription.Properties.CloudToDevice.Feedback.MaxDeliveryCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
|
||||
}},
|
||||
}},
|
||||
}},
|
||||
}},
|
||||
{Target: "iotHubDescription.Sku", Name: validation.Null, Rule: true,
|
||||
Chain: []validation.Constraint{{Target: "iotHubDescription.Sku.Capacity", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
|
||||
@@ -228,8 +229,10 @@ func (client ResourceClient) CreateOrUpdate(resourceGroupName string, resourceNa
|
||||
var err error
|
||||
var result Description
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -262,7 +265,7 @@ func (client ResourceClient) CreateOrUpdatePreparer(resourceGroupName string, re
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -298,12 +301,11 @@ func (client ResourceClient) CreateOrUpdateResponder(resp *http.Response) (resul
|
||||
return
|
||||
}
|
||||
|
||||
// Delete delete an IoT hub. This method may poll for completion. Polling can
|
||||
// be canceled by passing the cancel channel argument. The channel will be used
|
||||
// to cancel polling and any outstanding HTTP requests.
|
||||
// Delete delete an IoT hub. This method may poll for completion. Polling can be canceled by passing the cancel channel
|
||||
// argument. The channel will be used to cancel polling and any outstanding HTTP requests.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub to delete.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub to delete.
|
||||
func (client ResourceClient) Delete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SetObject, <-chan error) {
|
||||
resultChan := make(chan SetObject, 1)
|
||||
errChan := make(chan error, 1)
|
||||
@@ -311,8 +313,10 @@ func (client ResourceClient) Delete(resourceGroupName string, resourceName strin
|
||||
var err error
|
||||
var result SetObject
|
||||
defer func() {
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
}
|
||||
resultChan <- result
|
||||
errChan <- err
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
@@ -345,7 +349,7 @@ func (client ResourceClient) DeletePreparer(resourceGroupName string, resourceNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -379,13 +383,11 @@ func (client ResourceClient) DeleteResponder(resp *http.Response) (result SetObj
|
||||
return
|
||||
}
|
||||
|
||||
// DeleteEventHubConsumerGroup delete a consumer group from an Event
|
||||
// Hub-compatible endpoint in an IoT hub.
|
||||
// DeleteEventHubConsumerGroup delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the
|
||||
// name of the Event Hub-compatible endpoint in the IoT hub. name is the name
|
||||
// of the consumer group to delete.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the
|
||||
// consumer group to delete.
|
||||
func (client ResourceClient) DeleteEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result autorest.Response, err error) {
|
||||
req, err := client.DeleteEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name)
|
||||
if err != nil {
|
||||
@@ -418,7 +420,7 @@ func (client ResourceClient) DeleteEventHubConsumerGroupPreparer(resourceGroupNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -449,13 +451,12 @@ func (client ResourceClient) DeleteEventHubConsumerGroupResponder(resp *http.Res
|
||||
return
|
||||
}
|
||||
|
||||
// ExportDevices exports all the device identities in the IoT hub identity
|
||||
// registry to an Azure Storage blob container. For more information, see:
|
||||
// ExportDevices exports all the device identities in the IoT hub identity registry to an Azure Storage blob container.
|
||||
// For more information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. exportDevicesParameters is the
|
||||
// parameters that specify the export devices operation.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. exportDevicesParameters is the parameters that specify the export devices operation.
|
||||
func (client ResourceClient) ExportDevices(resourceGroupName string, resourceName string, exportDevicesParameters ExportDevicesRequest) (result JobResponse, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: exportDevicesParameters,
|
||||
@@ -493,7 +494,7 @@ func (client ResourceClient) ExportDevicesPreparer(resourceGroupName string, res
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -529,8 +530,8 @@ func (client ResourceClient) ExportDevicesResponder(resp *http.Response) (result
|
||||
|
||||
// Get get the non-security related metadata of an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) Get(resourceGroupName string, resourceName string) (result Description, err error) {
|
||||
req, err := client.GetPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -561,7 +562,7 @@ func (client ResourceClient) GetPreparer(resourceGroupName string, resourceName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -593,13 +594,11 @@ func (client ResourceClient) GetResponder(resp *http.Response) (result Descripti
|
||||
return
|
||||
}
|
||||
|
||||
// GetEventHubConsumerGroup get a consumer group from the Event Hub-compatible
|
||||
// device-to-cloud endpoint for an IoT hub.
|
||||
// GetEventHubConsumerGroup get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the
|
||||
// name of the Event Hub-compatible endpoint in the IoT hub. name is the name
|
||||
// of the consumer group to retrieve.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint in the IoT hub. name is the name of the
|
||||
// consumer group to retrieve.
|
||||
func (client ResourceClient) GetEventHubConsumerGroup(resourceGroupName string, resourceName string, eventHubEndpointName string, name string) (result EventHubConsumerGroupInfo, err error) {
|
||||
req, err := client.GetEventHubConsumerGroupPreparer(resourceGroupName, resourceName, eventHubEndpointName, name)
|
||||
if err != nil {
|
||||
@@ -632,7 +631,7 @@ func (client ResourceClient) GetEventHubConsumerGroupPreparer(resourceGroupName
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -667,8 +666,8 @@ func (client ResourceClient) GetEventHubConsumerGroupResponder(resp *http.Respon
|
||||
// GetJob get the details of a job from an IoT hub. For more information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. jobID is the job identifier.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. jobID is the job identifier.
|
||||
func (client ResourceClient) GetJob(resourceGroupName string, resourceName string, jobID string) (result JobResponse, err error) {
|
||||
req, err := client.GetJobPreparer(resourceGroupName, resourceName, jobID)
|
||||
if err != nil {
|
||||
@@ -700,7 +699,7 @@ func (client ResourceClient) GetJobPreparer(resourceGroupName string, resourceNa
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -732,13 +731,11 @@ func (client ResourceClient) GetJobResponder(resp *http.Response) (result JobRes
|
||||
return
|
||||
}
|
||||
|
||||
// GetKeysForKeyName get a shared access policy by name from an IoT hub. For
|
||||
// more information, see:
|
||||
// GetKeysForKeyName get a shared access policy by name from an IoT hub. For more information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. keyName is the name of the
|
||||
// shared access policy.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. keyName is the name of the shared access policy.
|
||||
func (client ResourceClient) GetKeysForKeyName(resourceGroupName string, resourceName string, keyName string) (result SharedAccessSignatureAuthorizationRule, err error) {
|
||||
req, err := client.GetKeysForKeyNamePreparer(resourceGroupName, resourceName, keyName)
|
||||
if err != nil {
|
||||
@@ -770,7 +767,7 @@ func (client ResourceClient) GetKeysForKeyNamePreparer(resourceGroupName string,
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -804,8 +801,8 @@ func (client ResourceClient) GetKeysForKeyNameResponder(resp *http.Response) (re
|
||||
|
||||
// GetQuotaMetrics get the quota metrics for an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) GetQuotaMetrics(resourceGroupName string, resourceName string) (result QuotaMetricInfoListResult, err error) {
|
||||
req, err := client.GetQuotaMetricsPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -836,7 +833,7 @@ func (client ResourceClient) GetQuotaMetricsPreparer(resourceGroupName string, r
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -892,10 +889,55 @@ func (client ResourceClient) GetQuotaMetricsNextResults(lastResults QuotaMetricI
|
||||
return
|
||||
}
|
||||
|
||||
// GetQuotaMetricsComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) GetQuotaMetricsComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan QuotaMetricInfo, <-chan error) {
|
||||
resultChan := make(chan QuotaMetricInfo)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.GetQuotaMetrics(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.GetQuotaMetricsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// GetStats get the statistics from an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) GetStats(resourceGroupName string, resourceName string) (result RegistryStatistics, err error) {
|
||||
req, err := client.GetStatsPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -926,7 +968,7 @@ func (client ResourceClient) GetStatsPreparer(resourceGroupName string, resource
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -960,8 +1002,8 @@ func (client ResourceClient) GetStatsResponder(resp *http.Response) (result Regi
|
||||
|
||||
// GetValidSkus get the list of valid SKUs for an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) GetValidSkus(resourceGroupName string, resourceName string) (result SkuDescriptionListResult, err error) {
|
||||
req, err := client.GetValidSkusPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -992,7 +1034,7 @@ func (client ResourceClient) GetValidSkusPreparer(resourceGroupName string, reso
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1048,13 +1090,57 @@ func (client ResourceClient) GetValidSkusNextResults(lastResults SkuDescriptionL
|
||||
return
|
||||
}
|
||||
|
||||
// ImportDevices import, update, or delete device identities in the IoT hub
|
||||
// identity registry from a blob. For more information, see:
|
||||
// GetValidSkusComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) GetValidSkusComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SkuDescription, <-chan error) {
|
||||
resultChan := make(chan SkuDescription)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.GetValidSkus(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.GetValidSkusNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ImportDevices import, update, or delete device identities in the IoT hub identity registry from a blob. For more
|
||||
// information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. importDevicesParameters is the
|
||||
// parameters that specify the import devices operation.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. importDevicesParameters is the parameters that specify the import devices operation.
|
||||
func (client ResourceClient) ImportDevices(resourceGroupName string, resourceName string, importDevicesParameters ImportDevicesRequest) (result JobResponse, err error) {
|
||||
if err := validation.Validate([]validation.Validation{
|
||||
{TargetValue: importDevicesParameters,
|
||||
@@ -1092,7 +1178,7 @@ func (client ResourceClient) ImportDevicesPreparer(resourceGroupName string, res
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1128,8 +1214,7 @@ func (client ResourceClient) ImportDevicesResponder(resp *http.Response) (result
|
||||
|
||||
// ListByResourceGroup get all the IoT hubs in a resource group.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hubs.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hubs.
|
||||
func (client ResourceClient) ListByResourceGroup(resourceGroupName string) (result DescriptionListResult, err error) {
|
||||
req, err := client.ListByResourceGroupPreparer(resourceGroupName)
|
||||
if err != nil {
|
||||
@@ -1159,7 +1244,7 @@ func (client ResourceClient) ListByResourceGroupPreparer(resourceGroupName strin
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1215,6 +1300,51 @@ func (client ResourceClient) ListByResourceGroupNextResults(lastResults Descript
|
||||
return
|
||||
}
|
||||
|
||||
// ListByResourceGroupComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Description, <-chan error) {
|
||||
resultChan := make(chan Description)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListByResourceGroup(resourceGroupName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListByResourceGroupNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListBySubscription get all the IoT hubs in a subscription.
|
||||
func (client ResourceClient) ListBySubscription() (result DescriptionListResult, err error) {
|
||||
req, err := client.ListBySubscriptionPreparer()
|
||||
@@ -1244,7 +1374,7 @@ func (client ResourceClient) ListBySubscriptionPreparer() (*http.Request, error)
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1300,12 +1430,56 @@ func (client ResourceClient) ListBySubscriptionNextResults(lastResults Descripti
|
||||
return
|
||||
}
|
||||
|
||||
// ListEventHubConsumerGroups get a list of the consumer groups in the Event
|
||||
// Hub-compatible device-to-cloud endpoint in an IoT hub.
|
||||
// ListBySubscriptionComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) ListBySubscriptionComplete(cancel <-chan struct{}) (<-chan Description, <-chan error) {
|
||||
resultChan := make(chan Description)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListBySubscription()
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListBySubscriptionNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListEventHubConsumerGroups get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in
|
||||
// an IoT hub.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub. eventHubEndpointName is the
|
||||
// name of the Event Hub-compatible endpoint.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub. eventHubEndpointName is the name of the Event Hub-compatible endpoint.
|
||||
func (client ResourceClient) ListEventHubConsumerGroups(resourceGroupName string, resourceName string, eventHubEndpointName string) (result EventHubConsumerGroupsListResult, err error) {
|
||||
req, err := client.ListEventHubConsumerGroupsPreparer(resourceGroupName, resourceName, eventHubEndpointName)
|
||||
if err != nil {
|
||||
@@ -1337,7 +1511,7 @@ func (client ResourceClient) ListEventHubConsumerGroupsPreparer(resourceGroupNam
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1393,12 +1567,56 @@ func (client ResourceClient) ListEventHubConsumerGroupsNextResults(lastResults E
|
||||
return
|
||||
}
|
||||
|
||||
// ListJobs get a list of all the jobs in an IoT hub. For more information,
|
||||
// see:
|
||||
// ListEventHubConsumerGroupsComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) ListEventHubConsumerGroupsComplete(resourceGroupName string, resourceName string, eventHubEndpointName string, cancel <-chan struct{}) (<-chan string, <-chan error) {
|
||||
resultChan := make(chan string)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListEventHubConsumerGroups(resourceGroupName, resourceName, eventHubEndpointName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListEventHubConsumerGroupsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListJobs get a list of all the jobs in an IoT hub. For more information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) ListJobs(resourceGroupName string, resourceName string) (result JobResponseListResult, err error) {
|
||||
req, err := client.ListJobsPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -1429,7 +1647,7 @@ func (client ResourceClient) ListJobsPreparer(resourceGroupName string, resource
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1485,11 +1703,56 @@ func (client ResourceClient) ListJobsNextResults(lastResults JobResponseListResu
|
||||
return
|
||||
}
|
||||
|
||||
// ListKeys get the security metadata for an IoT hub. For more information,
|
||||
// see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
|
||||
// ListJobsComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) ListJobsComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan JobResponse, <-chan error) {
|
||||
resultChan := make(chan JobResponse)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListJobs(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListJobsNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
// ListKeys get the security metadata for an IoT hub. For more information, see:
|
||||
// https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.
|
||||
//
|
||||
// resourceGroupName is the name of the resource group that contains the IoT
|
||||
// hub. resourceName is the name of the IoT hub.
|
||||
// resourceGroupName is the name of the resource group that contains the IoT hub. resourceName is the name of the IoT
|
||||
// hub.
|
||||
func (client ResourceClient) ListKeys(resourceGroupName string, resourceName string) (result SharedAccessSignatureAuthorizationRuleListResult, err error) {
|
||||
req, err := client.ListKeysPreparer(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
@@ -1520,7 +1783,7 @@ func (client ResourceClient) ListKeysPreparer(resourceGroupName string, resource
|
||||
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
|
||||
}
|
||||
|
||||
const APIVersion = "2016-02-03"
|
||||
const APIVersion = "2017-07-01"
|
||||
queryParameters := map[string]interface{}{
|
||||
"api-version": APIVersion,
|
||||
}
|
||||
@@ -1575,3 +1838,48 @@ func (client ResourceClient) ListKeysNextResults(lastResults SharedAccessSignatu
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// ListKeysComplete gets all elements from the list without paging.
|
||||
func (client ResourceClient) ListKeysComplete(resourceGroupName string, resourceName string, cancel <-chan struct{}) (<-chan SharedAccessSignatureAuthorizationRule, <-chan error) {
|
||||
resultChan := make(chan SharedAccessSignatureAuthorizationRule)
|
||||
errChan := make(chan error, 1)
|
||||
go func() {
|
||||
defer func() {
|
||||
close(resultChan)
|
||||
close(errChan)
|
||||
}()
|
||||
list, err := client.ListKeys(resourceGroupName, resourceName)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
for list.NextLink != nil {
|
||||
list, err = client.ListKeysNextResults(list)
|
||||
if err != nil {
|
||||
errChan <- err
|
||||
return
|
||||
}
|
||||
if list.Value != nil {
|
||||
for _, item := range *list.Value {
|
||||
select {
|
||||
case <-cancel:
|
||||
return
|
||||
case resultChan <- item:
|
||||
// Intentionally left blank
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
return resultChan, errChan
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user