Documentation ¶
Overview ¶
Package policy implements the Azure ARM Policy service API version 2015-10-01-preview.
Index ¶
- Constants
- func UserAgent() string
- func Version() string
- type Assignment
- type AssignmentListResult
- type AssignmentProperties
- type AssignmentsClient
- func (client AssignmentsClient) Create(scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error)
- func (client AssignmentsClient) CreateByID(policyAssignmentID string, parameters Assignment) (result Assignment, err error)
- func (client AssignmentsClient) CreateByIDPreparer(policyAssignmentID string, parameters Assignment) (*http.Request, error)
- func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) CreateByIDSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) CreatePreparer(scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error)
- func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) CreateSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) Delete(scope string, policyAssignmentName string) (result Assignment, err error)
- func (client AssignmentsClient) DeleteByID(policyAssignmentID string) (result Assignment, err error)
- func (client AssignmentsClient) DeleteByIDPreparer(policyAssignmentID string) (*http.Request, error)
- func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) DeleteByIDSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) DeletePreparer(scope string, policyAssignmentName string) (*http.Request, error)
- func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) DeleteSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) Get(scope string, policyAssignmentName string) (result Assignment, err error)
- func (client AssignmentsClient) GetByID(policyAssignmentID string) (result Assignment, err error)
- func (client AssignmentsClient) GetByIDPreparer(policyAssignmentID string) (*http.Request, error)
- func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) GetByIDSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) GetPreparer(scope string, policyAssignmentName string) (*http.Request, error)
- func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error)
- func (client AssignmentsClient) GetSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) List(filter string) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, ...) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourceGroupNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourceGroupPreparer(resourceGroupName string, filter string) (*http.Request, error)
- func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) ListForResourceNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourcePreparer(resourceGroupName string, resourceProviderNamespace string, ...) (*http.Request, error)
- func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListForResourceSender(req *http.Request) (*http.Response, error)
- func (client AssignmentsClient) ListNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListPreparer(filter string) (*http.Request, error)
- func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, err error)
- func (client AssignmentsClient) ListSender(req *http.Request) (*http.Response, error)
- type Definition
- type DefinitionListResult
- type DefinitionProperties
- type DefinitionsClient
- func (client DefinitionsClient) CreateOrUpdate(policyDefinitionName string, parameters Definition) (result Definition, err error)
- func (client DefinitionsClient) CreateOrUpdatePreparer(policyDefinitionName string, parameters Definition) (*http.Request, error)
- func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, err error)
- func (client DefinitionsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error)
- func (client DefinitionsClient) Delete(policyDefinitionName string) (result autorest.Response, err error)
- func (client DefinitionsClient) DeletePreparer(policyDefinitionName string) (*http.Request, error)
- func (client DefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
- func (client DefinitionsClient) DeleteSender(req *http.Request) (*http.Response, error)
- func (client DefinitionsClient) Get(policyDefinitionName string) (result Definition, err error)
- func (client DefinitionsClient) GetPreparer(policyDefinitionName string) (*http.Request, error)
- func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error)
- func (client DefinitionsClient) GetSender(req *http.Request) (*http.Response, error)
- func (client DefinitionsClient) List(filter string) (result DefinitionListResult, err error)
- func (client DefinitionsClient) ListNextResults(lastResults DefinitionListResult) (result DefinitionListResult, err error)
- func (client DefinitionsClient) ListPreparer(filter string) (*http.Request, error)
- func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, err error)
- func (client DefinitionsClient) ListSender(req *http.Request) (*http.Response, error)
- type ManagementClient
- type Type
Constants ¶
const ( // APIVersion is the version of the Policy APIVersion = "2015-10-01-preview" // DefaultBaseURI is the default URI used for the service Policy DefaultBaseURI = "https://management.azure.com" )
Variables ¶
This section is empty.
Functions ¶
func UserAgent ¶
func UserAgent() string
UserAgent returns the UserAgent string to use when sending http.Requests.
func Version ¶
func Version() string
Version returns the semantic version (see http://semver.org) of the client.
Types ¶
type Assignment ¶
type Assignment struct { autorest.Response `json:"-"` Properties *AssignmentProperties `json:"properties,omitempty"` ID *string `json:"id,omitempty"` Type *string `json:"type,omitempty"` Name *string `json:"name,omitempty"` }
Assignment is the policy definition.
type AssignmentListResult ¶
type AssignmentListResult struct { autorest.Response `json:"-"` Value *[]Assignment `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` }
AssignmentListResult is list of policy assignments.
func (AssignmentListResult) AssignmentListResultPreparer ¶
func (client AssignmentListResult) AssignmentListResultPreparer() (*http.Request, error)
AssignmentListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type AssignmentProperties ¶
type AssignmentProperties struct { DisplayName *string `json:"displayName,omitempty"` PolicyDefinitionID *string `json:"policyDefinitionId,omitempty"` Scope *string `json:"scope,omitempty"` }
AssignmentProperties is the policy assignment properties.
type AssignmentsClient ¶
type AssignmentsClient struct {
ManagementClient
}
AssignmentsClient is the client for the Assignments methods of the Policy service.
func NewAssignmentsClient ¶
func NewAssignmentsClient(subscriptionID string) AssignmentsClient
NewAssignmentsClient creates an instance of the AssignmentsClient client.
func (AssignmentsClient) Create ¶
func (client AssignmentsClient) Create(scope string, policyAssignmentName string, parameters Assignment) (result Assignment, err error)
Create create policy assignment.
scope is scope of the policy assignment. policyAssignmentName is policy assignment name. parameters is policy assignment.
func (AssignmentsClient) CreateByID ¶
func (client AssignmentsClient) CreateByID(policyAssignmentID string, parameters Assignment) (result Assignment, err error)
CreateByID create policy assignment by Id.
policyAssignmentID is policy assignment Id parameters is policy assignment.
func (AssignmentsClient) CreateByIDPreparer ¶
func (client AssignmentsClient) CreateByIDPreparer(policyAssignmentID string, parameters Assignment) (*http.Request, error)
CreateByIDPreparer prepares the CreateByID request.
func (AssignmentsClient) CreateByIDResponder ¶
func (client AssignmentsClient) CreateByIDResponder(resp *http.Response) (result Assignment, err error)
CreateByIDResponder handles the response to the CreateByID request. The method always closes the http.Response Body.
func (AssignmentsClient) CreateByIDSender ¶
CreateByIDSender sends the CreateByID request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) CreatePreparer ¶
func (client AssignmentsClient) CreatePreparer(scope string, policyAssignmentName string, parameters Assignment) (*http.Request, error)
CreatePreparer prepares the Create request.
func (AssignmentsClient) CreateResponder ¶
func (client AssignmentsClient) CreateResponder(resp *http.Response) (result Assignment, err error)
CreateResponder handles the response to the Create request. The method always closes the http.Response Body.
func (AssignmentsClient) CreateSender ¶
CreateSender sends the Create request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) Delete ¶
func (client AssignmentsClient) Delete(scope string, policyAssignmentName string) (result Assignment, err error)
Delete delete policy assignment.
scope is scope of the policy assignment. policyAssignmentName is policy assignment name.
func (AssignmentsClient) DeleteByID ¶
func (client AssignmentsClient) DeleteByID(policyAssignmentID string) (result Assignment, err error)
DeleteByID delete policy assignment.
policyAssignmentID is policy assignment Id
func (AssignmentsClient) DeleteByIDPreparer ¶
func (client AssignmentsClient) DeleteByIDPreparer(policyAssignmentID string) (*http.Request, error)
DeleteByIDPreparer prepares the DeleteByID request.
func (AssignmentsClient) DeleteByIDResponder ¶
func (client AssignmentsClient) DeleteByIDResponder(resp *http.Response) (result Assignment, err error)
DeleteByIDResponder handles the response to the DeleteByID request. The method always closes the http.Response Body.
func (AssignmentsClient) DeleteByIDSender ¶
DeleteByIDSender sends the DeleteByID request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) DeletePreparer ¶
func (client AssignmentsClient) DeletePreparer(scope string, policyAssignmentName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (AssignmentsClient) DeleteResponder ¶
func (client AssignmentsClient) DeleteResponder(resp *http.Response) (result Assignment, err error)
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (AssignmentsClient) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) Get ¶
func (client AssignmentsClient) Get(scope string, policyAssignmentName string) (result Assignment, err error)
Get get single policy assignment.
scope is scope of the policy assignment. policyAssignmentName is policy assignment name.
func (AssignmentsClient) GetByID ¶
func (client AssignmentsClient) GetByID(policyAssignmentID string) (result Assignment, err error)
GetByID get single policy assignment.
policyAssignmentID is policy assignment Id
func (AssignmentsClient) GetByIDPreparer ¶
func (client AssignmentsClient) GetByIDPreparer(policyAssignmentID string) (*http.Request, error)
GetByIDPreparer prepares the GetByID request.
func (AssignmentsClient) GetByIDResponder ¶
func (client AssignmentsClient) GetByIDResponder(resp *http.Response) (result Assignment, err error)
GetByIDResponder handles the response to the GetByID request. The method always closes the http.Response Body.
func (AssignmentsClient) GetByIDSender ¶
GetByIDSender sends the GetByID request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) GetPreparer ¶
func (client AssignmentsClient) GetPreparer(scope string, policyAssignmentName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (AssignmentsClient) GetResponder ¶
func (client AssignmentsClient) GetResponder(resp *http.Response) (result Assignment, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (AssignmentsClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) List ¶
func (client AssignmentsClient) List(filter string) (result AssignmentListResult, err error)
List gets all the policy assignments of a subscription.
filter is the filter to apply on the operation.
func (AssignmentsClient) ListForResource ¶
func (client AssignmentsClient) ListForResource(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (result AssignmentListResult, err error)
ListForResource gets policy assignments of the resource.
resourceGroupName is the name of the resource group. The name is case insensitive. resourceProviderNamespace is the resource provider namespace. parentResourcePath is the parent resource path. resourceType is the resource type. resourceName is the resource name. filter is the filter to apply on the operation.
func (AssignmentsClient) ListForResourceGroup ¶
func (client AssignmentsClient) ListForResourceGroup(resourceGroupName string, filter string) (result AssignmentListResult, err error)
ListForResourceGroup gets policy assignments of the resource group.
resourceGroupName is resource group name. filter is the filter to apply on the operation.
func (AssignmentsClient) ListForResourceGroupNextResults ¶
func (client AssignmentsClient) ListForResourceGroupNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
ListForResourceGroupNextResults retrieves the next set of results, if any.
func (AssignmentsClient) ListForResourceGroupPreparer ¶
func (client AssignmentsClient) ListForResourceGroupPreparer(resourceGroupName string, filter string) (*http.Request, error)
ListForResourceGroupPreparer prepares the ListForResourceGroup request.
func (AssignmentsClient) ListForResourceGroupResponder ¶
func (client AssignmentsClient) ListForResourceGroupResponder(resp *http.Response) (result AssignmentListResult, err error)
ListForResourceGroupResponder handles the response to the ListForResourceGroup request. The method always closes the http.Response Body.
func (AssignmentsClient) ListForResourceGroupSender ¶
func (client AssignmentsClient) ListForResourceGroupSender(req *http.Request) (*http.Response, error)
ListForResourceGroupSender sends the ListForResourceGroup request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) ListForResourceNextResults ¶
func (client AssignmentsClient) ListForResourceNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
ListForResourceNextResults retrieves the next set of results, if any.
func (AssignmentsClient) ListForResourcePreparer ¶
func (client AssignmentsClient) ListForResourcePreparer(resourceGroupName string, resourceProviderNamespace string, parentResourcePath string, resourceType string, resourceName string, filter string) (*http.Request, error)
ListForResourcePreparer prepares the ListForResource request.
func (AssignmentsClient) ListForResourceResponder ¶
func (client AssignmentsClient) ListForResourceResponder(resp *http.Response) (result AssignmentListResult, err error)
ListForResourceResponder handles the response to the ListForResource request. The method always closes the http.Response Body.
func (AssignmentsClient) ListForResourceSender ¶
ListForResourceSender sends the ListForResource request. The method will close the http.Response Body if it receives an error.
func (AssignmentsClient) ListNextResults ¶
func (client AssignmentsClient) ListNextResults(lastResults AssignmentListResult) (result AssignmentListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (AssignmentsClient) ListPreparer ¶
func (client AssignmentsClient) ListPreparer(filter string) (*http.Request, error)
ListPreparer prepares the List request.
func (AssignmentsClient) ListResponder ¶
func (client AssignmentsClient) ListResponder(resp *http.Response) (result AssignmentListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (AssignmentsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type Definition ¶
type Definition struct { autorest.Response `json:"-"` Properties *DefinitionProperties `json:"properties,omitempty"` ID *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` }
Definition is the policy definition.
type DefinitionListResult ¶
type DefinitionListResult struct { autorest.Response `json:"-"` Value *[]Definition `json:"value,omitempty"` NextLink *string `json:"nextLink,omitempty"` }
DefinitionListResult is list of policy definitions.
func (DefinitionListResult) DefinitionListResultPreparer ¶
func (client DefinitionListResult) DefinitionListResultPreparer() (*http.Request, error)
DefinitionListResultPreparer prepares a request to retrieve the next set of results. It returns nil if no more results exist.
type DefinitionProperties ¶
type DefinitionProperties struct { PolicyType Type `json:"policyType,omitempty"` DisplayName *string `json:"displayName,omitempty"` Description *string `json:"description,omitempty"` PolicyRule *map[string]interface{} `json:"policyRule,omitempty"` }
DefinitionProperties is the policy definition properties.
type DefinitionsClient ¶
type DefinitionsClient struct {
ManagementClient
}
DefinitionsClient is the client for the Definitions methods of the Policy service.
func NewDefinitionsClient ¶
func NewDefinitionsClient(subscriptionID string) DefinitionsClient
NewDefinitionsClient creates an instance of the DefinitionsClient client.
func (DefinitionsClient) CreateOrUpdate ¶
func (client DefinitionsClient) CreateOrUpdate(policyDefinitionName string, parameters Definition) (result Definition, err error)
CreateOrUpdate create or update a policy definition.
policyDefinitionName is the policy definition name. parameters is the policy definition properties.
func (DefinitionsClient) CreateOrUpdatePreparer ¶
func (client DefinitionsClient) CreateOrUpdatePreparer(policyDefinitionName string, parameters Definition) (*http.Request, error)
CreateOrUpdatePreparer prepares the CreateOrUpdate request.
func (DefinitionsClient) CreateOrUpdateResponder ¶
func (client DefinitionsClient) CreateOrUpdateResponder(resp *http.Response) (result Definition, err error)
CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always closes the http.Response Body.
func (DefinitionsClient) CreateOrUpdateSender ¶
CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the http.Response Body if it receives an error.
func (DefinitionsClient) Delete ¶
func (client DefinitionsClient) Delete(policyDefinitionName string) (result autorest.Response, err error)
Delete deletes the policy definition.
policyDefinitionName is the policy definition name.
func (DefinitionsClient) DeletePreparer ¶
func (client DefinitionsClient) DeletePreparer(policyDefinitionName string) (*http.Request, error)
DeletePreparer prepares the Delete request.
func (DefinitionsClient) DeleteResponder ¶
func (client DefinitionsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error)
DeleteResponder handles the response to the Delete request. The method always closes the http.Response Body.
func (DefinitionsClient) DeleteSender ¶
DeleteSender sends the Delete request. The method will close the http.Response Body if it receives an error.
func (DefinitionsClient) Get ¶
func (client DefinitionsClient) Get(policyDefinitionName string) (result Definition, err error)
Get gets the policy definition.
policyDefinitionName is the policy definition name.
func (DefinitionsClient) GetPreparer ¶
func (client DefinitionsClient) GetPreparer(policyDefinitionName string) (*http.Request, error)
GetPreparer prepares the Get request.
func (DefinitionsClient) GetResponder ¶
func (client DefinitionsClient) GetResponder(resp *http.Response) (result Definition, err error)
GetResponder handles the response to the Get request. The method always closes the http.Response Body.
func (DefinitionsClient) GetSender ¶
GetSender sends the Get request. The method will close the http.Response Body if it receives an error.
func (DefinitionsClient) List ¶
func (client DefinitionsClient) List(filter string) (result DefinitionListResult, err error)
List gets all the policy definitions of a subscription.
filter is the filter to apply on the operation.
func (DefinitionsClient) ListNextResults ¶
func (client DefinitionsClient) ListNextResults(lastResults DefinitionListResult) (result DefinitionListResult, err error)
ListNextResults retrieves the next set of results, if any.
func (DefinitionsClient) ListPreparer ¶
func (client DefinitionsClient) ListPreparer(filter string) (*http.Request, error)
ListPreparer prepares the List request.
func (DefinitionsClient) ListResponder ¶
func (client DefinitionsClient) ListResponder(resp *http.Response) (result DefinitionListResult, err error)
ListResponder handles the response to the List request. The method always closes the http.Response Body.
func (DefinitionsClient) ListSender ¶
ListSender sends the List request. The method will close the http.Response Body if it receives an error.
type ManagementClient ¶
type ManagementClient struct { autorest.Client BaseURI string APIVersion string SubscriptionID string }
ManagementClient is the base client for Policy.
func New ¶
func New(subscriptionID string) ManagementClient
New creates an instance of the ManagementClient client.