checkpolicyrestrictions

package
v0.20230510.1131358 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2023 License: MPL-2.0 Imports: 8 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2023-03-01/checkpolicyrestrictions Documentation

The checkpolicyrestrictions SDK allows for interaction with the Azure Resource Manager Service policyinsights (API Version 2023-03-01).

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/policyinsights/2023-03-01/checkpolicyrestrictions"

Client Initialization

client := checkpolicyrestrictions.NewCheckPolicyRestrictionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: CheckPolicyRestrictionsClient.PolicyRestrictionsCheckAtManagementGroupScope

ctx := context.TODO()
id := checkpolicyrestrictions.NewManagementGroupID("managementGroupIdValue")

payload := checkpolicyrestrictions.CheckManagementGroupRestrictionsRequest{
	// ...
}


read, err := client.PolicyRestrictionsCheckAtManagementGroupScope(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: CheckPolicyRestrictionsClient.PolicyRestrictionsCheckAtResourceGroupScope

ctx := context.TODO()
id := checkpolicyrestrictions.NewResourceGroupID("12345678-1234-9876-4563-123456789012", "example-resource-group")

payload := checkpolicyrestrictions.CheckRestrictionsRequest{
	// ...
}


read, err := client.PolicyRestrictionsCheckAtResourceGroupScope(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: CheckPolicyRestrictionsClient.PolicyRestrictionsCheckAtSubscriptionScope

ctx := context.TODO()
id := checkpolicyrestrictions.NewSubscriptionID("12345678-1234-9876-4563-123456789012")

payload := checkpolicyrestrictions.CheckRestrictionsRequest{
	// ...
}


read, err := client.PolicyRestrictionsCheckAtSubscriptionScope(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PossibleValuesForFieldRestrictionResult

func PossibleValuesForFieldRestrictionResult() []string

func ValidateManagementGroupID

func ValidateManagementGroupID(input interface{}, key string) (warnings []string, errors []error)

ValidateManagementGroupID checks that 'input' can be parsed as a Management Group ID

Types

type CheckManagementGroupRestrictionsRequest

type CheckManagementGroupRestrictionsRequest struct {
	PendingFields   *[]PendingField                   `json:"pendingFields,omitempty"`
	ResourceDetails *CheckRestrictionsResourceDetails `json:"resourceDetails,omitempty"`
}

type CheckPolicyRestrictionsClient

type CheckPolicyRestrictionsClient struct {
	Client autorest.Client
	// contains filtered or unexported fields
}

func NewCheckPolicyRestrictionsClientWithBaseURI

func NewCheckPolicyRestrictionsClientWithBaseURI(endpoint string) CheckPolicyRestrictionsClient

func (CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtManagementGroupScope

PolicyRestrictionsCheckAtManagementGroupScope ...

func (CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtResourceGroupScope

PolicyRestrictionsCheckAtResourceGroupScope ...

func (CheckPolicyRestrictionsClient) PolicyRestrictionsCheckAtSubscriptionScope

PolicyRestrictionsCheckAtSubscriptionScope ...

type CheckRestrictionEvaluationDetails

type CheckRestrictionEvaluationDetails struct {
	EvaluatedExpressions *[]ExpressionEvaluationDetails `json:"evaluatedExpressions,omitempty"`
	IfNotExistsDetails   *IfNotExistsEvaluationDetails  `json:"ifNotExistsDetails,omitempty"`
	Reason               *string                        `json:"reason,omitempty"`
}

type CheckRestrictionsRequest

type CheckRestrictionsRequest struct {
	IncludeAuditEffect *bool                            `json:"includeAuditEffect,omitempty"`
	PendingFields      *[]PendingField                  `json:"pendingFields,omitempty"`
	ResourceDetails    CheckRestrictionsResourceDetails `json:"resourceDetails"`
}

type CheckRestrictionsResourceDetails

type CheckRestrictionsResourceDetails struct {
	ApiVersion      *string     `json:"apiVersion,omitempty"`
	ResourceContent interface{} `json:"resourceContent"`
	Scope           *string     `json:"scope,omitempty"`
}

type CheckRestrictionsResult

type CheckRestrictionsResult struct {
	ContentEvaluationResult *CheckRestrictionsResultContentEvaluationResult `json:"contentEvaluationResult,omitempty"`
	FieldRestrictions       *[]FieldRestrictions                            `json:"fieldRestrictions,omitempty"`
}

type CheckRestrictionsResultContentEvaluationResult

type CheckRestrictionsResultContentEvaluationResult struct {
	PolicyEvaluations *[]PolicyEvaluationResult `json:"policyEvaluations,omitempty"`
}

type ExpressionEvaluationDetails

type ExpressionEvaluationDetails struct {
	Expression      *string      `json:"expression,omitempty"`
	ExpressionKind  *string      `json:"expressionKind,omitempty"`
	ExpressionValue *interface{} `json:"expressionValue,omitempty"`
	Operator        *string      `json:"operator,omitempty"`
	Path            *string      `json:"path,omitempty"`
	Result          *string      `json:"result,omitempty"`
	TargetValue     *interface{} `json:"targetValue,omitempty"`
}

type FieldRestriction

type FieldRestriction struct {
	DefaultValue *string                 `json:"defaultValue,omitempty"`
	Policy       *PolicyReference        `json:"policy,omitempty"`
	PolicyEffect *string                 `json:"policyEffect,omitempty"`
	Reason       *string                 `json:"reason,omitempty"`
	Result       *FieldRestrictionResult `json:"result,omitempty"`
	Values       *[]string               `json:"values,omitempty"`
}

type FieldRestrictionResult

type FieldRestrictionResult string
const (
	FieldRestrictionResultAudit    FieldRestrictionResult = "Audit"
	FieldRestrictionResultDeny     FieldRestrictionResult = "Deny"
	FieldRestrictionResultRemoved  FieldRestrictionResult = "Removed"
	FieldRestrictionResultRequired FieldRestrictionResult = "Required"
)

type FieldRestrictions

type FieldRestrictions struct {
	Field        *string             `json:"field,omitempty"`
	Restrictions *[]FieldRestriction `json:"restrictions,omitempty"`
}

type IfNotExistsEvaluationDetails

type IfNotExistsEvaluationDetails struct {
	ResourceId     *string `json:"resourceId,omitempty"`
	TotalResources *int64  `json:"totalResources,omitempty"`
}

type ManagementGroupId

type ManagementGroupId struct {
	ManagementGroupId string
}

ManagementGroupId is a struct representing the Resource ID for a Management Group

func NewManagementGroupID

func NewManagementGroupID(managementGroupId string) ManagementGroupId

NewManagementGroupID returns a new ManagementGroupId struct

func ParseManagementGroupID

func ParseManagementGroupID(input string) (*ManagementGroupId, error)

ParseManagementGroupID parses 'input' into a ManagementGroupId

func ParseManagementGroupIDInsensitively

func ParseManagementGroupIDInsensitively(input string) (*ManagementGroupId, error)

ParseManagementGroupIDInsensitively parses 'input' case-insensitively into a ManagementGroupId note: this method should only be used for API response data and not user input

func (ManagementGroupId) ID

func (id ManagementGroupId) ID() string

ID returns the formatted Management Group ID

func (ManagementGroupId) Segments

func (id ManagementGroupId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Management Group ID

func (ManagementGroupId) String

func (id ManagementGroupId) String() string

String returns a human-readable description of this Management Group ID

type PendingField

type PendingField struct {
	Field  string    `json:"field"`
	Values *[]string `json:"values,omitempty"`
}

type PolicyEffectDetails

type PolicyEffectDetails struct {
	PolicyEffect *string `json:"policyEffect,omitempty"`
}

type PolicyEvaluationResult

type PolicyEvaluationResult struct {
	EffectDetails     *PolicyEffectDetails               `json:"effectDetails,omitempty"`
	EvaluationDetails *CheckRestrictionEvaluationDetails `json:"evaluationDetails,omitempty"`
	EvaluationResult  *string                            `json:"evaluationResult,omitempty"`
	PolicyInfo        *PolicyReference                   `json:"policyInfo,omitempty"`
}

type PolicyReference

type PolicyReference struct {
	PolicyAssignmentId          *string `json:"policyAssignmentId,omitempty"`
	PolicyDefinitionId          *string `json:"policyDefinitionId,omitempty"`
	PolicyDefinitionReferenceId *string `json:"policyDefinitionReferenceId,omitempty"`
	PolicySetDefinitionId       *string `json:"policySetDefinitionId,omitempty"`
}

type PolicyRestrictionsCheckAtManagementGroupScopeOperationResponse

type PolicyRestrictionsCheckAtManagementGroupScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckRestrictionsResult
}

type PolicyRestrictionsCheckAtResourceGroupScopeOperationResponse

type PolicyRestrictionsCheckAtResourceGroupScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckRestrictionsResult
}

type PolicyRestrictionsCheckAtSubscriptionScopeOperationResponse

type PolicyRestrictionsCheckAtSubscriptionScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckRestrictionsResult
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL