vendor: update all dependencies to latest versions
This commit is contained in:
+217
-107
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user