...

Package policy

import "github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2018-03-01/policy"
Overview
Index
Subdirectories

Overview ▾

Deprecated: Please note, this package has been deprecated. A replacement package is available github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy(https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armpolicy). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details.

Package policy implements the Azure ARM Policy service API version 2018-03-01.

To manage and control access to your resources, you can define customized policies and assign them at a scope.

Index ▾

Constants
func UserAgent() string
func Version() string
type Assignment
    func (a Assignment) MarshalJSON() ([]byte, error)
    func (a *Assignment) UnmarshalJSON(body []byte) error
type AssignmentListResult
    func (alr AssignmentListResult) IsEmpty() bool
type AssignmentListResultIterator
    func NewAssignmentListResultIterator(page AssignmentListResultPage) AssignmentListResultIterator
    func (iter *AssignmentListResultIterator) Next() error
    func (iter *AssignmentListResultIterator) NextWithContext(ctx context.Context) (err error)
    func (iter AssignmentListResultIterator) NotDone() bool
    func (iter AssignmentListResultIterator) Response() AssignmentListResult
    func (iter AssignmentListResultIterator) Value() Assignment
type AssignmentListResultPage
    func NewAssignmentListResultPage(cur AssignmentListResult, getNextPage func(context.Context, AssignmentListResult) (AssignmentListResult, error)) AssignmentListResultPage
    func (page *AssignmentListResultPage) Next() error
    func (page *AssignmentListResultPage) NextWithContext(ctx context.Context) (err error)
    func (page AssignmentListResultPage) NotDone() bool
    func (page AssignmentListResultPage) Response() AssignmentListResult
    func (page AssignmentListResultPage) Values() []Assignment
type AssignmentProperties
type AssignmentsClient
    func NewAssignmentsClient(subscriptionID string) AssignmentsClient
    func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient
    func (client AssignmentsClient) Create(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error)
    func (client AssignmentsClient) CreateByID(ctx context.Context, policyAssignmentID string, parameters Assignment) (result Assignment, err error)
    func (client AssignmentsClient) CreateByIDPreparer(ctx context.Context, policyAssignmentID string, parameters Assignment) (*http.Request, error)
    func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) CreatePreparer(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error)
    func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) CreateSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) Delete(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error)
    func (client AssignmentsClient) DeleteByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error)
    func (client AssignmentsClient) DeleteByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error)
    func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error)
    func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) Get(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error)
    func (client AssignmentsClient) GetByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error)
    func (client AssignmentsClient) GetByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error)
    func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error)
    func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error)
    func (client AssignmentsClient) GetSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) List(ctx context.Context, filter string) (result AssignmentListResultPage, err error)
    func (client AssignmentsClient) ListComplete(ctx context.Context, filter string) (result AssignmentListResultIterator, err error)
    func (client AssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultPage, err error)
    func (client AssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultIterator, err error)
    func (client AssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultPage, err error)
    func (client AssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultIterator, err error)
    func (client AssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error)
    func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error)
    func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error)
    func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error)
    func (client AssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error)
    func (client AssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error)
    func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, err error)
    func (client AssignmentsClient) ListSender(req *http.Request) (*http.Response, error)
type BaseClient
    func New(subscriptionID string) BaseClient
    func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient
type Definition
    func (d Definition) MarshalJSON() ([]byte, error)
    func (d *Definition) UnmarshalJSON(body []byte) error
type DefinitionListResult
    func (dlr DefinitionListResult) IsEmpty() bool
type DefinitionListResultIterator
    func NewDefinitionListResultIterator(page DefinitionListResultPage) DefinitionListResultIterator
    func (iter *DefinitionListResultIterator) Next() error
    func (iter *DefinitionListResultIterator) NextWithContext(ctx context.Context) (err error)
    func (iter DefinitionListResultIterator) NotDone() bool
    func (iter DefinitionListResultIterator) Response() DefinitionListResult
    func (iter DefinitionListResultIterator) Value() Definition
type DefinitionListResultPage
    func NewDefinitionListResultPage(cur DefinitionListResult, getNextPage func(context.Context, DefinitionListResult) (DefinitionListResult, error)) DefinitionListResultPage
    func (page *DefinitionListResultPage) Next() error
    func (page *DefinitionListResultPage) NextWithContext(ctx context.Context) (err error)
    func (page DefinitionListResultPage) NotDone() bool
    func (page DefinitionListResultPage) Response() DefinitionListResult
    func (page DefinitionListResultPage) Values() []Definition
type DefinitionProperties
type DefinitionReference
type DefinitionsClient
    func NewDefinitionsClient(subscriptionID string) DefinitionsClient
    func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient
    func (client DefinitionsClient) CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters Definition) (result Definition, err error)
    func (client DefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (result Definition, err error)
    func (client DefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (*http.Request, error)
    func (client DefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result Definition, err error)
    func (client DefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policyDefinitionName string, parameters Definition) (*http.Request, error)
    func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, err error)
    func (client DefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error)
    func (client DefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result autorest.Response, err error)
    func (client DefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error)
    func (client DefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error)
    func (client DefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) DeletePreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)
    func (client DefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
    func (client DefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) Get(ctx context.Context, policyDefinitionName string) (result Definition, err error)
    func (client DefinitionsClient) GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result Definition, err error)
    func (client DefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error)
    func (client DefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result Definition, err error)
    func (client DefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result Definition, err error)
    func (client DefinitionsClient) GetBuiltInPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)
    func (client DefinitionsClient) GetBuiltInResponder(resp *http.Response) (result Definition, err error)
    func (client DefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) GetPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)
    func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error)
    func (client DefinitionsClient) GetSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) List(ctx context.Context) (result DefinitionListResultPage, err error)
    func (client DefinitionsClient) ListBuiltIn(ctx context.Context) (result DefinitionListResultPage, err error)
    func (client DefinitionsClient) ListBuiltInComplete(ctx context.Context) (result DefinitionListResultIterator, err error)
    func (client DefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error)
    func (client DefinitionsClient) ListBuiltInResponder(resp *http.Response) (result DefinitionListResult, err error)
    func (client DefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result DefinitionListResultPage, err error)
    func (client DefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result DefinitionListResultIterator, err error)
    func (client DefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error)
    func (client DefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result DefinitionListResult, err error)
    func (client DefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client DefinitionsClient) ListComplete(ctx context.Context) (result DefinitionListResultIterator, err error)
    func (client DefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error)
    func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, err error)
    func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error)
