azure-sdk-for-go: github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2020-03-01-preview/policy Index | Files | Directories

package policy

import "github.com/Azure/azure-sdk-for-go/services/preview/resources/mgmt/2020-03-01-preview/policy"

Package policy implements the Azure ARM Policy service API version .

Index

Package Files

assignments.go client.go definitions.go enums.go exemptions.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 Uses

func UserAgent() string

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

func Version Uses

func Version() string

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

type Assignment Uses

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"`
    // Location - The location of the policy assignment. Only required when utilizing managed identity.
    Location *string `json:"location,omitempty"`
    // Identity - The managed identity associated with the policy assignment.
    Identity *Identity `json:"identity,omitempty"`
}

Assignment the policy assignment.

func (Assignment) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Assignment.

func (*Assignment) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Assignment struct.

type AssignmentListResult Uses

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"`
}

AssignmentListResult list of policy assignments.

func (AssignmentListResult) IsEmpty Uses

func (alr AssignmentListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type AssignmentListResultIterator Uses

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

AssignmentListResultIterator provides access to a complete listing of Assignment values.

func NewAssignmentListResultIterator Uses

func NewAssignmentListResultIterator(page AssignmentListResultPage) AssignmentListResultIterator

Creates a new instance of the AssignmentListResultIterator type.

func (*AssignmentListResultIterator) Next Uses

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 Uses

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 Uses

func (iter AssignmentListResultIterator) NotDone() bool

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

func (AssignmentListResultIterator) Response Uses

func (iter AssignmentListResultIterator) Response() AssignmentListResult

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

func (AssignmentListResultIterator) Value Uses

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 Uses

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

AssignmentListResultPage contains a page of Assignment values.

func NewAssignmentListResultPage Uses

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

Creates a new instance of the AssignmentListResultPage type.

func (*AssignmentListResultPage) Next Uses

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 Uses

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 Uses

func (page AssignmentListResultPage) NotDone() bool

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

func (AssignmentListResultPage) Response Uses

func (page AssignmentListResultPage) Response() AssignmentListResult

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

func (AssignmentListResultPage) Values Uses

func (page AssignmentListResultPage) Values() []Assignment

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

type AssignmentProperties Uses

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 - The parameter values for the assigned policy rule. The keys are the parameter names.
    Parameters map[string]*ParameterValuesValue `json:"parameters"`
    // Description - This message will be part of response in case of policy violation.
    Description *string `json:"description,omitempty"`
    // Metadata - The policy assignment metadata. Metadata is an open ended object and is typically a collection of key value pairs.
    Metadata interface{} `json:"metadata,omitempty"`
    // EnforcementMode - The policy assignment enforcement mode. Possible values are Default and DoNotEnforce. Possible values include: 'Default', 'DoNotEnforce'
    EnforcementMode EnforcementMode `json:"enforcementMode,omitempty"`
}

AssignmentProperties the policy assignment properties.

func (AssignmentProperties) MarshalJSON Uses

