vendor: update all dependencies to latest versions

This commit is contained in:
Nick Craig-Wood
2017-09-30 15:27:27 +01:00
parent 911d121bb9
commit b017fcfe9a
3048 changed files with 537055 additions and 189679 deletions
+4 -6
View File
@@ -1,7 +1,6 @@
// Package relay implements the Azure ARM Relay service API version 2016-07-01.
// Package relay implements the Azure ARM Relay service API version 2017-04-01.
//
// Use these API to manage Azure Relay resources through Azure Resources
// Manager.
// Use these API to manage Azure Relay resources through Azure Resource Manager.
package relay
// Copyright (c) Microsoft and contributors. All rights reserved.
@@ -18,9 +17,8 @@ package relay
// 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"
+167 -113
View File
@@ -14,9 +14,8 @@ package relay
// 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,31 +24,25 @@ import (
"net/http"
)
// HybridConnectionsClient is the use these API to manage Azure Relay resources
// through Azure Resources Manager.
// HybridConnectionsClient is the use these API to manage Azure Relay resources through Azure Resource Manager.
type HybridConnectionsClient struct {
ManagementClient
}
// NewHybridConnectionsClient creates an instance of the
// HybridConnectionsClient client.
// NewHybridConnectionsClient creates an instance of the HybridConnectionsClient client.
func NewHybridConnectionsClient(subscriptionID string) HybridConnectionsClient {
return NewHybridConnectionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewHybridConnectionsClientWithBaseURI creates an instance of the
// HybridConnectionsClient client.
// NewHybridConnectionsClientWithBaseURI creates an instance of the HybridConnectionsClient client.
func NewHybridConnectionsClientWithBaseURI(baseURI string, subscriptionID string) HybridConnectionsClient {
return HybridConnectionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or Updates a service HybridConnection. This operation
// is idempotent.
// CreateOrUpdate creates or updates a service hybrid connection. This operation is idempotent.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. parameters is parameters supplied to create a
// HybridConnection.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. parameters is parameters supplied to create a hybrid connection.
func (client HybridConnectionsClient) CreateOrUpdate(resourceGroupName string, namespaceName string, hybridConnectionName string, parameters HybridConnection) (result HybridConnection, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -59,13 +52,12 @@ func (client HybridConnectionsClient) CreateOrUpdate(resourceGroupName string, n
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.HybridConnectionProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil},
{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 1, Chain: nil},
{Target: "parameters.HybridConnectionProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "CreateOrUpdate")
@@ -101,7 +93,7 @@ func (client HybridConnectionsClient) CreateOrUpdatePreparer(resourceGroupName s
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -110,7 +102,7 @@ func (client HybridConnectionsClient) CreateOrUpdatePreparer(resourceGroupName s
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -135,13 +127,11 @@ func (client HybridConnectionsClient) CreateOrUpdateResponder(resp *http.Respons
return
}
// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for
// a HybridConnection
// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. authorizationRuleName is the authorizationRule
// name. parameters is the authorization rule parameters
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. parameters
// is the authorization rule parameters.
func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -151,14 +141,12 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRule(resourceGr
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "CreateOrUpdateAuthorizationRule")
@@ -195,7 +183,7 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRulePreparer(re
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -204,7 +192,7 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRulePreparer(re
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -229,11 +217,10 @@ func (client HybridConnectionsClient) CreateOrUpdateAuthorizationRuleResponder(r
return
}
// Delete deletes a HybridConnection .
// Delete deletes a hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name.
func (client HybridConnectionsClient) Delete(resourceGroupName string, namespaceName string, hybridConnectionName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -243,8 +230,7 @@ func (client HybridConnectionsClient) Delete(resourceGroupName string, namespace
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "Delete")
}
@@ -278,7 +264,7 @@ func (client HybridConnectionsClient) DeletePreparer(resourceGroupName string, n
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -286,7 +272,7 @@ func (client HybridConnectionsClient) DeletePreparer(resourceGroupName string, n
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -309,12 +295,10 @@ func (client HybridConnectionsClient) DeleteResponder(resp *http.Response) (resu
return
}
// DeleteAuthorizationRule deletes a HybridConnection authorization rule
// DeleteAuthorizationRule deletes a hybrid connection authorization rule.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. authorizationRuleName is the authorizationRule
// name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name.
func (client HybridConnectionsClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -324,11 +308,9 @@ func (client HybridConnectionsClient) DeleteAuthorizationRule(resourceGroupName
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "DeleteAuthorizationRule")
}
@@ -363,7 +345,7 @@ func (client HybridConnectionsClient) DeleteAuthorizationRulePreparer(resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -371,7 +353,7 @@ func (client HybridConnectionsClient) DeleteAuthorizationRulePreparer(resourceGr
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -394,11 +376,10 @@ func (client HybridConnectionsClient) DeleteAuthorizationRuleResponder(resp *htt
return
}
// Get returns the description for the specified HybridConnection.
// Get returns the description for the specified hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name.
func (client HybridConnectionsClient) Get(resourceGroupName string, namespaceName string, hybridConnectionName string) (result HybridConnection, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -408,8 +389,7 @@ func (client HybridConnectionsClient) Get(resourceGroupName string, namespaceNam
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "Get")
}
@@ -443,7 +423,7 @@ func (client HybridConnectionsClient) GetPreparer(resourceGroupName string, name
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -451,7 +431,7 @@ func (client HybridConnectionsClient) GetPreparer(resourceGroupName string, name
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -475,13 +455,10 @@ func (client HybridConnectionsClient) GetResponder(resp *http.Response) (result
return
}
// GetAuthorizationRule hybridConnection authorizationRule for a
// HybridConnection by name.
// GetAuthorizationRule hybrid connection authorization rule for a hybrid connection by name.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. authorizationRuleName is the authorizationRule
// name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name.
func (client HybridConnectionsClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -491,11 +468,9 @@ func (client HybridConnectionsClient) GetAuthorizationRule(resourceGroupName str
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "GetAuthorizationRule")
}
@@ -530,7 +505,7 @@ func (client HybridConnectionsClient) GetAuthorizationRulePreparer(resourceGroup
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -538,7 +513,7 @@ func (client HybridConnectionsClient) GetAuthorizationRulePreparer(resourceGroup
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -562,11 +537,10 @@ func (client HybridConnectionsClient) GetAuthorizationRuleResponder(resp *http.R
return
}
// ListAuthorizationRules authorization rules for a HybridConnection.
// ListAuthorizationRules authorization rules for a hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name.
func (client HybridConnectionsClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, hybridConnectionName string) (result AuthorizationRuleListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -576,8 +550,7 @@ func (client HybridConnectionsClient) ListAuthorizationRules(resourceGroupName s
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "ListAuthorizationRules")
}
@@ -611,7 +584,7 @@ func (client HybridConnectionsClient) ListAuthorizationRulesPreparer(resourceGro
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -619,7 +592,7 @@ func (client HybridConnectionsClient) ListAuthorizationRulesPreparer(resourceGro
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -667,10 +640,54 @@ func (client HybridConnectionsClient) ListAuthorizationRulesNextResults(lastResu
return
}
// ListByNamespace lists the HybridConnection within the namespace.
// ListAuthorizationRulesComplete gets all elements from the list without paging.
func (client HybridConnectionsClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, hybridConnectionName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) {
resultChan := make(chan AuthorizationRule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, hybridConnectionName)
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.ListAuthorizationRulesNextResults(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
}
// ListByNamespace lists the hybrid connection within the namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
func (client HybridConnectionsClient) ListByNamespace(resourceGroupName string, namespaceName string) (result HybridConnectionListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -711,7 +728,7 @@ func (client HybridConnectionsClient) ListByNamespacePreparer(resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -719,7 +736,7 @@ func (client HybridConnectionsClient) ListByNamespacePreparer(resourceGroupName
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -767,13 +784,56 @@ func (client HybridConnectionsClient) ListByNamespaceNextResults(lastResults Hyb
return
}
// ListKeys primary and Secondary ConnectionStrings to the HybridConnection.
// ListByNamespaceComplete gets all elements from the list without paging.
func (client HybridConnectionsClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan HybridConnection, <-chan error) {
resultChan := make(chan HybridConnection)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByNamespace(resourceGroupName, namespaceName)
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.ListByNamespaceNextResults(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 primary and secondary connection strings to the hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. authorizationRuleName is the authorizationRule
// name.
func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name.
func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -782,11 +842,9 @@ func (client HybridConnectionsClient) ListKeys(resourceGroupName string, namespa
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "ListKeys")
}
@@ -821,7 +879,7 @@ func (client HybridConnectionsClient) ListKeysPreparer(resourceGroupName string,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -829,7 +887,7 @@ func (client HybridConnectionsClient) ListKeysPreparer(resourceGroupName string,
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/ListKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -842,7 +900,7 @@ func (client HybridConnectionsClient) ListKeysSender(req *http.Request) (*http.R
// ListKeysResponder handles the response to the ListKeys request. The method always
// closes the http.Response Body.
func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -853,14 +911,12 @@ func (client HybridConnectionsClient) ListKeysResponder(resp *http.Response) (re
return
}
// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the
// HybridConnection
// RegenerateKeys regenerates the primary or secondary connection strings to the hybrid connection.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name hybridConnectionName is
// the hybrid connection name. authorizationRuleName is the authorizationRule
// name. parameters is parameters supplied to regenerate Auth Rule.
func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// hybridConnectionName is the hybrid connection name. authorizationRuleName is the authorization rule name. parameters
// is parameters supplied to regenerate authorization rule.
func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -869,11 +925,9 @@ func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, n
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: hybridConnectionName,
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "hybridConnectionName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.HybridConnectionsClient", "RegenerateKeys")
}
@@ -899,7 +953,7 @@ func (client HybridConnectionsClient) RegenerateKeys(resourceGroupName string, n
}
// RegenerateKeysPreparer prepares the RegenerateKeys request.
func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) {
func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, hybridConnectionName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"hybridConnectionName": autorest.Encode("path", hybridConnectionName),
@@ -908,7 +962,7 @@ func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName s
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -917,7 +971,7 @@ func (client HybridConnectionsClient) RegenerateKeysPreparer(resourceGroupName s
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/HybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/hybridConnections/{hybridConnectionName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -931,7 +985,7 @@ func (client HybridConnectionsClient) RegenerateKeysSender(req *http.Request) (*
// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
// closes the http.Response Body.
func (client HybridConnectionsClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client HybridConnectionsClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
+116 -84
View File
@@ -14,9 +14,8 @@ package relay
// 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"
@@ -37,14 +36,32 @@ const (
Send AccessRights = "Send"
)
// PolicyKey enumerates the values for policy key.
type PolicyKey string
// KeyType enumerates the values for key type.
type KeyType string
const (
// PrimaryKey specifies the primary key state for policy key.
PrimaryKey PolicyKey = "PrimaryKey"
// SecondaryKey specifies the secondary key state for policy key.
SecondaryKey PolicyKey = "SecondaryKey"
// PrimaryKey specifies the primary key state for key type.
PrimaryKey KeyType = "PrimaryKey"
// SecondaryKey specifies the secondary key state for key type.
SecondaryKey KeyType = "SecondaryKey"
)
// ProvisioningStateEnum enumerates the values for provisioning state enum.
type ProvisioningStateEnum string
const (
// Created specifies the created state for provisioning state enum.
Created ProvisioningStateEnum = "Created"
// Deleted specifies the deleted state for provisioning state enum.
Deleted ProvisioningStateEnum = "Deleted"
// Failed specifies the failed state for provisioning state enum.
Failed ProvisioningStateEnum = "Failed"
// Succeeded specifies the succeeded state for provisioning state enum.
Succeeded ProvisioningStateEnum = "Succeeded"
// Unknown specifies the unknown state for provisioning state enum.
Unknown ProvisioningStateEnum = "Unknown"
// Updating specifies the updating state for provisioning state enum.
Updating ProvisioningStateEnum = "Updating"
)
// RelaytypeEnum enumerates the values for relaytype enum.
@@ -57,38 +74,35 @@ const (
NetTCP RelaytypeEnum = "NetTcp"
)
// SkuTier enumerates the values for sku tier.
type SkuTier string
const (
// Standard specifies the standard state for sku tier.
Standard SkuTier = "Standard"
)
// UnavailableReason enumerates the values for unavailable reason.
type UnavailableReason string
const (
// InvalidName specifies the invalid name state for unavailable reason.
InvalidName UnavailableReason = "InvalidName"
// NameInLockdown specifies the name in lockdown state for unavailable
// reason.
// NameInLockdown specifies the name in lockdown state for unavailable reason.
NameInLockdown UnavailableReason = "NameInLockdown"
// NameInUse specifies the name in use state for unavailable reason.
NameInUse UnavailableReason = "NameInUse"
// None specifies the none state for unavailable reason.
None UnavailableReason = "None"
// SubscriptionIsDisabled specifies the subscription is disabled state for
// unavailable reason.
// SubscriptionIsDisabled specifies the subscription is disabled state for unavailable reason.
SubscriptionIsDisabled UnavailableReason = "SubscriptionIsDisabled"
// TooManyNamespaceInCurrentSubscription specifies the too many namespace
// in current subscription state for unavailable reason.
// TooManyNamespaceInCurrentSubscription specifies the too many namespace in current subscription state for unavailable
// reason.
TooManyNamespaceInCurrentSubscription UnavailableReason = "TooManyNamespaceInCurrentSubscription"
)
// AuthorizationRule is description of a Namespace AuthorizationRules.
type AuthorizationRule struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*AuthorizationRuleProperties `json:"properties,omitempty"`
}
// AuthorizationRuleKeys is namespace/Relay Connection String
type AuthorizationRuleKeys struct {
// AccessKeys is namespace/Relay Connection String
type AccessKeys struct {
autorest.Response `json:"-"`
PrimaryConnectionString *string `json:"primaryConnectionString,omitempty"`
SecondaryConnectionString *string `json:"secondaryConnectionString,omitempty"`
@@ -97,7 +111,21 @@ type AuthorizationRuleKeys struct {
KeyName *string `json:"keyName,omitempty"`
}
// AuthorizationRuleListResult is the response of the List Namespace operation.
// AuthorizationRule is description of a namespace authorization rule.
type AuthorizationRule struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
*AuthorizationRuleProperties `json:"properties,omitempty"`
}
// AuthorizationRuleProperties is authorization rule properties.
type AuthorizationRuleProperties struct {
Rights *[]AccessRights `json:"rights,omitempty"`
}
// AuthorizationRuleListResult is the response from the list namespace operation.
type AuthorizationRuleListResult struct {
autorest.Response `json:"-"`
Value *[]AuthorizationRule `json:"value,omitempty"`
@@ -116,34 +144,27 @@ func (client AuthorizationRuleListResult) AuthorizationRuleListResultPreparer()
autorest.WithBaseURL(to.String(client.NextLink)))
}
// AuthorizationRuleProperties is authorizationRule properties.
type AuthorizationRuleProperties struct {
Rights *[]AccessRights `json:"rights,omitempty"`
}
// CheckNameAvailability is description of a Check Name availability request
// properties.
// CheckNameAvailability is description of the check name availability request properties.
type CheckNameAvailability struct {
Name *string `json:"name,omitempty"`
}
// CheckNameAvailabilityResult is description of a Check Name availability
// request properties.
// CheckNameAvailabilityResult is description of the check name availability request properties.
type CheckNameAvailabilityResult struct {
autorest.Response `json:"-"`
Message *string `json:"message,omitempty"`
NameAvailable *bool `json:"nameAvailable,omitempty"`
Reason UnavailableReason `json:"reason,omitempty"`
Message *string `json:"message,omitempty"`
}
// ErrorResponse is error reponse indicates Relay service is not able to
// process the incoming request. The reason is provided in the error message.
// ErrorResponse is error reponse indicates Relay service is not able to process the incoming request. The reason is
// provided in the error message.
type ErrorResponse struct {
Code *string `json:"code,omitempty"`
Message *string `json:"message,omitempty"`
}
// HybridConnection is description of HybridConnection Resource.
// HybridConnection is description of hybrid connection resource.
type HybridConnection struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -152,8 +173,16 @@ type HybridConnection struct {
*HybridConnectionProperties `json:"properties,omitempty"`
}
// HybridConnectionListResult is the response of the List HybridConnection
// operation.
// HybridConnectionProperties is properties of the HybridConnection.
type HybridConnectionProperties struct {
CreatedAt *date.Time `json:"createdAt,omitempty"`
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
ListenerCount *int32 `json:"listenerCount,omitempty"`
RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"`
UserMetadata *string `json:"userMetadata,omitempty"`
}
// HybridConnectionListResult is the response of the list hybrid connection operation.
type HybridConnectionListResult struct {
autorest.Response `json:"-"`
Value *[]HybridConnection `json:"value,omitempty"`
@@ -172,16 +201,7 @@ func (client HybridConnectionListResult) HybridConnectionListResultPreparer() (*
autorest.WithBaseURL(to.String(client.NextLink)))
}
// HybridConnectionProperties is properties of the HybridConnection.
type HybridConnectionProperties struct {
CreatedAt *date.Time `json:"createdAt,omitempty"`
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
ListenerCount *int32 `json:"listenerCount,omitempty"`
RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"`
UserMetadata *string `json:"userMetadata,omitempty"`
}
// Namespace is description of a Namespace resource.
// Namespace is description of a namespace resource.
type Namespace struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -193,7 +213,7 @@ type Namespace struct {
*NamespaceProperties `json:"properties,omitempty"`
}
// NamespaceListResult is the response of the List Namespace operation.
// NamespaceListResult is the response from the list namespace operation.
type NamespaceListResult struct {
autorest.Response `json:"-"`
Value *[]Namespace `json:"value,omitempty"`
@@ -212,23 +232,16 @@ func (client NamespaceListResult) NamespaceListResultPreparer() (*http.Request,
autorest.WithBaseURL(to.String(client.NextLink)))
}
// NamespaceProperties is properties of the Namespace.
// NamespaceProperties is properties of the namespace.
type NamespaceProperties struct {
ProvisioningState *string `json:"provisioningState,omitempty"`
CreatedAt *date.Time `json:"createdAt,omitempty"`
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"`
MetricID *string `json:"metricId,omitempty"`
ProvisioningState ProvisioningStateEnum `json:"provisioningState,omitempty"`
CreatedAt *date.Time `json:"createdAt,omitempty"`
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
ServiceBusEndpoint *string `json:"serviceBusEndpoint,omitempty"`
MetricID *string `json:"metricId,omitempty"`
}
// NamespaceUpdateParameter is parameters supplied to the Patch Namespace
// operation.
type NamespaceUpdateParameter struct {
Tags *map[string]*string `json:"tags,omitempty"`
Sku *Sku `json:"sku,omitempty"`
}
// Operation is a EventHub REST API operation
// Operation is a Relay REST API operation.
type Operation struct {
Name *string `json:"name,omitempty"`
Display *OperationDisplay `json:"display,omitempty"`
@@ -241,8 +254,8 @@ type OperationDisplay struct {
Operation *string `json:"operation,omitempty"`
}
// OperationListResult is result of the request to list EventHub operations. It
// contains a list of operations and a URL link to get the next set of results.
// OperationListResult is result of the request to list Relay 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 *[]Operation `json:"value,omitempty"`
@@ -261,26 +274,35 @@ func (client OperationListResult) OperationListResultPreparer() (*http.Request,
autorest.WithBaseURL(to.String(client.NextLink)))
}
// RegenerateKeysParameters is parameters supplied to the Regenerate
// Authorization Rule operation.
type RegenerateKeysParameters struct {
PolicyKey PolicyKey `json:"policyKey,omitempty"`
// RegenerateAccessKeyParameters is parameters supplied to the regenerate authorization rule operation, specifies which
// key neeeds to be reset.
type RegenerateAccessKeyParameters struct {
KeyType KeyType `json:"keyType,omitempty"`
Key *string `json:"key,omitempty"`
}
// Resource is the Resource definition
// Resource is the resource definition.
type Resource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
}
// Sku is sku of the Namespace.
type Sku struct {
Name *string `json:"name,omitempty"`
Tier *string `json:"tier,omitempty"`
// ResourceNamespacePatch is definition of resource.
type ResourceNamespacePatch struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
}
// TrackedResource is definition of Resource
// Sku is SKU of the namespace.
type Sku struct {
Name *string `json:"name,omitempty"`
Tier SkuTier `json:"tier,omitempty"`
}
// TrackedResource is definition of resource.
type TrackedResource struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
@@ -289,7 +311,17 @@ type TrackedResource struct {
Tags *map[string]*string `json:"tags,omitempty"`
}
// WcfRelay is description of WcfRelays Resource.
// UpdateParameters is description of a namespace resource.
type UpdateParameters struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Tags *map[string]*string `json:"tags,omitempty"`
Sku *Sku `json:"sku,omitempty"`
*NamespaceProperties `json:"properties,omitempty"`
}
// WcfRelay is description of the WCF relay resource.
type WcfRelay struct {
autorest.Response `json:"-"`
ID *string `json:"id,omitempty"`
@@ -298,19 +330,19 @@ type WcfRelay struct {
*WcfRelayProperties `json:"properties,omitempty"`
}
// WcfRelayProperties is properties of the WcfRelay Properties.
// WcfRelayProperties is properties of the WCF relay.
type WcfRelayProperties struct {
RelayType RelaytypeEnum `json:"relayType,omitempty"`
IsDynamic *bool `json:"isDynamic,omitempty"`
CreatedAt *date.Time `json:"createdAt,omitempty"`
UpdatedAt *date.Time `json:"updatedAt,omitempty"`
ListenerCount *int32 `json:"listenerCount,omitempty"`
RelayType RelaytypeEnum `json:"relayType,omitempty"`
RequiresClientAuthorization *bool `json:"requiresClientAuthorization,omitempty"`
RequiresTransportSecurity *bool `json:"requiresTransportSecurity,omitempty"`
IsDynamic *bool `json:"isDynamic,omitempty"`
UserMetadata *string `json:"userMetadata,omitempty"`
}
// WcfRelaysListResult is the response of the List WcfRelays operation.
// WcfRelaysListResult is the response of the list WCF relay operation.
type WcfRelaysListResult struct {
autorest.Response `json:"-"`
Value *[]WcfRelay `json:"value,omitempty"`
+217 -107
View File
@@ -14,9 +14,8 @@ package relay
// 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"
)
// NamespacesClient is the use these API to manage Azure Relay resources
// through Azure Resources Manager.
// NamespacesClient is the use these API to manage Azure Relay resources through Azure Resource Manager.
type NamespacesClient struct {
ManagementClient
}
@@ -36,15 +34,14 @@ func NewNamespacesClient(subscriptionID string) NamespacesClient {
return NewNamespacesClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient
// client.
// NewNamespacesClientWithBaseURI creates an instance of the NamespacesClient client.
func NewNamespacesClientWithBaseURI(baseURI string, subscriptionID string) NamespacesClient {
return NamespacesClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CheckNameAvailabilityMethod check the give namespace name availability.
// CheckNameAvailabilityMethod check the specified namespace name availability.
//
// parameters is parameters to check availability of the given namespace name
// parameters is parameters to check availability of the specified namespace name.
func (client NamespacesClient) CheckNameAvailabilityMethod(parameters CheckNameAvailability) (result CheckNameAvailabilityResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: parameters,
@@ -79,7 +76,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(parameters Ch
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -88,7 +85,7 @@ func (client NamespacesClient) CheckNameAvailabilityMethodPreparer(parameters Ch
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/CheckNameAvailability", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/checkNameAvailability", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -113,14 +110,11 @@ func (client NamespacesClient) CheckNameAvailabilityMethodResponder(resp *http.R
return
}
// CreateOrUpdate create Azure Relay namespace. 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 Azure Relay namespace. 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 name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name parameters is parameters
// supplied to create a Namespace Resource.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// parameters is parameters supplied to create a namespace resource.
func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespaceName string, parameters Namespace, cancel <-chan struct{}) (<-chan Namespace, <-chan error) {
resultChan := make(chan Namespace, 1)
errChan := make(chan error, 1)
@@ -133,9 +127,7 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.Sku", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil},
{Target: "parameters.Sku.Tier", Name: validation.Null, Rule: true, Chain: nil},
}}}}}); err != nil {
Chain: []validation.Constraint{{Target: "parameters.Sku.Name", Name: validation.Null, Rule: true, Chain: nil}}}}}}); err != nil {
errChan <- validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "CreateOrUpdate")
close(errChan)
close(resultChan)
@@ -146,8 +138,10 @@ func (client NamespacesClient) CreateOrUpdate(resourceGroupName string, namespac
var err error
var result Namespace
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -180,7 +174,7 @@ func (client NamespacesClient) CreateOrUpdatePreparer(resourceGroupName string,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -209,19 +203,17 @@ func (client NamespacesClient) CreateOrUpdateResponder(resp *http.Response) (res
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for
// a namespace
// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name authorizationRuleName is
// the authorizationRule name. parameters is the authorization rule parameters
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// authorizationRuleName is the authorization rule name. parameters is the authorization rule parameters.
func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -231,11 +223,10 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRule(resourceGroupName
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "CreateOrUpdateAuthorizationRule")
@@ -271,7 +262,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -280,7 +271,7 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRulePreparer(resourceG
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -305,14 +296,11 @@ func (client NamespacesClient) CreateOrUpdateAuthorizationRuleResponder(resp *ht
return
}
// Delete deletes an existing namespace. This operation also removes all
// associated resources under the namespace. 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 deletes an existing namespace. This operation also removes all associated resources under the namespace. 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 name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
func (client NamespacesClient) Delete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan autorest.Response, <-chan error) {
resultChan := make(chan autorest.Response, 1)
errChan := make(chan error, 1)
@@ -333,8 +321,10 @@ func (client NamespacesClient) Delete(resourceGroupName string, namespaceName st
var err error
var result autorest.Response
defer func() {
if err != nil {
errChan <- err
}
resultChan <- result
errChan <- err
close(resultChan)
close(errChan)
}()
@@ -367,7 +357,7 @@ func (client NamespacesClient) DeletePreparer(resourceGroupName string, namespac
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -400,11 +390,10 @@ func (client NamespacesClient) DeleteResponder(resp *http.Response) (result auto
return
}
// DeleteAuthorizationRule deletes a namespace authorization rule
// DeleteAuthorizationRule deletes a namespace authorization rule.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name authorizationRuleName is
// the authorizationRule name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// authorizationRuleName is the authorization rule name.
func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -414,8 +403,7 @@ func (client NamespacesClient) DeleteAuthorizationRule(resourceGroupName string,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "DeleteAuthorizationRule")
}
@@ -449,7 +437,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -457,7 +445,7 @@ func (client NamespacesClient) DeleteAuthorizationRulePreparer(resourceGroupName
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -482,8 +470,7 @@ func (client NamespacesClient) DeleteAuthorizationRuleResponder(resp *http.Respo
// Get returns the description for the specified namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
func (client NamespacesClient) Get(resourceGroupName string, namespaceName string) (result Namespace, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -524,7 +511,7 @@ func (client NamespacesClient) GetPreparer(resourceGroupName string, namespaceNa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -558,9 +545,8 @@ func (client NamespacesClient) GetResponder(resp *http.Response) (result Namespa
// GetAuthorizationRule authorization rule for a namespace by name.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name authorizationRuleName is
// the authorizationRule name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// authorizationRuleName is the authorization rule name.
func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -570,8 +556,7 @@ func (client NamespacesClient) GetAuthorizationRule(resourceGroupName string, na
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "GetAuthorizationRule")
}
@@ -605,7 +590,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -613,7 +598,7 @@ func (client NamespacesClient) GetAuthorizationRulePreparer(resourceGroupName st
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -637,8 +622,7 @@ func (client NamespacesClient) GetAuthorizationRuleResponder(resp *http.Response
return
}
// List lists all the available namespaces within the subscription irrespective
// of the resourceGroups.
// List lists all the available namespaces within the subscription regardless of the resourceGroups.
func (client NamespacesClient) List() (result NamespaceListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
@@ -667,7 +651,7 @@ func (client NamespacesClient) ListPreparer() (*http.Request, error) {
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -675,7 +659,7 @@ func (client NamespacesClient) ListPreparer() (*http.Request, error) {
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/Namespaces", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Relay/namespaces", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -723,10 +707,54 @@ func (client NamespacesClient) ListNextResults(lastResults NamespaceListResult)
return
}
// ListComplete gets all elements from the list without paging.
func (client NamespacesClient) ListComplete(cancel <-chan struct{}) (<-chan Namespace, <-chan error) {
resultChan := make(chan Namespace)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.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
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(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
}
// ListAuthorizationRules authorization rules for a namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
func (client NamespacesClient) ListAuthorizationRules(resourceGroupName string, namespaceName string) (result AuthorizationRuleListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -767,7 +795,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -775,7 +803,7 @@ func (client NamespacesClient) ListAuthorizationRulesPreparer(resourceGroupName
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -823,11 +851,54 @@ func (client NamespacesClient) ListAuthorizationRulesNextResults(lastResults Aut
return
}
// ListByResourceGroup lists all the available namespaces within the
// ResourceGroup.
// ListAuthorizationRulesComplete gets all elements from the list without paging.
func (client NamespacesClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) {
resultChan := make(chan AuthorizationRule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName)
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.ListAuthorizationRulesNextResults(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
}
// ListByResourceGroup lists all the available namespaces within the ResourceGroup.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription.
// resourceGroupName is name of the Resource group within the Azure subscription.
func (client NamespacesClient) ListByResourceGroup(resourceGroupName string) (result NamespaceListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -864,7 +935,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -872,7 +943,7 @@ func (client NamespacesClient) ListByResourceGroupPreparer(resourceGroupName str
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/Namespaces", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -920,12 +991,56 @@ func (client NamespacesClient) ListByResourceGroupNextResults(lastResults Namesp
return
}
// ListKeys primary and Secondary ConnectionStrings to the namespace
// ListByResourceGroupComplete gets all elements from the list without paging.
func (client NamespacesClient) ListByResourceGroupComplete(resourceGroupName string, cancel <-chan struct{}) (<-chan Namespace, <-chan error) {
resultChan := make(chan Namespace)
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
}
// ListKeys primary and secondary connection strings to the namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name authorizationRuleName is
// the authorizationRule name.
func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// authorizationRuleName is the authorization rule name.
func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName string, authorizationRuleName string) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -934,8 +1049,7 @@ func (client NamespacesClient) ListKeys(resourceGroupName string, namespaceName
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "ListKeys")
}
@@ -969,7 +1083,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -977,7 +1091,7 @@ func (client NamespacesClient) ListKeysPreparer(resourceGroupName string, namesp
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/listKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -990,7 +1104,7 @@ func (client NamespacesClient) ListKeysSender(req *http.Request) (*http.Response
// ListKeysResponder handles the response to the ListKeys request. The method always
// closes the http.Response Body.
func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -1001,14 +1115,12 @@ func (client NamespacesClient) ListKeysResponder(resp *http.Response) (result Au
return
}
// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the
// namespace
// RegenerateKeys regenerates the primary or secondary connection strings to the namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name authorizationRuleName is
// the authorizationRule name. parameters is parameters supplied to regenerate
// Auth Rule.
func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// authorizationRuleName is the authorization rule name. parameters is parameters supplied to regenerate authorization
// rule.
func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -1017,8 +1129,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.NamespacesClient", "RegenerateKeys")
}
@@ -1044,7 +1155,7 @@ func (client NamespacesClient) RegenerateKeys(resourceGroupName string, namespac
}
// RegenerateKeysPreparer prepares the RegenerateKeys request.
func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) {
func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"namespaceName": autorest.Encode("path", namespaceName),
@@ -1052,7 +1163,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1061,7 +1172,7 @@ func (client NamespacesClient) RegenerateKeysPreparer(resourceGroupName string,
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -1075,7 +1186,7 @@ func (client NamespacesClient) RegenerateKeysSender(req *http.Request) (*http.Re
// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
// closes the http.Response Body.
func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -1086,13 +1197,12 @@ func (client NamespacesClient) RegenerateKeysResponder(resp *http.Response) (res
return
}
// Update creates or updates a namespace. Once created, this namespace's
// resource manifest is immutable. This operation is idempotent.
// Update creates or updates a namespace. Once created, this namespace's resource manifest is immutable. This operation
// is idempotent.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name parameters is parameters
// for updating a namespace resource.
func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (result Namespace, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// parameters is parameters for updating a namespace resource.
func (client NamespacesClient) Update(resourceGroupName string, namespaceName string, parameters UpdateParameters) (result Namespace, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -1125,14 +1235,14 @@ func (client NamespacesClient) Update(resourceGroupName string, namespaceName st
}
// UpdatePreparer prepares the Update request.
func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters NamespaceUpdateParameter) (*http.Request, error) {
func (client NamespacesClient) UpdatePreparer(resourceGroupName string, namespaceName string, parameters UpdateParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"namespaceName": autorest.Encode("path", namespaceName),
"resourceGroupName": autorest.Encode("path", resourceGroupName),
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -1159,7 +1269,7 @@ func (client NamespacesClient) UpdateResponder(resp *http.Response) (result Name
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
+51 -9
View File
@@ -14,9 +14,8 @@ package relay
// 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"
@@ -24,8 +23,7 @@ import (
"net/http"
)
// OperationsClient is the use these API to manage Azure Relay resources
// through Azure Resources Manager.
// OperationsClient is the use these API to manage Azure Relay resources through Azure Resource Manager.
type OperationsClient struct {
ManagementClient
}
@@ -35,13 +33,12 @@ func NewOperationsClient(subscriptionID string) OperationsClient {
return NewOperationsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient
// client.
// NewOperationsClientWithBaseURI creates an instance of the OperationsClient client.
func NewOperationsClientWithBaseURI(baseURI string, subscriptionID string) OperationsClient {
return OperationsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// List lists all of the available Relay REST API operations.
// List lists all available Relay REST API operations.
func (client OperationsClient) List() (result OperationListResult, err error) {
req, err := client.ListPreparer()
if err != nil {
@@ -66,7 +63,7 @@ func (client OperationsClient) List() (result OperationListResult, err error) {
// ListPreparer prepares the List request.
func (client OperationsClient) ListPreparer() (*http.Request, error) {
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -121,3 +118,48 @@ func (client OperationsClient) ListNextResults(lastResults OperationListResult)
return
}
// ListComplete gets all elements from the list without paging.
func (client OperationsClient) ListComplete(cancel <-chan struct{}) (<-chan Operation, <-chan error) {
resultChan := make(chan Operation)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.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
}
}
}
for list.NextLink != nil {
list, err = client.ListNextResults(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
}
+4 -5
View File
@@ -14,16 +14,15 @@ package relay
// 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.
// UserAgent returns the UserAgent string to use when sending http.Requests.
func UserAgent() string {
return "Azure-SDK-For-Go/v10.1.0-beta arm-relay/2016-07-01"
return "Azure-SDK-For-Go/v11.0.0-beta arm-relay/2017-04-01"
}
// Version returns the semantic version (see http://semver.org) of the client.
func Version() string {
return "v10.1.0-beta"
return "v11.0.0-beta"
}
+172 -104
View File
@@ -14,9 +14,8 @@ package relay
// 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"
)
// WCFRelaysClient is the use these API to manage Azure Relay resources through
// Azure Resources Manager.
// WCFRelaysClient is the use these API to manage Azure Relay resources through Azure Resource Manager.
type WCFRelaysClient struct {
ManagementClient
}
@@ -36,17 +34,15 @@ func NewWCFRelaysClient(subscriptionID string) WCFRelaysClient {
return NewWCFRelaysClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient
// client.
// NewWCFRelaysClientWithBaseURI creates an instance of the WCFRelaysClient client.
func NewWCFRelaysClientWithBaseURI(baseURI string, subscriptionID string) WCFRelaysClient {
return WCFRelaysClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or Updates a WCFRelay. This operation is idempotent.
// CreateOrUpdate creates or updates a WCF relay. This operation is idempotent.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name parameters is parameters supplied to create a WCFRelays.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. parameters is parameters supplied to create a WCF relay.
func (client WCFRelaysClient) CreateOrUpdate(resourceGroupName string, namespaceName string, relayName string, parameters WcfRelay) (result WcfRelay, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -56,8 +52,14 @@ func (client WCFRelaysClient) CreateOrUpdate(resourceGroupName string, namespace
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.WcfRelayProperties", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMaximum, Rule: 25, Chain: nil},
{Target: "parameters.WcfRelayProperties.ListenerCount", Name: validation.InclusiveMinimum, Rule: 0, Chain: nil},
}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "CreateOrUpdate")
}
@@ -91,7 +93,7 @@ func (client WCFRelaysClient) CreateOrUpdatePreparer(resourceGroupName string, n
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -100,7 +102,7 @@ func (client WCFRelaysClient) CreateOrUpdatePreparer(resourceGroupName string, n
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -125,13 +127,11 @@ func (client WCFRelaysClient) CreateOrUpdateResponder(resp *http.Response) (resu
return
}
// CreateOrUpdateAuthorizationRule creates or Updates an authorization rule for
// a WCFRelays
// CreateOrUpdateAuthorizationRule creates or updates an authorization rule for a WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name authorizationRuleName is the authorizationRule name. parameters is the
// authorization rule parameters.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. authorizationRuleName is the authorization rule name. parameters is the authorization
// rule parameters.
func (client WCFRelaysClient) CreateOrUpdateAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters AuthorizationRule) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -141,14 +141,12 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRule(resourceGroupName
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: parameters,
Constraints: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: true,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.Null, Rule: false,
Chain: []validation.Constraint{{Target: "parameters.AuthorizationRuleProperties.Rights", Name: validation.UniqueItems, Rule: true, Chain: nil}}},
}}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "CreateOrUpdateAuthorizationRule")
@@ -185,7 +183,7 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRulePreparer(resourceGr
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -194,7 +192,7 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRulePreparer(resourceGr
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -219,11 +217,10 @@ func (client WCFRelaysClient) CreateOrUpdateAuthorizationRuleResponder(resp *htt
return
}
// Delete deletes a WCFRelays .
// Delete deletes a WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name.
func (client WCFRelaysClient) Delete(resourceGroupName string, namespaceName string, relayName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -233,8 +230,7 @@ func (client WCFRelaysClient) Delete(resourceGroupName string, namespaceName str
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "Delete")
}
@@ -268,7 +264,7 @@ func (client WCFRelaysClient) DeletePreparer(resourceGroupName string, namespace
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -276,7 +272,7 @@ func (client WCFRelaysClient) DeletePreparer(resourceGroupName string, namespace
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -299,11 +295,10 @@ func (client WCFRelaysClient) DeleteResponder(resp *http.Response) (result autor
return
}
// DeleteAuthorizationRule deletes a WCFRelays authorization rule
// DeleteAuthorizationRule deletes a WCF relay authorization rule.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name authorizationRuleName is the authorizationRule name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. authorizationRuleName is the authorization rule name.
func (client WCFRelaysClient) DeleteAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result autorest.Response, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -313,11 +308,9 @@ func (client WCFRelaysClient) DeleteAuthorizationRule(resourceGroupName string,
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "DeleteAuthorizationRule")
}
@@ -352,7 +345,7 @@ func (client WCFRelaysClient) DeleteAuthorizationRulePreparer(resourceGroupName
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -360,7 +353,7 @@ func (client WCFRelaysClient) DeleteAuthorizationRulePreparer(resourceGroupName
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -383,11 +376,10 @@ func (client WCFRelaysClient) DeleteAuthorizationRuleResponder(resp *http.Respon
return
}
// Get returns the description for the specified WCFRelays.
// Get returns the description for the specified WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name.
func (client WCFRelaysClient) Get(resourceGroupName string, namespaceName string, relayName string) (result WcfRelay, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -397,8 +389,7 @@ func (client WCFRelaysClient) Get(resourceGroupName string, namespaceName string
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "Get")
}
@@ -432,7 +423,7 @@ func (client WCFRelaysClient) GetPreparer(resourceGroupName string, namespaceNam
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -440,7 +431,7 @@ func (client WCFRelaysClient) GetPreparer(resourceGroupName string, namespaceNam
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -464,11 +455,10 @@ func (client WCFRelaysClient) GetResponder(resp *http.Response) (result WcfRelay
return
}
// GetAuthorizationRule get authorizationRule for a WCFRelays by name.
// GetAuthorizationRule get authorizationRule for a WCF relay by name.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name authorizationRuleName is the authorizationRule name.
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. authorizationRuleName is the authorization rule name.
func (client WCFRelaysClient) GetAuthorizationRule(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AuthorizationRule, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -478,11 +468,9 @@ func (client WCFRelaysClient) GetAuthorizationRule(resourceGroupName string, nam
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "GetAuthorizationRule")
}
@@ -517,7 +505,7 @@ func (client WCFRelaysClient) GetAuthorizationRulePreparer(resourceGroupName str
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -525,7 +513,7 @@ func (client WCFRelaysClient) GetAuthorizationRulePreparer(resourceGroupName str
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -549,11 +537,10 @@ func (client WCFRelaysClient) GetAuthorizationRuleResponder(resp *http.Response)
return
}
// ListAuthorizationRules authorization rules for a WCFRelays.
// ListAuthorizationRules authorization rules for a WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name.
func (client WCFRelaysClient) ListAuthorizationRules(resourceGroupName string, namespaceName string, relayName string) (result AuthorizationRuleListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -563,8 +550,7 @@ func (client WCFRelaysClient) ListAuthorizationRules(resourceGroupName string, n
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "ListAuthorizationRules")
}
@@ -598,7 +584,7 @@ func (client WCFRelaysClient) ListAuthorizationRulesPreparer(resourceGroupName s
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -606,7 +592,7 @@ func (client WCFRelaysClient) ListAuthorizationRulesPreparer(resourceGroupName s
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -654,10 +640,54 @@ func (client WCFRelaysClient) ListAuthorizationRulesNextResults(lastResults Auth
return
}
// ListByNamespace lists the WCFRelays within the namespace.
// ListAuthorizationRulesComplete gets all elements from the list without paging.
func (client WCFRelaysClient) ListAuthorizationRulesComplete(resourceGroupName string, namespaceName string, relayName string, cancel <-chan struct{}) (<-chan AuthorizationRule, <-chan error) {
resultChan := make(chan AuthorizationRule)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListAuthorizationRules(resourceGroupName, namespaceName, relayName)
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.ListAuthorizationRulesNextResults(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
}
// ListByNamespace lists the WCF relays within the namespace.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
func (client WCFRelaysClient) ListByNamespace(resourceGroupName string, namespaceName string) (result WcfRelaysListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -698,7 +728,7 @@ func (client WCFRelaysClient) ListByNamespacePreparer(resourceGroupName string,
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -706,7 +736,7 @@ func (client WCFRelaysClient) ListByNamespacePreparer(resourceGroupName string,
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -754,12 +784,56 @@ func (client WCFRelaysClient) ListByNamespaceNextResults(lastResults WcfRelaysLi
return
}
// ListKeys primary and Secondary ConnectionStrings to the WCFRelays.
// ListByNamespaceComplete gets all elements from the list without paging.
func (client WCFRelaysClient) ListByNamespaceComplete(resourceGroupName string, namespaceName string, cancel <-chan struct{}) (<-chan WcfRelay, <-chan error) {
resultChan := make(chan WcfRelay)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListByNamespace(resourceGroupName, namespaceName)
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.ListByNamespaceNextResults(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 primary and secondary connection strings to the WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name authorizationRuleName is the authorizationRule name.
func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. authorizationRuleName is the authorization rule name.
func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -768,11 +842,9 @@ func (client WCFRelaysClient) ListKeys(resourceGroupName string, namespaceName s
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "ListKeys")
}
@@ -807,7 +879,7 @@ func (client WCFRelaysClient) ListKeysPreparer(resourceGroupName string, namespa
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -815,7 +887,7 @@ func (client WCFRelaysClient) ListKeysPreparer(resourceGroupName string, namespa
preparer := autorest.CreatePreparer(
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/ListKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/listKeys", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -828,7 +900,7 @@ func (client WCFRelaysClient) ListKeysSender(req *http.Request) (*http.Response,
// ListKeysResponder handles the response to the ListKeys request. The method always
// closes the http.Response Body.
func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),
@@ -839,14 +911,12 @@ func (client WCFRelaysClient) ListKeysResponder(resp *http.Response) (result Aut
return
}
// RegenerateKeys regenerates the Primary or Secondary ConnectionStrings to the
// WCFRelays
// RegenerateKeys regenerates the primary or secondary connection strings to the WCF relay.
//
// resourceGroupName is name of the Resource group within the Azure
// subscription. namespaceName is the Namespace Name relayName is the relay
// name authorizationRuleName is the authorizationRule name. parameters is
// parameters supplied to regenerate Auth Rule.
func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateKeysParameters) (result AuthorizationRuleKeys, err error) {
// resourceGroupName is name of the Resource group within the Azure subscription. namespaceName is the namespace name
// relayName is the relay name. authorizationRuleName is the authorization rule name. parameters is parameters supplied
// to regenerate authorization rule.
func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (result AccessKeys, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
Constraints: []validation.Constraint{{Target: "resourceGroupName", Name: validation.MaxLength, Rule: 90, Chain: nil},
@@ -855,11 +925,9 @@ func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespace
Constraints: []validation.Constraint{{Target: "namespaceName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "namespaceName", Name: validation.MinLength, Rule: 6, Chain: nil}}},
{TargetValue: relayName,
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
Constraints: []validation.Constraint{{Target: "relayName", Name: validation.MinLength, Rule: 1, Chain: nil}}},
{TargetValue: authorizationRuleName,
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MaxLength, Rule: 50, Chain: nil},
{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
Constraints: []validation.Constraint{{Target: "authorizationRuleName", Name: validation.MinLength, Rule: 1, Chain: nil}}}}); err != nil {
return result, validation.NewErrorWithValidationError(err, "relay.WCFRelaysClient", "RegenerateKeys")
}
@@ -885,7 +953,7 @@ func (client WCFRelaysClient) RegenerateKeys(resourceGroupName string, namespace
}
// RegenerateKeysPreparer prepares the RegenerateKeys request.
func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateKeysParameters) (*http.Request, error) {
func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, namespaceName string, relayName string, authorizationRuleName string, parameters RegenerateAccessKeyParameters) (*http.Request, error) {
pathParameters := map[string]interface{}{
"authorizationRuleName": autorest.Encode("path", authorizationRuleName),
"namespaceName": autorest.Encode("path", namespaceName),
@@ -894,7 +962,7 @@ func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, n
"subscriptionId": autorest.Encode("path", client.SubscriptionID),
}
const APIVersion = "2016-07-01"
const APIVersion = "2017-04-01"
queryParameters := map[string]interface{}{
"api-version": APIVersion,
}
@@ -903,7 +971,7 @@ func (client WCFRelaysClient) RegenerateKeysPreparer(resourceGroupName string, n
autorest.AsJSON(),
autorest.AsPost(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/WcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Relay/namespaces/{namespaceName}/wcfRelays/{relayName}/authorizationRules/{authorizationRuleName}/regenerateKeys", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -917,7 +985,7 @@ func (client WCFRelaysClient) RegenerateKeysSender(req *http.Request) (*http.Res
// RegenerateKeysResponder handles the response to the RegenerateKeys request. The method always
// closes the http.Response Body.
func (client WCFRelaysClient) RegenerateKeysResponder(resp *http.Response) (result AuthorizationRuleKeys, err error) {
func (client WCFRelaysClient) RegenerateKeysResponder(resp *http.Response) (result AccessKeys, err error) {
err = autorest.Respond(
resp,
client.ByInspecting(),