type ErrorResponse
type Mode
    func PossibleModeValues() []Mode
type SetDefinition
    func (sd SetDefinition) MarshalJSON() ([]byte, error)
    func (sd *SetDefinition) UnmarshalJSON(body []byte) error
type SetDefinitionListResult
    func (sdlr SetDefinitionListResult) IsEmpty() bool
type SetDefinitionListResultIterator
    func NewSetDefinitionListResultIterator(page SetDefinitionListResultPage) SetDefinitionListResultIterator
    func (iter *SetDefinitionListResultIterator) Next() error
    func (iter *SetDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error)
    func (iter SetDefinitionListResultIterator) NotDone() bool
    func (iter SetDefinitionListResultIterator) Response() SetDefinitionListResult
    func (iter SetDefinitionListResultIterator) Value() SetDefinition
type SetDefinitionListResultPage
    func NewSetDefinitionListResultPage(cur SetDefinitionListResult, getNextPage func(context.Context, SetDefinitionListResult) (SetDefinitionListResult, error)) SetDefinitionListResultPage
    func (page *SetDefinitionListResultPage) Next() error
    func (page *SetDefinitionListResultPage) NextWithContext(ctx context.Context) (err error)
    func (page SetDefinitionListResultPage) NotDone() bool
    func (page SetDefinitionListResultPage) Response() SetDefinitionListResult
    func (page SetDefinitionListResultPage) Values() []SetDefinition
type SetDefinitionProperties
type SetDefinitionsClient
    func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient
    func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient
    func (client SetDefinitionsClient) CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (result SetDefinition, err error)
    func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (result SetDefinition, err error)
    func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (*http.Request, error)
    func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error)
    func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (*http.Request, error)
    func (client SetDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result SetDefinition, err error)
    func (client SetDefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) Delete(ctx context.Context, policySetDefinitionName string) (result autorest.Response, err error)
    func (client SetDefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result autorest.Response, err error)
    func (client SetDefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error)
    func (client SetDefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error)
    func (client SetDefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) DeletePreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)
    func (client SetDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
    func (client SetDefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) Get(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error)
    func (client SetDefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetBuiltInPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)
    func (client SetDefinitionsClient) GetBuiltInResponder(resp *http.Response) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) GetPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)
    func (client SetDefinitionsClient) GetResponder(resp *http.Response) (result SetDefinition, err error)
    func (client SetDefinitionsClient) GetSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) List(ctx context.Context) (result SetDefinitionListResultPage, err error)
    func (client SetDefinitionsClient) ListBuiltIn(ctx context.Context) (result SetDefinitionListResultPage, err error)
    func (client SetDefinitionsClient) ListBuiltInComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error)
    func (client SetDefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error)
    func (client SetDefinitionsClient) ListBuiltInResponder(resp *http.Response) (result SetDefinitionListResult, err error)
    func (client SetDefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result SetDefinitionListResultPage, err error)
    func (client SetDefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result SetDefinitionListResultIterator, err error)
    func (client SetDefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error)
    func (client SetDefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result SetDefinitionListResult, err error)
    func (client SetDefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error)
    func (client SetDefinitionsClient) ListComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error)
    func (client SetDefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error)
    func (client SetDefinitionsClient) ListResponder(resp *http.Response) (result SetDefinitionListResult, err error)
    func (client SetDefinitionsClient) ListSender(req *http.Request) (*http.Response, error)
type Sku
type Type
    func PossibleTypeValues() []Type

Package files

assignments.go client.go definitions.go enums.go models.go setdefinitions.go version.go

Constants

const (
    // DefaultBaseURI is the default URI used for the service Policy
    DefaultBaseURI = "https://management.azure.com"
)

func UserAgent

func UserAgent() string

UserAgent returns the UserAgent string to use when sending http.Requests.

func Version

func Version() string

