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
+169 -49
View File
@@ -14,9 +14,8 @@ package policy
// 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,8 @@ import (
"net/http"
)
// AssignmentsClient is the to manage and control access to your resources, you
// can define customized policies and assign them at a scope.
// AssignmentsClient is the to manage and control access to your resources, you can define customized policies and
// assign them at a scope.
type AssignmentsClient struct {
ManagementClient
}
@@ -36,19 +35,16 @@ func NewAssignmentsClient(subscriptionID string) AssignmentsClient {
return NewAssignmentsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient
// client.
// NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client.
func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient {
return AssignmentsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// Create policy assignments are inherited by child resources. For example,
// when you apply a policy to a resource group that policy is assigned to all
// resources in the group.
// Create policy assignments are inherited by child resources. For example, when you apply a policy to a resource group
// that policy is assigned to all resources in the group.
//
// scope is the scope of the policy assignment. policyAssignmentName is the
// name of the policy assignment. parameters is parameters for the policy
// assignment.
// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment. parameters
// is parameters for the policy assignment.
func (client AssignmentsClient) Create(scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error) {
req, err := client.CreatePreparer(scope, policyAssignmentName, parameters)
if err != nil {
@@ -87,7 +83,7 @@ func (client AssignmentsClient) CreatePreparer(scope string, policyAssignmentNam
autorest.AsJSON(),
autorest.AsPut(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
autorest.WithJSON(parameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
@@ -112,19 +108,16 @@ func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Ass
return
}
// CreateByID policy assignments are inherited by child resources. For example,
// when you apply a policy to a resource group that policy is assigned to all
// resources in the group. When providing a scope for the assigment, use
// CreateByID policy assignments are inherited by child resources. For example, when you apply a policy to a resource
// group that policy is assigned to all resources in the group. When providing a scope for the assigment, use
// '/subscriptions/{subscription-id}/' for subscriptions,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
// resource groups, and
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
// for resources.
//
// policyAssignmentID is the ID of the policy assignment to create. Use the
// format
// '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
// parameters is parameters for policy assignment.
// policyAssignmentID is the ID of the policy assignment to create. Use the format
// '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'. parameters is parameters
// for policy assignment.
func (client AssignmentsClient) CreateByID(policyAssignmentID string, parameters Assignment) (result Assignment, err error) {
req, err := client.CreateByIDPreparer(policyAssignmentID, parameters)
if err != nil {
@@ -189,8 +182,7 @@ func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result
// Delete deletes a policy assignment.
//
// scope is the scope of the policy assignment. policyAssignmentName is the
// name of the policy assignment to delete.
// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment to delete.
func (client AssignmentsClient) Delete(scope string, policyAssignmentName string) (result Assignment, err error) {
req, err := client.DeletePreparer(scope, policyAssignmentName)
if err != nil {
@@ -228,7 +220,7 @@ func (client AssignmentsClient) DeletePreparer(scope string, policyAssignmentNam
preparer := autorest.CreatePreparer(
autorest.AsDelete(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -245,22 +237,19 @@ func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Ass
err = autorest.Respond(
resp,
client.ByInspecting(),
azure.WithErrorUnlessStatusCode(http.StatusOK),
azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent),
autorest.ByUnmarshallingJSON(&result),
autorest.ByClosing())
result.Response = autorest.Response{Response: resp}
return
}
// DeleteByID when providing a scope for the assigment, use
// '/subscriptions/{subscription-id}/' for subscriptions,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
// resource groups, and
// DeleteByID when providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
// for resources.
//
// policyAssignmentID is the ID of the policy assignment to delete. Use the
// format
// policyAssignmentID is the ID of the policy assignment to delete. Use the format
// '/{scope}/providers/Microsoft.Authorization/policyAssignments/{policy-assignment-name}'.
func (client AssignmentsClient) DeleteByID(policyAssignmentID string) (result Assignment, err error) {
req, err := client.DeleteByIDPreparer(policyAssignmentID)
@@ -324,8 +313,7 @@ func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result
// Get gets a policy assignment.
//
// scope is the scope of the policy assignment. policyAssignmentName is the
// name of the policy assignment to get.
// scope is the scope of the policy assignment. policyAssignmentName is the name of the policy assignment to get.
func (client AssignmentsClient) Get(scope string, policyAssignmentName string) (result Assignment, err error) {
req, err := client.GetPreparer(scope, policyAssignmentName)
if err != nil {
@@ -363,7 +351,7 @@ func (client AssignmentsClient) GetPreparer(scope string, policyAssignmentName s
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyassignments/{policyAssignmentName}", pathParameters),
autorest.WithPathParameters("/{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -387,10 +375,8 @@ func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assign
return
}
// GetByID when providing a scope for the assigment, use
// '/subscriptions/{subscription-id}/' for subscriptions,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for
// resource groups, and
// GetByID when providing a scope for the assigment, use '/subscriptions/{subscription-id}/' for subscriptions,
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for resource groups, and
// '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider-namespace}/{resource-type}/{resource-name}'
// for resources.
//
@@ -498,7 +484,7 @@ func (client AssignmentsClient) ListPreparer(filter string) (*http.Request, erro
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyassignments", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -546,13 +532,57 @@ func (client AssignmentsClient) ListNextResults(lastResults AssignmentListResult
return
}
// ListComplete gets all elements from the list without paging.
func (client AssignmentsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) {
resultChan := make(chan Assignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(filter)
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
}
// ListForResource gets policy assignments for a resource.
//
// resourceGroupName is the name of the resource group containing the resource.
// The name is case insensitive. resourceProviderNamespace is the namespace of
// the resource provider. parentResourcePath is the parent resource path.
// resourceType is the resource type. resourceName is the name of the resource
// with policy assignments. filter is the filter to apply on the operation.
// resourceGroupName is the name of the resource group containing the resource. The name is case insensitive.
// resourceProviderNamespace is the namespace of the resource provider. parentResourcePath is the parent resource path.
// resourceType is the resource type. resourceName is the name of the resource with policy assignments. filter is the
// filter to apply on the operation.
func (client AssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -605,7 +635,7 @@ func (client AssignmentsClient) ListForResourcePreparer(resourceGroupName string
preparer := autorest.CreatePreparer(
autorest.AsGet(),
autorest.WithBaseURL(client.BaseURI),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyassignments", pathParameters),
autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{parentResourcePath}/{resourceType}/{resourceName}/providers/Microsoft.Authorization/policyAssignments", pathParameters),
autorest.WithQueryParameters(queryParameters))
return preparer.Prepare(&http.Request{})
}
@@ -653,10 +683,55 @@ func (client AssignmentsClient) ListForResourceNextResults(lastResults Assignmen
return
}
// ListForResourceComplete gets all elements from the list without paging.
func (client AssignmentsClient) ListForResourceComplete(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) {
resultChan := make(chan Assignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResource(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, filter)
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.ListForResourceNextResults(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
}
// ListForResourceGroup gets policy assignments for the resource group.
//
// resourceGroupName is the name of the resource group that contains policy
// assignments. filter is the filter to apply on the operation.
// resourceGroupName is the name of the resource group that contains policy assignments. filter is the filter to apply
// on the operation.
func (client AssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result AssignmentListResult, err error) {
if err := validation.Validate([]validation.Validation{
{TargetValue: resourceGroupName,
@@ -752,3 +827,48 @@ func (client AssignmentsClient) ListForResourceGroupNextResults(lastResults Assi
return
}
// ListForResourceGroupComplete gets all elements from the list without paging.
func (client AssignmentsClient) ListForResourceGroupComplete(resourceGroupName string, filter string, cancel <-chan struct{}) (<-chan Assignment, <-chan error) {
resultChan := make(chan Assignment)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.ListForResourceGroup(resourceGroupName, filter)
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.ListForResourceGroupNextResults(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 -7
View File
@@ -1,8 +1,6 @@
// Package policy implements the Azure ARM Policy service API version
// 2016-12-01.
// Package policy implements the Azure ARM Policy service API version 2016-12-01.
//
// To manage and control access to your resources, you can define customized
// policies and assign them at a scope.
// To manage and control access to your resources, you can define customized policies and assign them at a scope.
package policy
// Copyright (c) Microsoft and contributors. All rights reserved.
@@ -19,9 +17,8 @@ package policy
// 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"
@@ -14,9 +14,8 @@ package policy
// 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,8 @@ import (
"net/http"
)
// DefinitionsClient is the to manage and control access to your resources, you
// can define customized policies and assign them at a scope.
// DefinitionsClient is the to manage and control access to your resources, you can define customized policies and
// assign them at a scope.
type DefinitionsClient struct {
ManagementClient
}
@@ -35,16 +34,14 @@ func NewDefinitionsClient(subscriptionID string) DefinitionsClient {
return NewDefinitionsClientWithBaseURI(DefaultBaseURI, subscriptionID)
}
// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient
// client.
// NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client.
func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient {
return DefinitionsClient{NewWithBaseURI(baseURI, subscriptionID)}
}
// CreateOrUpdate creates or updates a policy definition.
//
// policyDefinitionName is the name of the policy definition to create.
// parameters is the policy definition properties.
// policyDefinitionName is the name of the policy definition to create. parameters is the policy definition properties.
func (client DefinitionsClient) CreateOrUpdate(policyDefinitionName string, parameters Definition) (result Definition, err error) {
req, err := client.CreateOrUpdatePreparer(policyDefinitionName, parameters)
if err != nil {
@@ -324,3 +321,48 @@ func (client DefinitionsClient) ListNextResults(lastResults DefinitionListResult
return
}
// ListComplete gets all elements from the list without paging.
func (client DefinitionsClient) ListComplete(filter string, cancel <-chan struct{}) (<-chan Definition, <-chan error) {
resultChan := make(chan Definition)
errChan := make(chan error, 1)
go func() {
defer func() {
close(resultChan)
close(errChan)
}()
list, err := client.List(filter)
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
}
+23 -10
View File
@@ -14,9 +14,8 @@ package policy
// 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,19 +23,31 @@ import (
"net/http"
)
// Mode enumerates the values for mode.
type Mode string
const (
// All specifies the all state for mode.
All Mode = "All"
// Indexed specifies the indexed state for mode.
Indexed Mode = "Indexed"
// NotSpecified specifies the not specified state for mode.
NotSpecified Mode = "NotSpecified"
)
// Type enumerates the values for type.
type Type string
const (
// BuiltIn specifies the built in state for type.
BuiltIn Type = "BuiltIn"
// Custom specifies the custom state for type.
Custom Type = "Custom"
// NotSpecified specifies the not specified state for type.
NotSpecified Type = "NotSpecified"
// TypeBuiltIn specifies the type built in state for type.
TypeBuiltIn Type = "BuiltIn"
// TypeCustom specifies the type custom state for type.
TypeCustom Type = "Custom"
// TypeNotSpecified specifies the type not specified state for type.
TypeNotSpecified Type = "NotSpecified"
)
// Assignment is the policy definition.
// Assignment is the policy assignment.
type Assignment struct {
autorest.Response `json:"-"`
*AssignmentProperties `json:"properties,omitempty"`
@@ -103,8 +114,10 @@ func (client DefinitionListResult) DefinitionListResultPreparer() (*http.Request
// DefinitionProperties is the policy definition properties.
type DefinitionProperties struct {
PolicyType Type `json:"policyType,omitempty"`
Mode Mode `json:"mode,omitempty"`
DisplayName *string `json:"displayName,omitempty"`
Description *string `json:"description,omitempty"`
PolicyRule *map[string]interface{} `json:"policyRule,omitempty"`
Metadata *map[string]interface{} `json:"metadata,omitempty"`
Parameters *map[string]interface{} `json:"parameters,omitempty"`
}
+4 -5
View File
@@ -14,16 +14,15 @@ package policy
// 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-policy/2016-12-01"
return "Azure-SDK-For-Go/v11.0.0-beta arm-policy/2016-12-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"
}