README
¶
github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policysets
Documentation
The policysets
SDK allows for interaction with the Azure Resource Manager Service devtestlab
(API Version 2018-09-15
).
This readme covers example usages, but further information on using this SDK can be found in the project root.
Import Path
import "github.com/hashicorp/go-azure-sdk/resource-manager/devtestlab/2018-09-15/policysets"
Client Initialization
client := policysets.NewPolicySetsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer
Example Usage: PolicySetsClient.EvaluatePolicies
ctx := context.TODO()
id := policysets.NewPolicySetID("12345678-1234-9876-4563-123456789012", "example-resource-group", "labValue", "policySetValue")
payload := policysets.EvaluatePoliciesRequest{
// ...
}
read, err := client.EvaluatePolicies(ctx, id, payload)
if err != nil {
// handle the error
}
if model := read.Model; model != nil {
// do something with the model/response object
}
Documentation
¶
Index ¶
- func ValidatePolicySetID(input interface{}, key string) (warnings []string, errors []error)
- type EvaluatePoliciesOperationResponse
- type EvaluatePoliciesProperties
- type EvaluatePoliciesRequest
- type EvaluatePoliciesResponse
- type PolicySetId
- type PolicySetResult
- type PolicySetsClient
- type PolicyViolation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidatePolicySetID ¶
ValidatePolicySetID checks that 'input' can be parsed as a Policy Set ID
Types ¶
type EvaluatePoliciesOperationResponse ¶
type EvaluatePoliciesOperationResponse struct { HttpResponse *http.Response Model *EvaluatePoliciesResponse }
type EvaluatePoliciesRequest ¶
type EvaluatePoliciesRequest struct {
Policies *[]EvaluatePoliciesProperties `json:"policies,omitempty"`
}
type EvaluatePoliciesResponse ¶
type EvaluatePoliciesResponse struct {
Results *[]PolicySetResult `json:"results,omitempty"`
}
type PolicySetId ¶
type PolicySetId struct { SubscriptionId string ResourceGroupName string LabName string PolicySetName string }
PolicySetId is a struct representing the Resource ID for a Policy Set
func NewPolicySetID ¶
func NewPolicySetID(subscriptionId string, resourceGroupName string, labName string, policySetName string) PolicySetId
NewPolicySetID returns a new PolicySetId struct
func ParsePolicySetID ¶
func ParsePolicySetID(input string) (*PolicySetId, error)
ParsePolicySetID parses 'input' into a PolicySetId
func ParsePolicySetIDInsensitively ¶
func ParsePolicySetIDInsensitively(input string) (*PolicySetId, error)
ParsePolicySetIDInsensitively parses 'input' case-insensitively into a PolicySetId note: this method should only be used for API response data and not user input
func (PolicySetId) Segments ¶
func (id PolicySetId) Segments() []resourceids.Segment
Segments returns a slice of Resource ID Segments which comprise this Policy Set ID
func (PolicySetId) String ¶
func (id PolicySetId) String() string
String returns a human-readable description of this Policy Set ID
type PolicySetResult ¶
type PolicySetResult struct { HasError *bool `json:"hasError,omitempty"` PolicyViolations *[]PolicyViolation `json:"policyViolations,omitempty"` }
type PolicySetsClient ¶
func NewPolicySetsClientWithBaseURI ¶
func NewPolicySetsClientWithBaseURI(endpoint string) PolicySetsClient
func (PolicySetsClient) EvaluatePolicies ¶
func (c PolicySetsClient) EvaluatePolicies(ctx context.Context, id PolicySetId, input EvaluatePoliciesRequest) (result EvaluatePoliciesOperationResponse, err error)
EvaluatePolicies ...