Version returns the semantic version (see http://semver.org) of the client.

type Assignment

Assignment the policy assignment.

type Assignment struct {
    autorest.Response `json:"-"`
    // AssignmentProperties - Properties for the policy assignment.
    *AssignmentProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; The ID of the policy assignment.
    ID *string `json:"id,omitempty"`
    // Type - READ-ONLY; The type of the policy assignment.
    Type *string `json:"type,omitempty"`
    // Name - READ-ONLY; The name of the policy assignment.
    Name *string `json:"name,omitempty"`
    // Sku - The policy sku. This property is optional, obsolete, and will be ignored.
    Sku *Sku `json:"sku,omitempty"`
}

func (Assignment) MarshalJSON

func (a Assignment) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Assignment.

func (*Assignment) UnmarshalJSON

func (a *Assignment) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Assignment struct.

type AssignmentListResult

AssignmentListResult list of policy assignments.

type AssignmentListResult struct {
    autorest.Response `json:"-"`
    // Value - An array of policy assignments.
    Value *[]Assignment `json:"value,omitempty"`
    // NextLink - The URL to use for getting the next set of results.
    NextLink *string `json:"nextLink,omitempty"`
}

func (AssignmentListResult) IsEmpty

func (alr AssignmentListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type AssignmentListResultIterator

AssignmentListResultIterator provides access to a complete listing of Assignment values.

type AssignmentListResultIterator struct {
    // contains filtered or unexported fields
}

func NewAssignmentListResultIterator

func NewAssignmentListResultIterator(page AssignmentListResultPage) AssignmentListResultIterator

Creates a new instance of the AssignmentListResultIterator type.

func (*AssignmentListResultIterator) Next

func (iter *AssignmentListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*AssignmentListResultIterator) NextWithContext

func (iter *AssignmentListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (AssignmentListResultIterator) NotDone

func (iter AssignmentListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (AssignmentListResultIterator) Response

func (iter AssignmentListResultIterator) Response() AssignmentListResult

Response returns the raw server response from the last page request.

func (AssignmentListResultIterator) Value

func (iter AssignmentListResultIterator) Value() Assignment

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type AssignmentListResultPage

AssignmentListResultPage contains a page of Assignment values.

type AssignmentListResultPage struct {
    // contains filtered or unexported fields
}

func NewAssignmentListResultPage

func NewAssignmentListResultPage(cur AssignmentListResult, getNextPage func(context.Context, AssignmentListResult) (AssignmentListResult, error)) AssignmentListResultPage

Creates a new instance of the AssignmentListResultPage type.

func (*AssignmentListResultPage) Next

func (page *AssignmentListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*AssignmentListResultPage) NextWithContext

func (page *AssignmentListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (AssignmentListResultPage) NotDone

func (page AssignmentListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (AssignmentListResultPage) Response

func (page AssignmentListResultPage) Response() AssignmentListResult

Response returns the raw server response from the last page request.

func (AssignmentListResultPage) Values

func (page AssignmentListResultPage) Values() []Assignment

Values returns the slice of values for the current page or nil if there are no values.

type AssignmentProperties

AssignmentProperties the policy assignment properties.

type AssignmentProperties struct {
    // DisplayName - The display name of the policy assignment.
    DisplayName *string `json:"displayName,omitempty"`
    // PolicyDefinitionID - The ID of the policy definition or policy set definition being assigned.
    PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
    // Scope - The scope for the policy assignment.
    Scope *string `json:"scope,omitempty"`
    // NotScopes - The policy's excluded scopes.
    NotScopes *[]string `json:"notScopes,omitempty"`
    // Parameters - Required if a parameter is used in policy rule.
    Parameters interface{} `json:"parameters,omitempty"`
    // Description - This message will be part of response in case of policy violation.
    Description *string `json:"description,omitempty"`
    // Metadata - The policy assignment metadata.
    Metadata interface{} `json:"metadata,omitempty"`
}

type AssignmentsClient

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 {
    BaseClient
}

func NewAssignmentsClient

func NewAssignmentsClient(subscriptionID string) AssignmentsClient

NewAssignmentsClient creates an instance of the AssignmentsClient client.

func NewAssignmentsClientWithBaseURI

func NewAssignmentsClientWithBaseURI(baseURI string, subscriptionID string) AssignmentsClient

NewAssignmentsClientWithBaseURI creates an instance of the AssignmentsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (AssignmentsClient) Create

func (client AssignmentsClient) Create(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error)

Create this operation creates or updates a policy assignment with the given scope and name. Policy assignments apply to all resources contained within their scope. For example, when you assign a policy at resource group scope, that policy applies to all resources in the group. Parameters: scope - the scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' policyAssignmentName - the name of the policy assignment. parameters - parameters for the policy assignment.

func (AssignmentsClient) CreateByID

func (client AssignmentsClient) CreateByID(ctx context.Context, policyAssignmentID string, parameters Assignment) (result Assignment, err error)

CreateByID this operation creates or updates the policy assignment with the given ID. Policy assignments made on a scope apply to all resources contained in that scope. For example, when you assign a policy to a resource group that policy applies to all resources in the group. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. Parameters: policyAssignmentID - the ID of the policy assignment to create. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. parameters - parameters for policy assignment.

func (AssignmentsClient) CreateByIDPreparer

func (client AssignmentsClient) CreateByIDPreparer(ctx context.Context, policyAssignmentID string, parameters Assignment) (*http.Request, error)

CreateByIDPreparer prepares the CreateByID request.

func (AssignmentsClient) CreateByIDResponder

func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, err error)

CreateByIDResponder handles the response to the CreateByID request. The method always closes the http.Response Body.

func (AssignmentsClient) CreateByIDSender

func (client AssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error)

CreateByIDSender sends the CreateByID request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) CreatePreparer

func (client AssignmentsClient) CreatePreparer(ctx context.Context, scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error)

CreatePreparer prepares the Create request.

func (AssignmentsClient) CreateResponder

func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, err error)

CreateResponder handles the response to the Create request. The method always closes the http.Response Body.

func (AssignmentsClient) CreateSender

func (client AssignmentsClient) CreateSender(req *http.Request) (*http.Response, error)

CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) Delete

func (client AssignmentsClient) Delete(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error)

Delete this operation deletes a policy assignment, given its name and the scope it was created in. The scope of a policy assignment is the part of its ID preceding '/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Parameters: scope - the scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' policyAssignmentName - the name of the policy assignment to delete.

func (AssignmentsClient) DeleteByID

func (client AssignmentsClient) DeleteByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error)

DeleteByID this operation deletes the policy with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid formats for {scope} are: '/providers/Microsoft.Management/managementGroups/{managementGroup}' (management group), '/subscriptions/{subscriptionId}' (subscription), '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}' (resource group), or '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' (resource). Parameters: policyAssignmentID - the ID of the policy assignment to delete. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.

func (AssignmentsClient) DeleteByIDPreparer

func (client AssignmentsClient) DeleteByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error)

DeleteByIDPreparer prepares the DeleteByID request.

func (AssignmentsClient) DeleteByIDResponder

func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error)

DeleteByIDResponder handles the response to the DeleteByID request. The method always closes the http.Response Body.

func (AssignmentsClient) DeleteByIDSender

func (client AssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error)

DeleteByIDSender sends the DeleteByID request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) DeletePreparer

func (client AssignmentsClient) DeletePreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (AssignmentsClient) DeleteResponder

func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (AssignmentsClient) DeleteSender

func (client AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) Get

func (client AssignmentsClient) Get(ctx context.Context, scope string, policyAssignmentName string) (result Assignment, err error)

Get this operation retrieves a single policy assignment, given its name and the scope it was created at. Parameters: scope - the scope of the policy assignment. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}' policyAssignmentName - the name of the policy assignment to get.

func (AssignmentsClient) GetByID

func (client AssignmentsClient) GetByID(ctx context.Context, policyAssignmentID string) (result Assignment, err error)

GetByID the operation retrieves the policy assignment with the given ID. Policy assignment IDs have this format: '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'. Valid scopes are: management group (format: '/providers/Microsoft.Management/managementGroups/{managementGroup}'), subscription (format: '/subscriptions/{subscriptionId}'), resource group (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}', or resource (format: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/[{parentResourcePath}/]{resourceType}/{resourceName}'. Parameters: policyAssignmentID - the ID of the policy assignment to get. Use the format '{scope}/providers/Microsoft.Authorization/policyAssignments/{policyAssignmentName}'.

func (AssignmentsClient) GetByIDPreparer

func (client AssignmentsClient) GetByIDPreparer(ctx context.Context, policyAssignmentID string) (*http.Request, error)

GetByIDPreparer prepares the GetByID request.

func (AssignmentsClient) GetByIDResponder

func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, err error)

GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.

func (AssignmentsClient) GetByIDSender

func (client AssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error)

GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) GetPreparer

func (client AssignmentsClient) GetPreparer(ctx context.Context, scope string, policyAssignmentName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (AssignmentsClient) GetResponder

func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (AssignmentsClient) GetSender

func (client AssignmentsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) List

func (client AssignmentsClient) List(ctx context.Context, filter string) (result AssignmentListResultPage, err error)

List this operation retrieves the list of all policy assignments associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy assignments associated with the subscription, including those that apply directly or from management groups that contain the given subscription, as well as any applied to objects contained within the subscription. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the subscription, which is everything in the unfiltered list except those applied to objects contained within the subscription. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}. Parameters: filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed.

func (AssignmentsClient) ListComplete

func (client AssignmentsClient) ListComplete(ctx context.Context, filter string) (result AssignmentListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (AssignmentsClient) ListForResource

func (client AssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultPage, err error)

ListForResource this operation retrieves the list of all policy assignments associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource, including those that apply directly or from all containing scopes, as well as any applied to resources contained within the resource. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource, which is everything in the unfiltered list except those applied to resources contained within the resource. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource. Three parameters plus the resource name are used to identify a specific resource. If the resource is not part of a parent resource (the more common case), the parent resource path should not be provided (or provided as ”). For example a web app could be specified as ({resourceProviderNamespace} == 'Microsoft.Web', {parentResourcePath} == ”, {resourceType} == 'sites', {resourceName} == 'MyWebApp'). If the resource is part of a parent resource, then all parameters should be provided. For example a virtual machine DNS name could be specified as ({resourceProviderNamespace} == 'Microsoft.Compute', {parentResourcePath} == 'virtualMachines/MyVirtualMachine', {resourceType} == 'domainNames', {resourceName} == 'MyComputerName'). A convenient alternative to providing the namespace and type name separately is to provide both in the {resourceType} parameter, format: ({resourceProviderNamespace} == ”, {parentResourcePath} == ”, {resourceType} == 'Microsoft.Web/sites', {resourceName} == 'MyWebApp'). Parameters: resourceGroupName - the name of the resource group containing the resource. resourceProviderNamespace - the namespace of the resource provider. For example, the namespace of a virtual machine is Microsoft.Compute (from Microsoft.Compute/virtualMachines) parentResourcePath - the parent resource path. Use empty string if there is none. resourceType - the resource type name. For example the type name of a web app is 'sites' (from Microsoft.Web/sites). resourceName - the name of the resource. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed.

func (AssignmentsClient) ListForResourceComplete

func (client AssignmentsClient) ListForResourceComplete(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResultIterator, err error)

ListForResourceComplete enumerates all values, automatically crossing page boundaries as required.

func (AssignmentsClient) ListForResourceGroup

func (client AssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultPage, err error)

ListForResourceGroup this operation retrieves the list of all policy assignments associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy assignments associated with the resource group, including those that apply directly or apply from containing scopes, as well as any applied to resources contained within the resource group. If $filter=atScope() is provided, the returned list includes all policy assignments that apply to the resource group, which is everything in the unfiltered list except those applied to resources contained within the resource group. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value} that apply to the resource group. Parameters: resourceGroupName - the name of the resource group that contains policy assignments. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed.

func (AssignmentsClient) ListForResourceGroupComplete

func (client AssignmentsClient) ListForResourceGroupComplete(ctx context.Context, resourceGroupName string, filter string) (result AssignmentListResultIterator, err error)

ListForResourceGroupComplete enumerates all values, automatically crossing page boundaries as required.

func (AssignmentsClient) ListForResourceGroupPreparer

func (client AssignmentsClient) ListForResourceGroupPreparer(ctx context.Context, resourceGroupName string, filter string) (*http.Request, error)

ListForResourceGroupPreparer prepares the ListForResourceGroup request.

func (AssignmentsClient) ListForResourceGroupResponder

func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error)

ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always closes the http.Response Body.

func (AssignmentsClient) ListForResourceGroupSender

func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error)

ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) ListForResourcePreparer

func (client AssignmentsClient) ListForResourcePreparer(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error)

ListForResourcePreparer prepares the ListForResource request.

func (AssignmentsClient) ListForResourceResponder

func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error)

ListForResourceResponder handles the response to the ListForResource request. The method always closes the http.Response Body.

func (AssignmentsClient) ListForResourceSender

func (client AssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error)

ListForResourceSender sends the ListForResource request. The method will close the http.Response Body if it receives an error.

func (AssignmentsClient) ListPreparer

func (client AssignmentsClient) ListPreparer(ctx context.Context, filter string) (*http.Request, error)

ListPreparer prepares the List request.

func (AssignmentsClient) ListResponder

func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (AssignmentsClient) ListSender