func (ap AssignmentProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for AssignmentProperties.

type AssignmentsClient Uses

type AssignmentsClient struct {
    BaseClient
}

AssignmentsClient is the client for the Assignments methods of the Policy service.

func NewAssignmentsClient Uses

func NewAssignmentsClient() AssignmentsClient

NewAssignmentsClient creates an instance of the AssignmentsClient client.

func NewAssignmentsClientWithBaseURI Uses

func NewAssignmentsClientWithBaseURI(baseURI 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 Uses

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 Uses

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 Uses

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

CreateByIDPreparer prepares the CreateByID request.

func (AssignmentsClient) CreateByIDResponder Uses

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 Uses

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 Uses

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

CreatePreparer prepares the Create request.

func (AssignmentsClient) CreateResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

DeleteByIDPreparer prepares the DeleteByID request.

func (AssignmentsClient) DeleteByIDResponder Uses

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 Uses

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 Uses

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

DeletePreparer prepares the Delete request.

func (AssignmentsClient) DeleteResponder Uses

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 Uses

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 Uses

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 Uses

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 Uses

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

GetByIDPreparer prepares the GetByID request.

func (AssignmentsClient) GetByIDResponder Uses

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 Uses

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 Uses

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

GetPreparer prepares the Get request.

func (AssignmentsClient) GetResponder Uses

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 Uses

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 Uses

func (client AssignmentsClient) List(ctx context.Context, subscriptionID string, filter string, top *int32) (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()', 'atExactScope()' 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=atExactScope() is provided, the returned list only includes all policy assignments that at 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: subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (AssignmentsClient) ListComplete Uses

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

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

func (AssignmentsClient) ListForManagementGroup Uses

func (client AssignmentsClient) ListForManagementGroup(ctx context.Context, managementGroupID string, filter string, top *int32) (result AssignmentListResultPage, err error)

ListForManagementGroup this operation retrieves the list of all policy assignments applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}”. If $filter=atScope() is provided, the returned list includes all policy assignments that are assigned to the management group or the management group's ancestors. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the management 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 management group. Parameters: managementGroupID - the ID of the management group. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (AssignmentsClient) ListForManagementGroupComplete Uses

func (client AssignmentsClient) ListForManagementGroupComplete(ctx context.Context, managementGroupID string, filter string, top *int32) (result AssignmentListResultIterator, err error)

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

func (AssignmentsClient) ListForManagementGroupPreparer Uses

func (client AssignmentsClient) ListForManagementGroupPreparer(ctx context.Context, managementGroupID string, filter string, top *int32) (*http.Request, error)

ListForManagementGroupPreparer prepares the ListForManagementGroup request.

func (AssignmentsClient) ListForManagementGroupResponder Uses

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

ListForManagementGroupResponder handles the response to the ListForManagementGroup request. The method always closes the http.Response Body.

func (AssignmentsClient) ListForManagementGroupSender Uses

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

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

func (AssignmentsClient) ListForResource Uses

func (client AssignmentsClient) ListForResource(ctx context.Context, resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, subscriptionID string, filter string, top *int32) (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()', 'atExactScope()' 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=atExactScope() is provided, the returned list only includes all policy assignments that at the resource level. 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. subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (AssignmentsClient) ListForResourceComplete Uses

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

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

func (AssignmentsClient) ListForResourceGroup Uses

func (client AssignmentsClient) ListForResourceGroup(ctx context.Context, resourceGroupName string, subscriptionID string, filter string, top *int32) (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()', 'atExactScope()' 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=atExactScope() is provided, the returned list only includes all policy assignments that at 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. subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()' or 'policyDefinitionId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atScope() is provided, the returned list only includes all policy assignments that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy assignments that at the given scope. If $filter=policyDefinitionId eq '{value}' is provided, the returned list includes all policy assignments of the policy definition whose id is {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (AssignmentsClient) ListForResourceGroupComplete Uses

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

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

func (AssignmentsClient) ListForResourceGroupPreparer Uses

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

ListForResourceGroupPreparer prepares the ListForResourceGroup request.

func (AssignmentsClient) ListForResourceGroupResponder Uses

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 Uses

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 Uses

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

ListForResourcePreparer prepares the ListForResource request.

func (AssignmentsClient) ListForResourceResponder Uses

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 Uses

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 Uses

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

ListPreparer prepares the List request.

func (AssignmentsClient) ListResponder Uses

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 Uses

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 AzureEntityResource Uses

type AzureEntityResource struct {
    // Etag - READ-ONLY; Resource Etag.
    Etag *string `json:"etag,omitempty"`
    // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the resource
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Type *string `json:"type,omitempty"`
}

AzureEntityResource the resource model definition for an Azure Resource Manager resource with an etag.

type BaseClient Uses

type BaseClient struct {
    autorest.Client
    BaseURI string
}

BaseClient is the base client for Policy.

func New Uses

func New() BaseClient

New creates an instance of the BaseClient client.

func NewWithBaseURI Uses

func NewWithBaseURI(baseURI 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 CloudError Uses

type CloudError struct {
    // Error - The error object.
    Error *ErrorDetail `json:"error,omitempty"`
}

CloudError common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

type CreatedByType Uses

type CreatedByType string

CreatedByType enumerates the values for created by type.

const (
    // Application ...
    Application CreatedByType = "Application"
    // Key ...
    Key CreatedByType = "Key"
    // ManagedIdentity ...
    ManagedIdentity CreatedByType = "ManagedIdentity"
    // User ...
    User CreatedByType = "User"
)

func PossibleCreatedByTypeValues Uses

func PossibleCreatedByTypeValues() []CreatedByType

PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type.

type Definition Uses

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"`
}

Definition the policy definition.

func (Definition) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for Definition.

func (*Definition) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for Definition struct.

type DefinitionGroup Uses

type DefinitionGroup struct {
    // Name - The name of the group.
    Name *string `json:"name,omitempty"`
    // DisplayName - The group's display name.
    DisplayName *string `json:"displayName,omitempty"`
    // Category - The group's category.
    Category *string `json:"category,omitempty"`
    // Description - The group's description.
    Description *string `json:"description,omitempty"`
    // AdditionalMetadataID - A resource ID of a resource that contains additional metadata about the group.
    AdditionalMetadataID *string `json:"additionalMetadataId,omitempty"`
}

DefinitionGroup the policy definition group.

type DefinitionListResult Uses

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"`
}

DefinitionListResult list of policy definitions.

func (DefinitionListResult) IsEmpty Uses

func (dlr DefinitionListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type DefinitionListResultIterator Uses

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

DefinitionListResultIterator provides access to a complete listing of Definition values.

func NewDefinitionListResultIterator Uses

func NewDefinitionListResultIterator(page DefinitionListResultPage) DefinitionListResultIterator

Creates a new instance of the DefinitionListResultIterator type.

func (*DefinitionListResultIterator) Next Uses

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 Uses

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 Uses

func (iter DefinitionListResultIterator) NotDone() bool

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

func (DefinitionListResultIterator) Response Uses

func (iter DefinitionListResultIterator) Response() DefinitionListResult

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

func (DefinitionListResultIterator) Value Uses

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 Uses

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

DefinitionListResultPage contains a page of Definition values.

func NewDefinitionListResultPage Uses

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

Creates a new instance of the DefinitionListResultPage type.

func (*DefinitionListResultPage) Next Uses

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 Uses

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 Uses

func (page DefinitionListResultPage) NotDone() bool

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

func (DefinitionListResultPage) Response Uses

func (page DefinitionListResultPage) Response() DefinitionListResult

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

func (DefinitionListResultPage) Values Uses

func (page DefinitionListResultPage) Values() []Definition

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

type DefinitionProperties Uses

type DefinitionProperties struct {
    // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
    PolicyType Type `json:"policyType,omitempty"`
    // Mode - The policy definition mode. Some examples are All, Indexed, Microsoft.KeyVault.Data.
    Mode *string `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 is an open ended object and is typically a collection of key value pairs.
    Metadata interface{} `json:"metadata,omitempty"`
    // Parameters - The parameter definitions for parameters used in the policy rule. The keys are the parameter names.
    Parameters map[string]*ParameterDefinitionsValue `json:"parameters"`
}

DefinitionProperties the policy definition properties.

func (DefinitionProperties) MarshalJSON Uses

func (dp DefinitionProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DefinitionProperties.

type DefinitionReference Uses

type DefinitionReference struct {
    // PolicyDefinitionID - The ID of the policy definition or policy set definition.
    PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"`
    // Parameters - The parameter values for the referenced policy rule. The keys are the parameter names.
    Parameters map[string]*ParameterValuesValue `json:"parameters"`
    // PolicyDefinitionReferenceID - A unique id (within the policy set definition) for this policy definition reference.
    PolicyDefinitionReferenceID *string `json:"policyDefinitionReferenceId,omitempty"`
    // GroupNames - The name of the groups that this policy definition reference belongs to.
    GroupNames *[]string `json:"groupNames,omitempty"`
}

DefinitionReference the policy definition reference.

func (DefinitionReference) MarshalJSON Uses

func (dr DefinitionReference) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for DefinitionReference.

type DefinitionsClient Uses

type DefinitionsClient struct {
    BaseClient
}

DefinitionsClient is the client for the Definitions methods of the Policy service.

func NewDefinitionsClient Uses

func NewDefinitionsClient() DefinitionsClient

NewDefinitionsClient creates an instance of the DefinitionsClient client.

func NewDefinitionsClientWithBaseURI Uses

func NewDefinitionsClientWithBaseURI(baseURI 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 Uses

func (client DefinitionsClient) CreateOrUpdate(ctx context.Context, policyDefinitionName string, parameters Definition, subscriptionID string) (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. subscriptionID - the ID of the target subscription.

func (DefinitionsClient) CreateOrUpdateAtManagementGroup Uses

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 Uses

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

CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.

func (DefinitionsClient) CreateOrUpdateAtManagementGroupResponder Uses

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 Uses

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 Uses

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

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (DefinitionsClient) CreateOrUpdateResponder Uses

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 Uses

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 Uses

func (client DefinitionsClient) Delete(ctx context.Context, policyDefinitionName string, subscriptionID 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. subscriptionID - the ID of the target subscription.

func (DefinitionsClient) DeleteAtManagementGroup Uses

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 Uses

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

DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.

func (DefinitionsClient) DeleteAtManagementGroupResponder Uses

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 Uses

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 Uses

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

DeletePreparer prepares the Delete request.

func (DefinitionsClient) DeleteResponder Uses

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 Uses

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 Uses

func (client DefinitionsClient) Get(ctx context.Context, policyDefinitionName string, subscriptionID 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. subscriptionID - the ID of the target subscription.

func (DefinitionsClient) GetAtManagementGroup Uses

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 Uses

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

GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.

func (DefinitionsClient) GetAtManagementGroupResponder Uses

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 Uses

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 Uses

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 Uses

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

GetBuiltInPreparer prepares the GetBuiltIn request.

func (DefinitionsClient) GetBuiltInResponder Uses

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 Uses

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 Uses

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

GetPreparer prepares the Get request.

func (DefinitionsClient) GetResponder Uses

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 Uses

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 Uses

func (client DefinitionsClient) List(ctx context.Context, subscriptionID string, filter string, top *int32) (result DefinitionListResultPage, err error)

List this operation retrieves a list of all the policy definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, the unfiltered list includes all policy definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}. Parameters: subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (DefinitionsClient) ListBuiltIn Uses

func (client DefinitionsClient) ListBuiltIn(ctx context.Context, filter string, top *int32) (result DefinitionListResultPage, err error)

ListBuiltIn this operation retrieves a list of all the built-in policy definitions that match the optional given $filter. If $filter='policyType -eq {value}' is provided, the returned list only includes all built-in policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all built-in policy definitions whose category match the {value}. Parameters: filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (DefinitionsClient) ListBuiltInComplete Uses

func (client DefinitionsClient) ListBuiltInComplete(ctx context.Context, filter string, top *int32) (result DefinitionListResultIterator, err error)

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

func (DefinitionsClient) ListBuiltInPreparer Uses

func (client DefinitionsClient) ListBuiltInPreparer(ctx context.Context, filter string, top *int32) (*http.Request, error)

ListBuiltInPreparer prepares the ListBuiltIn request.

func (DefinitionsClient) ListBuiltInResponder Uses

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 Uses

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 Uses

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

ListByManagementGroup this operation retrieves a list of all the policy definitions in a given management group that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, the unfiltered list includes all policy definitions associated with the management group, including those that apply directly or from management groups that contain the given management group. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given management group. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}. Parameters: managementGroupID - the ID of the management group. filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (DefinitionsClient) ListByManagementGroupComplete Uses

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

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

func (DefinitionsClient) ListByManagementGroupPreparer Uses

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

ListByManagementGroupPreparer prepares the ListByManagementGroup request.

func (DefinitionsClient) ListByManagementGroupResponder Uses

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 Uses

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 Uses

func (client DefinitionsClient) ListComplete(ctx context.Context, subscriptionID string, filter string, top *int32) (result DefinitionListResultIterator, err error)

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

func (DefinitionsClient) ListPreparer Uses

func (client DefinitionsClient) ListPreparer(ctx context.Context, subscriptionID string, filter string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (DefinitionsClient) ListResponder Uses

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 Uses

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 EnforcementMode Uses

type EnforcementMode string

EnforcementMode enumerates the values for enforcement mode.

const (
    // Default The policy effect is enforced during resource creation or update.
    Default EnforcementMode = "Default"
    // DoNotEnforce The policy effect is not enforced during resource creation or update.
    DoNotEnforce EnforcementMode = "DoNotEnforce"
)

func PossibleEnforcementModeValues Uses

func PossibleEnforcementModeValues() []EnforcementMode

PossibleEnforcementModeValues returns an array of possible values for the EnforcementMode const type.

type ErrorAdditionalInfo Uses

type ErrorAdditionalInfo struct {
    // Type - READ-ONLY; The additional info type.
    Type *string `json:"type,omitempty"`
    // Info - READ-ONLY; The additional info.
    Info interface{} `json:"info,omitempty"`
}

ErrorAdditionalInfo the resource management error additional info.

type ErrorDetail Uses

type ErrorDetail struct {
    // Code - READ-ONLY; The error code.
    Code *string `json:"code,omitempty"`
    // Message - READ-ONLY; The error message.
    Message *string `json:"message,omitempty"`
    // Target - READ-ONLY; The error target.
    Target *string `json:"target,omitempty"`
    // Details - READ-ONLY; The error details.
    Details *[]ErrorDetail `json:"details,omitempty"`
    // AdditionalInfo - READ-ONLY; The error additional info.
    AdditionalInfo *[]ErrorAdditionalInfo `json:"additionalInfo,omitempty"`
}

ErrorDetail the error detail.

type Exemption Uses

type Exemption struct {
    autorest.Response `json:"-"`
    // ExemptionProperties - Properties for the policy exemption.
    *ExemptionProperties `json:"properties,omitempty"`
    // SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information.
    SystemData *SystemData `json:"systemData,omitempty"`
    // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the resource
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Type *string `json:"type,omitempty"`
}

Exemption the policy exemption.

func (Exemption) MarshalJSON Uses

func (e Exemption) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Exemption.

func (*Exemption) UnmarshalJSON Uses

func (e *Exemption) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for Exemption struct.

type ExemptionCategory Uses

type ExemptionCategory string

ExemptionCategory enumerates the values for exemption category.

const (
    // Mitigated This category of exemptions usually means the mitigation actions have been applied to the
    // scope.
    Mitigated ExemptionCategory = "Mitigated"
    // Waiver This category of exemptions usually means the scope is not applicable for the policy.
    Waiver ExemptionCategory = "Waiver"
)

func PossibleExemptionCategoryValues Uses

func PossibleExemptionCategoryValues() []ExemptionCategory

PossibleExemptionCategoryValues returns an array of possible values for the ExemptionCategory const type.

type ExemptionListResult Uses

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

ExemptionListResult list of policy exemptions.

func (ExemptionListResult) IsEmpty Uses

func (elr ExemptionListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

func (ExemptionListResult) MarshalJSON Uses

func (elr ExemptionListResult) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ExemptionListResult.

type ExemptionListResultIterator Uses

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

ExemptionListResultIterator provides access to a complete listing of Exemption values.

func NewExemptionListResultIterator Uses

func NewExemptionListResultIterator(page ExemptionListResultPage) ExemptionListResultIterator

Creates a new instance of the ExemptionListResultIterator type.

func (*ExemptionListResultIterator) Next Uses

func (iter *ExemptionListResultIterator) 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 (*ExemptionListResultIterator) NextWithContext Uses

func (iter *ExemptionListResultIterator) 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 (ExemptionListResultIterator) NotDone Uses

func (iter ExemptionListResultIterator) NotDone() bool

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

func (ExemptionListResultIterator) Response Uses

func (iter ExemptionListResultIterator) Response() ExemptionListResult

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

func (ExemptionListResultIterator) Value Uses

func (iter ExemptionListResultIterator) Value() Exemption

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

type ExemptionListResultPage Uses

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

ExemptionListResultPage contains a page of Exemption values.

func NewExemptionListResultPage Uses

func NewExemptionListResultPage(cur ExemptionListResult, getNextPage func(context.Context, ExemptionListResult) (ExemptionListResult, error)) ExemptionListResultPage

Creates a new instance of the ExemptionListResultPage type.

func (*ExemptionListResultPage) Next Uses

func (page *ExemptionListResultPage) 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 (*ExemptionListResultPage) NextWithContext Uses

func (page *ExemptionListResultPage) 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 (ExemptionListResultPage) NotDone Uses

func (page ExemptionListResultPage) NotDone() bool

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

func (ExemptionListResultPage) Response Uses

func (page ExemptionListResultPage) Response() ExemptionListResult

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

func (ExemptionListResultPage) Values Uses

func (page ExemptionListResultPage) Values() []Exemption

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

type ExemptionProperties Uses

type ExemptionProperties struct {
    // PolicyAssignmentID - The ID of the policy assignment that is being exempted.
    PolicyAssignmentID *string `json:"policyAssignmentId,omitempty"`
    // PolicyDefinitionReferenceIds - The policy definition reference ID list when the associated policy assignment is an assignment of a policy set definition.
    PolicyDefinitionReferenceIds *[]string `json:"policyDefinitionReferenceIds,omitempty"`
    // ExemptionCategory - The policy exemption category. Possible values are Waiver and Mitigated. Possible values include: 'Waiver', 'Mitigated'
    ExemptionCategory ExemptionCategory `json:"exemptionCategory,omitempty"`
    // ExpiresOn - The expiration date and time (in UTC ISO 8601 format yyyy-MM-ddTHH:mm:ssZ) of the policy exemption.
    ExpiresOn *date.Time `json:"expiresOn,omitempty"`
    // DisplayName - The display name of the policy exemption.
    DisplayName *string `json:"displayName,omitempty"`
    // Description - The description of the policy exemption.
    Description *string `json:"description,omitempty"`
    // Metadata - The policy exemption metadata. Metadata is an open ended object and is typically a collection of key value pairs.
    Metadata interface{} `json:"metadata,omitempty"`
}

ExemptionProperties the policy exemption properties.

type ExemptionsClient Uses

type ExemptionsClient struct {
    BaseClient
}

ExemptionsClient is the client for the Exemptions methods of the Policy service.

func NewExemptionsClient Uses

func NewExemptionsClient() ExemptionsClient

NewExemptionsClient creates an instance of the ExemptionsClient client.

func NewExemptionsClientWithBaseURI Uses

func NewExemptionsClientWithBaseURI(baseURI string) ExemptionsClient

NewExemptionsClientWithBaseURI creates an instance of the ExemptionsClient 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 (ExemptionsClient) CreateOrUpdate Uses

func (client ExemptionsClient) CreateOrUpdate(ctx context.Context, parameters Exemption, scope string, policyExemptionName string) (result Exemption, err error)

CreateOrUpdate this operation creates or updates a policy exemption with the given scope and name. Policy exemptions apply to all resources contained within their scope. For example, when you create a policy exemption at resource group scope for a policy assignment at the same or above level, the exemption exempts to all applicable resources in the resource group. Parameters: parameters - parameters for the policy exemption. scope - the scope of the policy exemption. 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}' policyExemptionName - the name of the policy exemption to delete.

func (ExemptionsClient) CreateOrUpdatePreparer Uses

func (client ExemptionsClient) CreateOrUpdatePreparer(ctx context.Context, parameters Exemption, scope string, policyExemptionName string) (*http.Request, error)

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (ExemptionsClient) CreateOrUpdateResponder Uses

func (client ExemptionsClient) CreateOrUpdateResponder(resp *http.Response) (result Exemption, err error)

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

func (ExemptionsClient) CreateOrUpdateSender Uses

func (client ExemptionsClient) 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 (ExemptionsClient) Delete Uses

func (client ExemptionsClient) Delete(ctx context.Context, scope string, policyExemptionName string) (result autorest.Response, err error)

Delete this operation deletes a policy exemption, given its name and the scope it was created in. The scope of a policy exemption is the part of its ID preceding '/providers/Microsoft.Authorization/policyExemptions/{policyExemptionName}'. Parameters: scope - the scope of the policy exemption. 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}' policyExemptionName - the name of the policy exemption to delete.

func (ExemptionsClient) DeletePreparer Uses

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

DeletePreparer prepares the Delete request.

func (ExemptionsClient) DeleteResponder Uses

func (client ExemptionsClient) 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 (ExemptionsClient) DeleteSender Uses

func (client ExemptionsClient) 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 (ExemptionsClient) Get Uses

func (client ExemptionsClient) Get(ctx context.Context, scope string, policyExemptionName string) (result Exemption, err error)

Get this operation retrieves a single policy exemption, given its name and the scope it was created at. Parameters: scope - the scope of the policy exemption. 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}' policyExemptionName - the name of the policy exemption to delete.

func (ExemptionsClient) GetPreparer Uses

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

GetPreparer prepares the Get request.

func (ExemptionsClient) GetResponder Uses

func (client ExemptionsClient) GetResponder(resp *http.Response) (result Exemption, err error)

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

func (ExemptionsClient) GetSender Uses

func (client ExemptionsClient) 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 (ExemptionsClient) List Uses

func (client ExemptionsClient) List(ctx context.Context, subscriptionID string, filter string) (result ExemptionListResultPage, err error)

List this operation retrieves the list of all policy exemptions associated with the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy exemptions 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. Parameters: subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the scope, including those that apply directly or apply from containing scopes. If $filter=atScope() is provided, the returned list only includes all policy exemptions that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy exemptions that at the given scope. If $filter=excludeExpired() is provided, the returned list only includes all policy exemptions that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq '{value}' is provided. the returned list only includes all policy exemptions that are associated with the give policyAssignmentId.

func (ExemptionsClient) ListComplete Uses

func (client ExemptionsClient) ListComplete(ctx context.Context, subscriptionID string, filter string) (result ExemptionListResultIterator, err error)

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

func (ExemptionsClient) ListForManagementGroup Uses

func (client ExemptionsClient) ListForManagementGroup(ctx context.Context, managementGroupID string, filter string) (result ExemptionListResultPage, err error)

ListForManagementGroup this operation retrieves the list of all policy exemptions applicable to the management group that match the given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter=atScope() is provided, the returned list includes all policy exemptions that are assigned to the management group or the management group's ancestors. Parameters: managementGroupID - the ID of the management group. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the scope, including those that apply directly or apply from containing scopes. If $filter=atScope() is provided, the returned list only includes all policy exemptions that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy exemptions that at the given scope. If $filter=excludeExpired() is provided, the returned list only includes all policy exemptions that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq '{value}' is provided. the returned list only includes all policy exemptions that are associated with the give policyAssignmentId.

func (ExemptionsClient) ListForManagementGroupComplete Uses

func (client ExemptionsClient) ListForManagementGroupComplete(ctx context.Context, managementGroupID string, filter string) (result ExemptionListResultIterator, err error)

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

func (ExemptionsClient) ListForManagementGroupPreparer Uses

func (client ExemptionsClient) ListForManagementGroupPreparer(ctx context.Context, managementGroupID string, filter string) (*http.Request, error)

ListForManagementGroupPreparer prepares the ListForManagementGroup request.

func (ExemptionsClient) ListForManagementGroupResponder Uses

func (client ExemptionsClient) ListForManagementGroupResponder(resp *http.Response) (result ExemptionListResult, err error)

ListForManagementGroupResponder handles the response to the ListForManagementGroup request. The method always closes the http.Response Body.

func (ExemptionsClient) ListForManagementGroupSender Uses

func (client ExemptionsClient) ListForManagementGroupSender(req *http.Request) (*http.Response, error)

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

func (ExemptionsClient) ListForResource Uses

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

ListForResource this operation retrieves the list of all policy exemptions associated with the specified resource in the given resource group and subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy exemptions 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. 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: subscriptionID - the ID of the target subscription. 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()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the scope, including those that apply directly or apply from containing scopes. If $filter=atScope() is provided, the returned list only includes all policy exemptions that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy exemptions that at the given scope. If $filter=excludeExpired() is provided, the returned list only includes all policy exemptions that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq '{value}' is provided. the returned list only includes all policy exemptions that are associated with the give policyAssignmentId.

func (ExemptionsClient) ListForResourceComplete Uses

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

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

func (ExemptionsClient) ListForResourceGroup Uses

func (client ExemptionsClient) ListForResourceGroup(ctx context.Context, subscriptionID string, resourceGroupName string, filter string) (result ExemptionListResultPage, err error)

ListForResourceGroup this operation retrieves the list of all policy exemptions associated with the given resource group in the given subscription that match the optional given $filter. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, the unfiltered list includes all policy exemptions 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. Parameters: subscriptionID - the ID of the target subscription. resourceGroupName - the name of the resource group containing the resource. filter - the filter to apply on the operation. Valid values for $filter are: 'atScope()', 'atExactScope()', 'excludeExpired()' or 'policyAssignmentId eq '{value}”. If $filter is not provided, no filtering is performed. If $filter is not provided, the unfiltered list includes all policy exemptions associated with the scope, including those that apply directly or apply from containing scopes. If $filter=atScope() is provided, the returned list only includes all policy exemptions that apply to the scope, which is everything in the unfiltered list except those applied to sub scopes contained within the given scope. If $filter=atExactScope() is provided, the returned list only includes all policy exemptions that at the given scope. If $filter=excludeExpired() is provided, the returned list only includes all policy exemptions that either haven't expired or didn't set expiration date. If $filter=policyAssignmentId eq '{value}' is provided. the returned list only includes all policy exemptions that are associated with the give policyAssignmentId.

func (ExemptionsClient) ListForResourceGroupComplete Uses

func (client ExemptionsClient) ListForResourceGroupComplete(ctx context.Context, subscriptionID string, resourceGroupName string, filter string) (result ExemptionListResultIterator, err error)

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

func (ExemptionsClient) ListForResourceGroupPreparer Uses

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

ListForResourceGroupPreparer prepares the ListForResourceGroup request.

func (ExemptionsClient) ListForResourceGroupResponder Uses

func (client ExemptionsClient) ListForResourceGroupResponder(resp *http.Response) (result ExemptionListResult, err error)

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

func (ExemptionsClient) ListForResourceGroupSender Uses

func (client ExemptionsClient) 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 (ExemptionsClient) ListForResourcePreparer Uses

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

ListForResourcePreparer prepares the ListForResource request.

func (ExemptionsClient) ListForResourceResponder Uses

func (client ExemptionsClient) ListForResourceResponder(resp *http.Response) (result ExemptionListResult, err error)

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

func (ExemptionsClient) ListForResourceSender Uses

func (client ExemptionsClient) 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 (ExemptionsClient) ListPreparer Uses

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

ListPreparer prepares the List request.

func (ExemptionsClient) ListResponder Uses

func (client ExemptionsClient) ListResponder(resp *http.Response) (result ExemptionListResult, err error)

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

func (ExemptionsClient) ListSender Uses

func (client ExemptionsClient) 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 Identity Uses

type Identity struct {
    // PrincipalID - READ-ONLY; The principal ID of the resource identity.
    PrincipalID *string `json:"principalId,omitempty"`
    // TenantID - READ-ONLY; The tenant ID of the resource identity.
    TenantID *string `json:"tenantId,omitempty"`
    // Type - The identity type. This is the only required field when adding a system assigned identity to a resource. Possible values include: 'SystemAssigned', 'None'
    Type ResourceIdentityType `json:"type,omitempty"`
}

Identity identity for the resource.

func (Identity) MarshalJSON Uses

func (i Identity) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for Identity.

type ParameterDefinitionsValue Uses

type ParameterDefinitionsValue struct {
    // Type - The data type of the parameter. Possible values include: 'String', 'Array', 'Object', 'Boolean', 'Integer', 'Float', 'DateTime'
    Type ParameterType `json:"type,omitempty"`
    // AllowedValues - The allowed values for the parameter.
    AllowedValues *[]interface{} `json:"allowedValues,omitempty"`
    // DefaultValue - The default value for the parameter if no value is provided.
    DefaultValue interface{} `json:"defaultValue,omitempty"`
    // Metadata - General metadata for the parameter.
    Metadata *ParameterDefinitionsValueMetadata `json:"metadata,omitempty"`
}

ParameterDefinitionsValue the definition of a parameter that can be provided to the policy.

type ParameterDefinitionsValueMetadata Uses

type ParameterDefinitionsValueMetadata struct {
    // AdditionalProperties - Unmatched properties from the message are deserialized this collection
    AdditionalProperties map[string]interface{} `json:""`
    // DisplayName - The display name for the parameter.
    DisplayName *string `json:"displayName,omitempty"`
    // Description - The description of the parameter.
    Description *string `json:"description,omitempty"`
}

ParameterDefinitionsValueMetadata general metadata for the parameter.

func (ParameterDefinitionsValueMetadata) MarshalJSON Uses

func (pdv ParameterDefinitionsValueMetadata) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for ParameterDefinitionsValueMetadata.

func (*ParameterDefinitionsValueMetadata) UnmarshalJSON Uses

func (pdv *ParameterDefinitionsValueMetadata) UnmarshalJSON(body []byte) error

UnmarshalJSON is the custom unmarshaler for ParameterDefinitionsValueMetadata struct.

type ParameterType Uses

type ParameterType string

ParameterType enumerates the values for parameter type.

const (
    // Array ...
    Array ParameterType = "Array"
    // Boolean ...
    Boolean ParameterType = "Boolean"
    // DateTime ...
    DateTime ParameterType = "DateTime"
    // Float ...
    Float ParameterType = "Float"
    // Integer ...
    Integer ParameterType = "Integer"
    // Object ...
    Object ParameterType = "Object"
    // String ...
    String ParameterType = "String"
)

func PossibleParameterTypeValues Uses

func PossibleParameterTypeValues() []ParameterType

PossibleParameterTypeValues returns an array of possible values for the ParameterType const type.

type ParameterValuesValue Uses

type ParameterValuesValue struct {
    // Value - The value of the parameter.
    Value interface{} `json:"value,omitempty"`
}

ParameterValuesValue the value of a parameter.

type ProxyResource Uses

type ProxyResource struct {
    // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the resource
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Type *string `json:"type,omitempty"`
}

ProxyResource the resource model definition for an Azure Resource Manager proxy resource. It will have everything other than required location and tags

type Resource Uses

type Resource struct {
    // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the resource
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Type *string `json:"type,omitempty"`
}

Resource common fields that are returned in the response for all Azure Resource Manager resources

type ResourceIdentityType Uses

type ResourceIdentityType string

ResourceIdentityType enumerates the values for resource identity type.

const (
    // None Indicates that no identity is associated with the resource or that the existing identity should be
    // removed.
    None ResourceIdentityType = "None"
    // SystemAssigned Indicates that a system assigned identity is associated with the resource.
    SystemAssigned ResourceIdentityType = "SystemAssigned"
)

func PossibleResourceIdentityTypeValues Uses

func PossibleResourceIdentityTypeValues() []ResourceIdentityType

PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type.

type SetDefinition Uses

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"`
}

SetDefinition the policy set definition.

func (SetDefinition) MarshalJSON Uses

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

MarshalJSON is the custom marshaler for SetDefinition.

func (*SetDefinition) UnmarshalJSON Uses

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

UnmarshalJSON is the custom unmarshaler for SetDefinition struct.

type SetDefinitionListResult Uses

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"`
}

SetDefinitionListResult list of policy set definitions.

func (SetDefinitionListResult) IsEmpty Uses

func (sdlr SetDefinitionListResult) IsEmpty() bool

IsEmpty returns true if the ListResult contains no values.

type SetDefinitionListResultIterator Uses

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

SetDefinitionListResultIterator provides access to a complete listing of SetDefinition values.

func NewSetDefinitionListResultIterator Uses

func NewSetDefinitionListResultIterator(page SetDefinitionListResultPage) SetDefinitionListResultIterator

Creates a new instance of the SetDefinitionListResultIterator type.

func (*SetDefinitionListResultIterator) Next Uses

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 Uses

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 Uses

func (iter SetDefinitionListResultIterator) NotDone() bool

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

func (SetDefinitionListResultIterator) Response Uses

func (iter SetDefinitionListResultIterator) Response() SetDefinitionListResult

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

func (SetDefinitionListResultIterator) Value Uses

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 Uses

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

SetDefinitionListResultPage contains a page of SetDefinition values.

func NewSetDefinitionListResultPage Uses

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

Creates a new instance of the SetDefinitionListResultPage type.

func (*SetDefinitionListResultPage) Next Uses

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 Uses

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 Uses

func (page SetDefinitionListResultPage) NotDone() bool

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

func (SetDefinitionListResultPage) Response Uses

func (page SetDefinitionListResultPage) Response() SetDefinitionListResult

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

func (SetDefinitionListResultPage) Values Uses

func (page SetDefinitionListResultPage) Values() []SetDefinition

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

type SetDefinitionProperties Uses

type SetDefinitionProperties struct {
    // PolicyType - The type of policy definition. Possible values are NotSpecified, BuiltIn, Custom, and Static. Possible values include: 'NotSpecified', 'BuiltIn', 'Custom', 'Static'
    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 is an open ended object and is typically a collection of key value pairs.
    Metadata interface{} `json:"metadata,omitempty"`
    // Parameters - The policy set definition parameters that can be used in policy definition references.
    Parameters map[string]*ParameterDefinitionsValue `json:"parameters"`
    // PolicyDefinitions - An array of policy definition references.
    PolicyDefinitions *[]DefinitionReference `json:"policyDefinitions,omitempty"`
    // PolicyDefinitionGroups - The metadata describing groups of policy definition references within the policy set definition.
    PolicyDefinitionGroups *[]DefinitionGroup `json:"policyDefinitionGroups,omitempty"`
}

SetDefinitionProperties the policy set definition properties.

func (SetDefinitionProperties) MarshalJSON Uses

func (sdp SetDefinitionProperties) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for SetDefinitionProperties.

type SetDefinitionsClient Uses

type SetDefinitionsClient struct {
    BaseClient
}

SetDefinitionsClient is the client for the SetDefinitions methods of the Policy service.

func NewSetDefinitionsClient Uses

func NewSetDefinitionsClient() SetDefinitionsClient

NewSetDefinitionsClient creates an instance of the SetDefinitionsClient client.

func NewSetDefinitionsClientWithBaseURI Uses

func NewSetDefinitionsClientWithBaseURI(baseURI 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 Uses

func (client SetDefinitionsClient) CreateOrUpdate(ctx context.Context, policySetDefinitionName string, parameters SetDefinition, subscriptionID string) (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. subscriptionID - the ID of the target subscription.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroup Uses

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 Uses

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

CreateOrUpdateAtManagementGroupPreparer prepares the CreateOrUpdateAtManagementGroup request.

func (SetDefinitionsClient) CreateOrUpdateAtManagementGroupResponder Uses

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 Uses

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 Uses

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

CreateOrUpdatePreparer prepares the CreateOrUpdate request.

func (SetDefinitionsClient) CreateOrUpdateResponder Uses

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 Uses

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 Uses

func (client SetDefinitionsClient) Delete(ctx context.Context, policySetDefinitionName string, subscriptionID 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. subscriptionID - the ID of the target subscription.

func (SetDefinitionsClient) DeleteAtManagementGroup Uses

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 Uses

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

DeleteAtManagementGroupPreparer prepares the DeleteAtManagementGroup request.

func (SetDefinitionsClient) DeleteAtManagementGroupResponder Uses

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 Uses

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 Uses

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

DeletePreparer prepares the Delete request.

func (SetDefinitionsClient) DeleteResponder Uses

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 Uses

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 Uses

func (client SetDefinitionsClient) Get(ctx context.Context, policySetDefinitionName string, subscriptionID 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. subscriptionID - the ID of the target subscription.

func (SetDefinitionsClient) GetAtManagementGroup Uses

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 Uses

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

GetAtManagementGroupPreparer prepares the GetAtManagementGroup request.

func (SetDefinitionsClient) GetAtManagementGroupResponder Uses

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 Uses

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 Uses

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 Uses

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

GetBuiltInPreparer prepares the GetBuiltIn request.

func (SetDefinitionsClient) GetBuiltInResponder Uses

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 Uses

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 Uses

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

GetPreparer prepares the Get request.

func (SetDefinitionsClient) GetResponder Uses

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 Uses

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 Uses

func (client SetDefinitionsClient) List(ctx context.Context, subscriptionID string, filter string, top *int32) (result SetDefinitionListResultPage, err error)

List this operation retrieves a list of all the policy set definitions in a given subscription that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, the unfiltered list includes all policy set definitions associated with the subscription, including those that apply directly or from management groups that contain the given subscription. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given subscription. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is provided, the returned list only includes all policy set definitions whose category match the {value}. Parameters: subscriptionID - the ID of the target subscription. filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy set definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (SetDefinitionsClient) ListBuiltIn Uses

func (client SetDefinitionsClient) ListBuiltIn(ctx context.Context, filter string, top *int32) (result SetDefinitionListResultPage, err error)

ListBuiltIn this operation retrieves a list of all the built-in policy set definitions that match the optional given $filter. If $filter='category -eq {value}' is provided, the returned list only includes all built-in policy set definitions whose category match the {value}. Parameters: filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy set definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (SetDefinitionsClient) ListBuiltInComplete Uses

func (client SetDefinitionsClient) ListBuiltInComplete(ctx context.Context, filter string, top *int32) (result SetDefinitionListResultIterator, err error)

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

func (SetDefinitionsClient) ListBuiltInPreparer Uses

func (client SetDefinitionsClient) ListBuiltInPreparer(ctx context.Context, filter string, top *int32) (*http.Request, error)

ListBuiltInPreparer prepares the ListBuiltIn request.

func (SetDefinitionsClient) ListBuiltInResponder Uses

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 Uses

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 Uses

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

ListByManagementGroup this operation retrieves a list of all the policy set definitions in a given management group that match the optional given $filter. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, the unfiltered list includes all policy set definitions associated with the management group, including those that apply directly or from management groups that contain the given management group. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given management group. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn and Custom. If $filter='category -eq {value}' is provided, the returned list only includes all policy set definitions whose category match the {value}. Parameters: managementGroupID - the ID of the management group. filter - the filter to apply on the operation. Valid values for $filter are: 'atExactScope()', 'policyType -eq {value}' or 'category eq '{value}”. If $filter is not provided, no filtering is performed. If $filter=atExactScope() is provided, the returned list only includes all policy set definitions that at the given scope. If $filter='policyType -eq {value}' is provided, the returned list only includes all policy set definitions whose type match the {value}. Possible policyType values are NotSpecified, BuiltIn, Custom, and Static. If $filter='category -eq {value}' is provided, the returned list only includes all policy set definitions whose category match the {value}. top - maximum number of records to return. When the $top filter is not provided, it will return 500 records.

func (SetDefinitionsClient) ListByManagementGroupComplete Uses

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

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

func (SetDefinitionsClient) ListByManagementGroupPreparer Uses

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

ListByManagementGroupPreparer prepares the ListByManagementGroup request.

func (SetDefinitionsClient) ListByManagementGroupResponder Uses

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 Uses

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 Uses

func (client SetDefinitionsClient) ListComplete(ctx context.Context, subscriptionID string, filter string, top *int32) (result SetDefinitionListResultIterator, err error)

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

func (SetDefinitionsClient) ListPreparer Uses

func (client SetDefinitionsClient) ListPreparer(ctx context.Context, subscriptionID string, filter string, top *int32) (*http.Request, error)

ListPreparer prepares the List request.

func (SetDefinitionsClient) ListResponder Uses

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 Uses

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 Uses

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"`
}

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

type SystemData Uses

type SystemData struct {
    // CreatedBy - The identity that created the resource.
    CreatedBy *string `json:"createdBy,omitempty"`
    // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
    CreatedByType CreatedByType `json:"createdByType,omitempty"`
    // CreatedAt - The timestamp of resource creation (UTC).
    CreatedAt *date.Time `json:"createdAt,omitempty"`
    // LastModifiedBy - The identity that last modified the resource.
    LastModifiedBy *string `json:"lastModifiedBy,omitempty"`
    // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key'
    LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"`
    // LastModifiedAt - The type of identity that last modified the resource.
    LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"`
}

SystemData metadata pertaining to creation and last modification of the resource.

type TrackedResource Uses

type TrackedResource struct {
    // Tags - Resource tags.
    Tags map[string]*string `json:"tags"`
    // Location - The geo-location where the resource lives
    Location *string `json:"location,omitempty"`
    // ID - READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
    ID  *string `json:"id,omitempty"`
    // Name - READ-ONLY; The name of the resource
    Name *string `json:"name,omitempty"`
    // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
    Type *string `json:"type,omitempty"`
}

TrackedResource the resource model definition for an Azure Resource Manager tracked top level resource

func (TrackedResource) MarshalJSON Uses

func (tr TrackedResource) MarshalJSON() ([]byte, error)

MarshalJSON is the custom marshaler for TrackedResource.

type Type Uses

type Type string

Type enumerates the values for type.

const (
    // BuiltIn ...
    BuiltIn Type = "BuiltIn"
    // Custom ...
    Custom Type = "Custom"
    // NotSpecified ...
    NotSpecified Type = "NotSpecified"
    // Static ...
    Static Type = "Static"
)

func PossibleTypeValues Uses

func PossibleTypeValues() []Type

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

Directories

PathSynopsis
policyapi

Package policy imports 10 packages (graph) and is imported by 1 packages. Updated 2021-01-17. Refresh now. Tools for package owners.