func (client AssignmentsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type BaseClient

BaseClient is the base client for Policy.

type BaseClient struct {
    autorest.Client
    BaseURI        string
    SubscriptionID string
}

func New

func New(subscriptionID string) BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI

func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient

NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

type Definition

Definition the policy definition.

type Definition struct {
    autorest.Response `json:"-"`
    // DefinitionProperties - The policy definition properties.
    *DefinitionProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; The ID of the policy definition.
    ID *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the policy definition.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource (Microsoft.Authorization/policyDefinitions).
    Type *string `json:"type,omitempty"`
}

func (Definition) MarshalJSON

func (d Definition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Definition.

func (*Definition) UnmarshalJSON

func (d *Definition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Definition struct.

type DefinitionListResult

DefinitionListResult list of policy definitions.

type DefinitionListResult struct {
    autorest.Response `json:"-"`
    // Value - An array of policy definitions.
    Value *[]Definition `json:"value,omitempty"`
    // NextLink - The URL to use for getting the next set of results.
    NextLink *string `json:"nextLink,omitempty"`
}

func (DefinitionListResult) IsEmpty

func (dlr DefinitionListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type DefinitionListResultIterator

DefinitionListResultIterator provides access to a complete listing of Definition values.

type DefinitionListResultIterator struct {
    // contains filtered or unexported fields
}

func NewDefinitionListResultIterator

func NewDefinitionListResultIterator(page DefinitionListResultPage) DefinitionListResultIterator

Creates a new instance of the DefinitionListResultIterator type.

func (*DefinitionListResultIterator) Next

func (iter *DefinitionListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*DefinitionListResultIterator) NextWithContext

func (iter *DefinitionListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (DefinitionListResultIterator) NotDone

func (iter DefinitionListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (DefinitionListResultIterator) Response

func (iter DefinitionListResultIterator) Response() DefinitionListResult

Response returns the raw server response from the last page request.

func (DefinitionListResultIterator) Value

func (iter DefinitionListResultIterator) Value() Definition

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type DefinitionListResultPage

DefinitionListResultPage contains a page of Definition values.

type DefinitionListResultPage struct {
    // contains filtered or unexported fields
}

func NewDefinitionListResultPage

func NewDefinitionListResultPage(cur DefinitionListResult, getNextPage func(context.Context, DefinitionListResult) (DefinitionListResult, error)) DefinitionListResultPage

Creates a new instance of the DefinitionListResultPage type.

func (*DefinitionListResultPage) Next

func (page *DefinitionListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*DefinitionListResultPage) NextWithContext

func (page *DefinitionListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (DefinitionListResultPage) NotDone

func (page DefinitionListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (DefinitionListResultPage) Response

func (page DefinitionListResultPage) Response() DefinitionListResult

Response returns the raw server response from the last page request.

func (DefinitionListResultPage) Values

func (page DefinitionListResultPage) Values() []Definition

Values returns the slice of values for the current page or nil if there are no values.

type DefinitionProperties

DefinitionProperties the policy definition properties.

type DefinitionProperties struct {
    // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'TypeNotSpecified', 'TypeBuiltIn', 'TypeCustom'
    PolicyType Type `json:"policyType,omitempty"`
    // Mode - The policy definition mode. Possible values are NotSpecified, Indexed, and All. Possible values include: 'NotSpecified', 'Indexed', 'All'
    Mode Mode `json:"mode,omitempty"`
    // DisplayName - The display name of the policy definition.
    DisplayName *string `json:"displayName,omitempty"`
    // Description - The policy definition description.
    Description *string `json:"description,omitempty"`
    // PolicyRule - The policy rule.
    PolicyRule interface{} `json:"policyRule,omitempty"`
    // Metadata - The policy definition metadata.
    Metadata interface{} `json:"metadata,omitempty"`
    // Parameters - Required if a parameter is used in policy rule.
    Parameters interface{} `json:"parameters,omitempty"`
}

type DefinitionReference

DefinitionReference the policy definition reference.

type DefinitionReference struct {
    // PolicyDefinitionID - The ID of the policy definition or policy set definition.
    PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
    // Parameters - Required if a parameter is used in policy rule.
    Parameters interface{} `json:"parameters,omitempty"`
}

type DefinitionsClient

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 {
    BaseClient
}

func NewDefinitionsClient

func NewDefinitionsClient(subscriptionID string) DefinitionsClient

NewDefinitionsClient creates an instance of the DefinitionsClient client.

func NewDefinitionsClientWithBaseURI

func NewDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) DefinitionsClient

NewDefinitionsClientWithBaseURI creates an instance of the DefinitionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (DefinitionsClient) CreateOrUpdate

func (client DefinitionsClient) CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters Definition) (result Definition, err error)

CreateOrUpdate this operation creates or updates a policy definition in the given subscription with the given name. Parameters: policyDefinitionName - the name of the policy definition to create. parameters - the policy definition properties.

func (DefinitionsClient) CreateOrUpdateAtManagementGroup

func (client DefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (result Definition, err error)

CreateOrUpdateAtManagementGroup this operation creates or updates a policy definition in the given management group with the given name. Parameters: policyDefinitionName - the name of the policy definition to create. parameters - the policy definition properties. managementGroupID - the ID of the management group.

func (DefinitionsClient) CreateOrUpdateAtManagementGroupPreparer

func (client DefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, parameters Definition, managementGroupID string) (*http.Request, error)

CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.

func (DefinitionsClient) CreateOrUpdateAtManagementGroupResponder

func (client DefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result Definition, err error)

CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always closes the http.Response Body.

func (DefinitionsClient) CreateOrUpdateAtManagementGroupSender

func (client DefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error)

CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) CreateOrUpdatePreparer

func (client DefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policyDefinitionName string, parameters Definition) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (DefinitionsClient) CreateOrUpdateResponder

func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (DefinitionsClient) CreateOrUpdateSender

func (client DefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) Delete

func (client DefinitionsClient) Delete(ctx context.Context, policyDefinitionName string) (result autorest.Response, err error)

Delete this operation deletes the policy definition in the given subscription with the given name. Parameters: policyDefinitionName - the name of the policy definition to delete.

func (DefinitionsClient) DeleteAtManagementGroup

func (client DefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result autorest.Response, err error)

DeleteAtManagementGroup this operation deletes the policy definition in the given management group with the given name. Parameters: policyDefinitionName - the name of the policy definition to delete. managementGroupID - the ID of the management group.

func (DefinitionsClient) DeleteAtManagementGroupPreparer

func (client DefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error)

DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.

func (DefinitionsClient) DeleteAtManagementGroupResponder

func (client DefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error)

DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always closes the http.Response Body.

func (DefinitionsClient) DeleteAtManagementGroupSender

func (client DefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error)

DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) DeletePreparer

func (client DefinitionsClient) DeletePreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (DefinitionsClient) DeleteResponder

func (client DefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (DefinitionsClient) DeleteSender

func (client DefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) Get

func (client DefinitionsClient) Get(ctx context.Context, policyDefinitionName string) (result Definition, err error)

Get this operation retrieves the policy definition in the given subscription with the given name. Parameters: policyDefinitionName - the name of the policy definition to get.

func (DefinitionsClient) GetAtManagementGroup

func (client DefinitionsClient) GetAtManagementGroup(ctx context.Context, policyDefinitionName string, managementGroupID string) (result Definition, err error)

GetAtManagementGroup this operation retrieves the policy definition in the given management group with the given name. Parameters: policyDefinitionName - the name of the policy definition to get. managementGroupID - the ID of the management group.

func (DefinitionsClient) GetAtManagementGroupPreparer

func (client DefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policyDefinitionName string, managementGroupID string) (*http.Request, error)

GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.

func (DefinitionsClient) GetAtManagementGroupResponder

func (client DefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result Definition, err error)

GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always closes the http.Response Body.

func (DefinitionsClient) GetAtManagementGroupSender

func (client DefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error)

GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) GetBuiltIn

func (client DefinitionsClient) GetBuiltIn(ctx context.Context, policyDefinitionName string) (result Definition, err error)

GetBuiltIn this operation retrieves the built-in policy definition with the given name. Parameters: policyDefinitionName - the name of the built-in policy definition to get.

func (DefinitionsClient) GetBuiltInPreparer

func (client DefinitionsClient) GetBuiltInPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)

GetBuiltInPreparer prepares the GetBuiltIn request.

func (DefinitionsClient) GetBuiltInResponder

func (client DefinitionsClient) GetBuiltInResponder(resp *http.Response) (result Definition, err error)

GetBuiltInResponder handles the response to the GetBuiltIn request. The method always closes the http.Response Body.

func (DefinitionsClient) GetBuiltInSender

func (client DefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error)

GetBuiltInSender sends the GetBuiltIn request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) GetPreparer

func (client DefinitionsClient) GetPreparer(ctx context.Context, policyDefinitionName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (DefinitionsClient) GetResponder

func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (DefinitionsClient) GetSender

func (client DefinitionsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) List

func (client DefinitionsClient) List(ctx context.Context) (result DefinitionListResultPage, err error)

List this operation retrieves a list of all the policy definitions in a given subscription.

func (DefinitionsClient) ListBuiltIn

func (client DefinitionsClient) ListBuiltIn(ctx context.Context) (result DefinitionListResultPage, err error)

ListBuiltIn this operation retrieves a list of all the built-in policy definitions.

func (DefinitionsClient) ListBuiltInComplete

func (client DefinitionsClient) ListBuiltInComplete(ctx context.Context) (result DefinitionListResultIterator, err error)

ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.

func (DefinitionsClient) ListBuiltInPreparer

func (client DefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error)

ListBuiltInPreparer prepares the ListBuiltIn request.

func (DefinitionsClient) ListBuiltInResponder

func (client DefinitionsClient) ListBuiltInResponder(resp *http.Response) (result DefinitionListResult, err error)

ListBuiltInResponder handles the response to the ListBuiltIn request. The method always closes the http.Response Body.

func (DefinitionsClient) ListBuiltInSender

func (client DefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error)

ListBuiltInSender sends the ListBuiltIn request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) ListByManagementGroup

func (client DefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result DefinitionListResultPage, err error)

ListByManagementGroup this operation retrieves a list of all the policy definitions in a given management group. Parameters: managementGroupID - the ID of the management group.

func (DefinitionsClient) ListByManagementGroupComplete

func (client DefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result DefinitionListResultIterator, err error)

ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.

func (DefinitionsClient) ListByManagementGroupPreparer

func (client DefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error)

ListByManagementGroupPreparer prepares the ListByManagementGroup request.

func (DefinitionsClient) ListByManagementGroupResponder

func (client DefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result DefinitionListResult, err error)

ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always closes the http.Response Body.

func (DefinitionsClient) ListByManagementGroupSender

func (client DefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error)

ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the http.Response Body if it receives an error.

func (DefinitionsClient) ListComplete

func (client DefinitionsClient) ListComplete(ctx context.Context) (result DefinitionListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (DefinitionsClient) ListPreparer

func (client DefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (DefinitionsClient) ListResponder

func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (DefinitionsClient) ListSender

func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type ErrorResponse

ErrorResponse error response indicates Azure Resource Manager is not able to process the incoming request. The reason is provided in the error message.

type ErrorResponse struct {
    // HTTPStatus - Http status code.
    HTTPStatus *string `json:"httpStatus,omitempty"`
    // ErrorCode - Error code.
    ErrorCode *string `json:"errorCode,omitempty"`
    // ErrorMessage - Error message indicating why the operation failed.
    ErrorMessage *string `json:"errorMessage,omitempty"`
}

type Mode

Mode enumerates the values for mode.

type Mode string
const (
    // All ...
    All Mode = "All"
    // Indexed ...
    Indexed Mode = "Indexed"
    // NotSpecified ...
    NotSpecified Mode = "NotSpecified"
)

func PossibleModeValues

func PossibleModeValues() []Mode

PossibleModeValues returns an array of possible values for the Mode const type.

type SetDefinition

SetDefinition the policy set definition.

type SetDefinition struct {
    autorest.Response `json:"-"`
    // SetDefinitionProperties - The policy definition properties.
    *SetDefinitionProperties `json:"properties,omitempty"`
    // ID - READ-ONLY; The ID of the policy set definition.
    ID *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the policy set definition.
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource (Microsoft.Authorization/policySetDefinitions).
    Type *string `json:"type,omitempty"`
}

func (SetDefinition) MarshalJSON

func (sd SetDefinition) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SetDefinition.

func (*SetDefinition) UnmarshalJSON

func (sd *SetDefinition) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for SetDefinition struct.

type SetDefinitionListResult

SetDefinitionListResult list of policy set definitions.

type SetDefinitionListResult struct {
    autorest.Response `json:"-"`
    // Value - An array of policy set definitions.
    Value *[]SetDefinition `json:"value,omitempty"`
    // NextLink - The URL to use for getting the next set of results.
    NextLink *string `json:"nextLink,omitempty"`
}

func (SetDefinitionListResult) IsEmpty

func (sdlr SetDefinitionListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type SetDefinitionListResultIterator

SetDefinitionListResultIterator provides access to a complete listing of SetDefinition values.

type SetDefinitionListResultIterator struct {
    // contains filtered or unexported fields
}

func NewSetDefinitionListResultIterator

func NewSetDefinitionListResultIterator(page SetDefinitionListResultPage) SetDefinitionListResultIterator

Creates a new instance of the SetDefinitionListResultIterator type.

func (*SetDefinitionListResultIterator) Next

func (iter *SetDefinitionListResultIterator) Next() error

Next advances to the next value. If there was an error making the request the iterator does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*SetDefinitionListResultIterator) NextWithContext

func (iter *SetDefinitionListResultIterator) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next value. If there was an error making the request the iterator does not advance and the error is returned.

func (SetDefinitionListResultIterator) NotDone

func (iter SetDefinitionListResultIterator) NotDone() bool

NotDone returns true if the enumeration should be started or is not yet complete.

func (SetDefinitionListResultIterator) Response

func (iter SetDefinitionListResultIterator) Response() SetDefinitionListResult

Response returns the raw server response from the last page request.

func (SetDefinitionListResultIterator) Value

func (iter SetDefinitionListResultIterator) Value() SetDefinition

Value returns the current value or a zero-initialized value if the iterator has advanced beyond the end of the collection.

type SetDefinitionListResultPage

SetDefinitionListResultPage contains a page of SetDefinition values.

type SetDefinitionListResultPage struct {
    // contains filtered or unexported fields
}

func NewSetDefinitionListResultPage

func NewSetDefinitionListResultPage(cur SetDefinitionListResult, getNextPage func(context.Context, SetDefinitionListResult) (SetDefinitionListResult, error)) SetDefinitionListResultPage

Creates a new instance of the SetDefinitionListResultPage type.

func (*SetDefinitionListResultPage) Next

func (page *SetDefinitionListResultPage) Next() error

Next advances to the next page of values. If there was an error making the request the page does not advance and the error is returned. Deprecated: Use NextWithContext() instead.

func (*SetDefinitionListResultPage) NextWithContext

func (page *SetDefinitionListResultPage) NextWithContext(ctx context.Context) (err error)

NextWithContext advances to the next page of values. If there was an error making the request the page does not advance and the error is returned.

func (SetDefinitionListResultPage) NotDone

func (page SetDefinitionListResultPage) NotDone() bool

NotDone returns true if the page enumeration should be started or is not yet complete.

func (SetDefinitionListResultPage) Response

func (page SetDefinitionListResultPage) Response() SetDefinitionListResult

Response returns the raw server response from the last page request.

func (SetDefinitionListResultPage) Values

func (page SetDefinitionListResultPage) Values() []SetDefinition

Values returns the slice of values for the current page or nil if there are no values.

type SetDefinitionProperties

SetDefinitionProperties the policy set definition properties.

type SetDefinitionProperties struct {
    // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, and Custom. Possible values include: 'TypeNotSpecified', 'TypeBuiltIn', 'TypeCustom'
    PolicyType Type `json:"policyType,omitempty"`
    // DisplayName - The display name of the policy set definition.
    DisplayName *string `json:"displayName,omitempty"`
    // Description - The policy set definition description.
    Description *string `json:"description,omitempty"`
    // Metadata - The policy set definition metadata.
    Metadata interface{} `json:"metadata,omitempty"`
    // Parameters - The policy set definition parameters that can be used in policy definition references.
    Parameters interface{} `json:"parameters,omitempty"`
    // PolicyDefinitions - An array of policy definition references.
    PolicyDefinitions *[]DefinitionReference `json:"policyDefinitions,omitempty"`
}

type SetDefinitionsClient

SetDefinitionsClient is the to manage and control access to your resources, you can define customized policies and assign them at a scope.

type SetDefinitionsClient struct {
    BaseClient
}

func NewSetDefinitionsClient

func NewSetDefinitionsClient(subscriptionID string) SetDefinitionsClient

NewSetDefinitionsClient creates an instance of the SetDefinitionsClient client.

func NewSetDefinitionsClientWithBaseURI

func NewSetDefinitionsClientWithBaseURI(baseURI string, subscriptionID string) SetDefinitionsClient

NewSetDefinitionsClientWithBaseURI creates an instance of the SetDefinitionsClient client using a custom endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack).

func (SetDefinitionsClient) CreateOrUpdate

func (client SetDefinitionsClient) CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (result SetDefinition, err error)

CreateOrUpdate this operation creates or updates a policy set definition in the given subscription with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to create. parameters - the policy set definition properties.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroup

func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroup(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (result SetDefinition, err error)

CreateOrUpdateAtManagementGroup this operation creates or updates a policy set definition in the given management group with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to create. parameters - the policy set definition properties. managementGroupID - the ID of the management group.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroupPreparer

func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, managementGroupID string) (*http.Request, error)

CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder

func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error)

CreateOrUpdateAtManagementGroupResponder handles the response to the CreateOrUpdateAtManagementGroup request. The method always closes the http.Response Body.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroupSender

func (client SetDefinitionsClient) CreateOrUpdateAtManagementGroupSender(req *http.Request) (*http.Response, error)

CreateOrUpdateAtManagementGroupSender sends the CreateOrUpdateAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) CreateOrUpdatePreparer

func (client SetDefinitionsClient) CreateOrUpdatePreparer(ctx context.Context, policySetDefinitionName string, parameters SetDefinition) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (SetDefinitionsClient) CreateOrUpdateResponder

func (client SetDefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result SetDefinition, err error)

CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.

func (SetDefinitionsClient) CreateOrUpdateSender

func (client SetDefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)

CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) Delete

func (client SetDefinitionsClient) Delete(ctx context.Context, policySetDefinitionName string) (result autorest.Response, err error)

Delete this operation deletes the policy set definition in the given subscription with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to delete.

func (SetDefinitionsClient) DeleteAtManagementGroup

func (client SetDefinitionsClient) DeleteAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result autorest.Response, err error)

DeleteAtManagementGroup this operation deletes the policy set definition in the given management group with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to delete. managementGroupID - the ID of the management group.

func (SetDefinitionsClient) DeleteAtManagementGroupPreparer

func (client SetDefinitionsClient) DeleteAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error)

DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.

func (SetDefinitionsClient) DeleteAtManagementGroupResponder

func (client SetDefinitionsClient) DeleteAtManagementGroupResponder(resp *http.Response) (result autorest.Response, err error)

DeleteAtManagementGroupResponder handles the response to the DeleteAtManagementGroup request. The method always closes the http.Response Body.

func (SetDefinitionsClient) DeleteAtManagementGroupSender

func (client SetDefinitionsClient) DeleteAtManagementGroupSender(req *http.Request) (*http.Response, error)

DeleteAtManagementGroupSender sends the DeleteAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) DeletePreparer

func (client SetDefinitionsClient) DeletePreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)

DeletePreparer prepares the Delete request.

func (SetDefinitionsClient) DeleteResponder

func (client SetDefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)

DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.

func (SetDefinitionsClient) DeleteSender

func (client SetDefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error)

DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) Get

func (client SetDefinitionsClient) Get(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error)

Get this operation retrieves the policy set definition in the given subscription with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to get.

func (SetDefinitionsClient) GetAtManagementGroup

func (client SetDefinitionsClient) GetAtManagementGroup(ctx context.Context, policySetDefinitionName string, managementGroupID string) (result SetDefinition, err error)

GetAtManagementGroup this operation retrieves the policy set definition in the given management group with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to get. managementGroupID - the ID of the management group.

func (SetDefinitionsClient) GetAtManagementGroupPreparer

func (client SetDefinitionsClient) GetAtManagementGroupPreparer(ctx context.Context, policySetDefinitionName string, managementGroupID string) (*http.Request, error)

GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.

func (SetDefinitionsClient) GetAtManagementGroupResponder

func (client SetDefinitionsClient) GetAtManagementGroupResponder(resp *http.Response) (result SetDefinition, err error)

GetAtManagementGroupResponder handles the response to the GetAtManagementGroup request. The method always closes the http.Response Body.

func (SetDefinitionsClient) GetAtManagementGroupSender

func (client SetDefinitionsClient) GetAtManagementGroupSender(req *http.Request) (*http.Response, error)

GetAtManagementGroupSender sends the GetAtManagementGroup request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) GetBuiltIn

func (client SetDefinitionsClient) GetBuiltIn(ctx context.Context, policySetDefinitionName string) (result SetDefinition, err error)

GetBuiltIn this operation retrieves the built-in policy set definition with the given name. Parameters: policySetDefinitionName - the name of the policy set definition to get.

func (SetDefinitionsClient) GetBuiltInPreparer

func (client SetDefinitionsClient) GetBuiltInPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)

GetBuiltInPreparer prepares the GetBuiltIn request.

func (SetDefinitionsClient) GetBuiltInResponder

func (client SetDefinitionsClient) GetBuiltInResponder(resp *http.Response) (result SetDefinition, err error)

GetBuiltInResponder handles the response to the GetBuiltIn request. The method always closes the http.Response Body.

func (SetDefinitionsClient) GetBuiltInSender

func (client SetDefinitionsClient) GetBuiltInSender(req *http.Request) (*http.Response, error)

GetBuiltInSender sends the GetBuiltIn request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) GetPreparer

func (client SetDefinitionsClient) GetPreparer(ctx context.Context, policySetDefinitionName string) (*http.Request, error)

GetPreparer prepares the Get request.

func (SetDefinitionsClient) GetResponder

func (client SetDefinitionsClient) GetResponder(resp *http.Response) (result SetDefinition, err error)

GetResponder handles the response to the Get request. The method always closes the http.Response Body.

func (SetDefinitionsClient) GetSender

func (client SetDefinitionsClient) GetSender(req *http.Request) (*http.Response, error)

GetSender sends the Get request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) List

func (client SetDefinitionsClient) List(ctx context.Context) (result SetDefinitionListResultPage, err error)

List this operation retrieves a list of all the policy set definitions in the given subscription.

func (SetDefinitionsClient) ListBuiltIn

func (client SetDefinitionsClient) ListBuiltIn(ctx context.Context) (result SetDefinitionListResultPage, err error)

ListBuiltIn this operation retrieves a list of all the built-in policy set definitions.

func (SetDefinitionsClient) ListBuiltInComplete

func (client SetDefinitionsClient) ListBuiltInComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error)

ListBuiltInComplete enumerates all values, automatically crossing page boundaries as required.

func (SetDefinitionsClient) ListBuiltInPreparer

func (client SetDefinitionsClient) ListBuiltInPreparer(ctx context.Context) (*http.Request, error)

ListBuiltInPreparer prepares the ListBuiltIn request.

func (SetDefinitionsClient) ListBuiltInResponder

func (client SetDefinitionsClient) ListBuiltInResponder(resp *http.Response) (result SetDefinitionListResult, err error)

ListBuiltInResponder handles the response to the ListBuiltIn request. The method always closes the http.Response Body.

func (SetDefinitionsClient) ListBuiltInSender

func (client SetDefinitionsClient) ListBuiltInSender(req *http.Request) (*http.Response, error)

ListBuiltInSender sends the ListBuiltIn request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) ListByManagementGroup

func (client SetDefinitionsClient) ListByManagementGroup(ctx context.Context, managementGroupID string) (result SetDefinitionListResultPage, err error)

ListByManagementGroup this operation retrieves a list of all the a policy set definition in the given management group. Parameters: managementGroupID - the ID of the management group.

func (SetDefinitionsClient) ListByManagementGroupComplete

func (client SetDefinitionsClient) ListByManagementGroupComplete(ctx context.Context, managementGroupID string) (result SetDefinitionListResultIterator, err error)

ListByManagementGroupComplete enumerates all values, automatically crossing page boundaries as required.

func (SetDefinitionsClient) ListByManagementGroupPreparer

func (client SetDefinitionsClient) ListByManagementGroupPreparer(ctx context.Context, managementGroupID string) (*http.Request, error)

ListByManagementGroupPreparer prepares the ListByManagementGroup request.

func (SetDefinitionsClient) ListByManagementGroupResponder

func (client SetDefinitionsClient) ListByManagementGroupResponder(resp *http.Response) (result SetDefinitionListResult, err error)

ListByManagementGroupResponder handles the response to the ListByManagementGroup request. The method always closes the http.Response Body.

func (SetDefinitionsClient) ListByManagementGroupSender

func (client SetDefinitionsClient) ListByManagementGroupSender(req *http.Request) (*http.Response, error)

ListByManagementGroupSender sends the ListByManagementGroup request. The method will close the http.Response Body if it receives an error.

func (SetDefinitionsClient) ListComplete

func (client SetDefinitionsClient) ListComplete(ctx context.Context) (result SetDefinitionListResultIterator, err error)

ListComplete enumerates all values, automatically crossing page boundaries as required.

func (SetDefinitionsClient) ListPreparer

func (client SetDefinitionsClient) ListPreparer(ctx context.Context) (*http.Request, error)

ListPreparer prepares the List request.

func (SetDefinitionsClient) ListResponder

func (client SetDefinitionsClient) ListResponder(resp *http.Response) (result SetDefinitionListResult, err error)

ListResponder handles the response to the List request. The method always closes the http.Response Body.

func (SetDefinitionsClient) ListSender

func (client SetDefinitionsClient) ListSender(req *http.Request) (*http.Response, error)

ListSender sends the List request. The method will close the http.Response Body if it receives an error.

type Sku

Sku the policy sku. This property is optional, obsolete, and will be ignored.

type Sku struct {
    // Name - The name of the policy sku. Possible values are A0 and A1.
    Name *string `json:"name,omitempty"`
    // Tier - The policy sku tier. Possible values are Free and Standard.
    Tier *string `json:"tier,omitempty"`
}

type Type

Type enumerates the values for type.

type Type string
const (
    // TypeBuiltIn ...
    TypeBuiltIn Type = "BuiltIn"
    // TypeCustom ...
    TypeCustom Type = "Custom"
    // TypeNotSpecified ...
    TypeNotSpecified Type = "NotSpecified"
)

func PossibleTypeValues

func PossibleTypeValues() []Type

PossibleTypeValues returns an array of possible values for the Type const type.

Subdirectories

Name Synopsis
..
policyapi Deprecated: Please note, this package has been deprecated.