componentpolicystates

package
v0.20241023.1122425 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MPL-2.0 Imports: 13 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2024-10-01/componentpolicystates Documentation

The componentpolicystates SDK allows for interaction with Azure Resource Manager policyinsights (API Version 2024-10-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-helpers/resourcemanager/commonids"
import "github.com/hashicorp/go-azure-sdk/resource-manager/policyinsights/2024-10-01/componentpolicystates"

Client Initialization

client := componentpolicystates.NewComponentPolicyStatesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForPolicyDefinition

ctx := context.TODO()
id := componentpolicystates.NewPolicyDefinitionID("12345678-1234-9876-4563-123456789012", "policyDefinitionName")

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

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForResource

ctx := context.TODO()
id := commonids.NewScopeID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group")

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

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForResourceGroup

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

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

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForResourceGroupLevelPolicyAssignment

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

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

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForSubscription

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

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

Example Usage: ComponentPolicyStatesClient.ListQueryResultsForSubscriptionLevelPolicyAssignment

ctx := context.TODO()
id := componentpolicystates.NewPolicyAssignmentID("12345678-1234-9876-4563-123456789012", "policyAssignmentName")

read, err := client.ListQueryResultsForSubscriptionLevelPolicyAssignment(ctx, id, componentpolicystates.DefaultListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions())
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 ValidateAuthorizationNamespacePolicyAssignmentID

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

ValidateAuthorizationNamespacePolicyAssignmentID checks that 'input' can be parsed as a Authorization Namespace Policy Assignment ID

func ValidatePolicyAssignmentID

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

ValidatePolicyAssignmentID checks that 'input' can be parsed as a Policy Assignment ID

func ValidatePolicyDefinitionID

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

ValidatePolicyDefinitionID checks that 'input' can be parsed as a Policy Definition ID

Types

type AuthorizationNamespacePolicyAssignmentId

type AuthorizationNamespacePolicyAssignmentId struct {
	SubscriptionId       string
	ResourceGroupName    string
	PolicyAssignmentName string
}

AuthorizationNamespacePolicyAssignmentId is a struct representing the Resource ID for a Authorization Namespace Policy Assignment

func NewAuthorizationNamespacePolicyAssignmentID

func NewAuthorizationNamespacePolicyAssignmentID(subscriptionId string, resourceGroupName string, policyAssignmentName string) AuthorizationNamespacePolicyAssignmentId

NewAuthorizationNamespacePolicyAssignmentID returns a new AuthorizationNamespacePolicyAssignmentId struct

func ParseAuthorizationNamespacePolicyAssignmentID

func ParseAuthorizationNamespacePolicyAssignmentID(input string) (*AuthorizationNamespacePolicyAssignmentId, error)

ParseAuthorizationNamespacePolicyAssignmentID parses 'input' into a AuthorizationNamespacePolicyAssignmentId

func ParseAuthorizationNamespacePolicyAssignmentIDInsensitively

func ParseAuthorizationNamespacePolicyAssignmentIDInsensitively(input string) (*AuthorizationNamespacePolicyAssignmentId, error)

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

func (*AuthorizationNamespacePolicyAssignmentId) FromParseResult

func (AuthorizationNamespacePolicyAssignmentId) ID

ID returns the formatted Authorization Namespace Policy Assignment ID

func (AuthorizationNamespacePolicyAssignmentId) Segments

Segments returns a slice of Resource ID Segments which comprise this Authorization Namespace Policy Assignment ID

func (AuthorizationNamespacePolicyAssignmentId) String

String returns a human-readable description of this Authorization Namespace Policy Assignment ID

type ComponentExpressionEvaluationDetails

type ComponentExpressionEvaluationDetails 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 ComponentPolicyEvaluationDetails

type ComponentPolicyEvaluationDetails struct {
	EvaluatedExpressions *[]ComponentExpressionEvaluationDetails `json:"evaluatedExpressions,omitempty"`
	Reason               *string                                 `json:"reason,omitempty"`
}

type ComponentPolicyState

type ComponentPolicyState struct {
	ComplianceState               *string                           `json:"complianceState,omitempty"`
	ComponentId                   *string                           `json:"componentId,omitempty"`
	ComponentName                 *string                           `json:"componentName,omitempty"`
	ComponentType                 *string                           `json:"componentType,omitempty"`
	OdataContext                  *string                           `json:"@odata.context,omitempty"`
	OdataId                       *string                           `json:"@odata.id,omitempty"`
	PolicyAssignmentId            *string                           `json:"policyAssignmentId,omitempty"`
	PolicyAssignmentName          *string                           `json:"policyAssignmentName,omitempty"`
	PolicyAssignmentOwner         *string                           `json:"policyAssignmentOwner,omitempty"`
	PolicyAssignmentParameters    *string                           `json:"policyAssignmentParameters,omitempty"`
	PolicyAssignmentScope         *string                           `json:"policyAssignmentScope,omitempty"`
	PolicyAssignmentVersion       *string                           `json:"policyAssignmentVersion,omitempty"`
	PolicyDefinitionAction        *string                           `json:"policyDefinitionAction,omitempty"`
	PolicyDefinitionCategory      *string                           `json:"policyDefinitionCategory,omitempty"`
	PolicyDefinitionGroupNames    *[]string                         `json:"policyDefinitionGroupNames,omitempty"`
	PolicyDefinitionId            *string                           `json:"policyDefinitionId,omitempty"`
	PolicyDefinitionName          *string                           `json:"policyDefinitionName,omitempty"`
	PolicyDefinitionReferenceId   *string                           `json:"policyDefinitionReferenceId,omitempty"`
	PolicyDefinitionVersion       *string                           `json:"policyDefinitionVersion,omitempty"`
	PolicyEvaluationDetails       *ComponentPolicyEvaluationDetails `json:"policyEvaluationDetails,omitempty"`
	PolicySetDefinitionCategory   *string                           `json:"policySetDefinitionCategory,omitempty"`
	PolicySetDefinitionId         *string                           `json:"policySetDefinitionId,omitempty"`
	PolicySetDefinitionName       *string                           `json:"policySetDefinitionName,omitempty"`
	PolicySetDefinitionOwner      *string                           `json:"policySetDefinitionOwner,omitempty"`
	PolicySetDefinitionParameters *string                           `json:"policySetDefinitionParameters,omitempty"`
	PolicySetDefinitionVersion    *string                           `json:"policySetDefinitionVersion,omitempty"`
	ResourceGroup                 *string                           `json:"resourceGroup,omitempty"`
	ResourceId                    *string                           `json:"resourceId,omitempty"`
	ResourceLocation              *string                           `json:"resourceLocation,omitempty"`
	ResourceType                  *string                           `json:"resourceType,omitempty"`
	SubscriptionId                *string                           `json:"subscriptionId,omitempty"`
	Timestamp                     *string                           `json:"timestamp,omitempty"`
}

func (*ComponentPolicyState) GetTimestampAsTime

func (o *ComponentPolicyState) GetTimestampAsTime() (*time.Time, error)

func (*ComponentPolicyState) SetTimestampAsTime

func (o *ComponentPolicyState) SetTimestampAsTime(input time.Time)

type ComponentPolicyStatesClient

type ComponentPolicyStatesClient struct {
	Client *resourcemanager.Client
}

func NewComponentPolicyStatesClientWithBaseURI

func NewComponentPolicyStatesClientWithBaseURI(sdkApi sdkEnv.Api) (*ComponentPolicyStatesClient, error)

func (ComponentPolicyStatesClient) ListQueryResultsForPolicyDefinition

ListQueryResultsForPolicyDefinition ...

func (ComponentPolicyStatesClient) ListQueryResultsForResource

ListQueryResultsForResource ...

func (ComponentPolicyStatesClient) ListQueryResultsForResourceGroup

ListQueryResultsForResourceGroup ...

func (ComponentPolicyStatesClient) ListQueryResultsForResourceGroupLevelPolicyAssignment

ListQueryResultsForResourceGroupLevelPolicyAssignment ...

func (ComponentPolicyStatesClient) ListQueryResultsForSubscription

ListQueryResultsForSubscription ...

func (ComponentPolicyStatesClient) ListQueryResultsForSubscriptionLevelPolicyAssignment

ListQueryResultsForSubscriptionLevelPolicyAssignment ...

type ComponentPolicyStatesQueryResults

type ComponentPolicyStatesQueryResults struct {
	OdataContext *string                 `json:"@odata.context,omitempty"`
	OdataCount   *int64                  `json:"@odata.count,omitempty"`
	Value        *[]ComponentPolicyState `json:"value,omitempty"`
}

type ListQueryResultsForPolicyDefinitionOperationOptions

type ListQueryResultsForPolicyDefinitionOperationOptions struct {
	Apply   *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func DefaultListQueryResultsForPolicyDefinitionOperationOptions

func DefaultListQueryResultsForPolicyDefinitionOperationOptions() ListQueryResultsForPolicyDefinitionOperationOptions

func (ListQueryResultsForPolicyDefinitionOperationOptions) ToHeaders

func (ListQueryResultsForPolicyDefinitionOperationOptions) ToOData

func (ListQueryResultsForPolicyDefinitionOperationOptions) ToQuery

type ListQueryResultsForPolicyDefinitionOperationResponse

type ListQueryResultsForPolicyDefinitionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationOptions

type ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationOptions struct {
	Apply   *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func (ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationOptions) ToHeaders

func (ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationOptions) ToOData

func (ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationOptions) ToQuery

type ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationResponse

type ListQueryResultsForResourceGroupLevelPolicyAssignmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type ListQueryResultsForResourceGroupOperationOptions

type ListQueryResultsForResourceGroupOperationOptions struct {
	Apply   *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func DefaultListQueryResultsForResourceGroupOperationOptions

func DefaultListQueryResultsForResourceGroupOperationOptions() ListQueryResultsForResourceGroupOperationOptions

func (ListQueryResultsForResourceGroupOperationOptions) ToHeaders

func (ListQueryResultsForResourceGroupOperationOptions) ToOData

func (ListQueryResultsForResourceGroupOperationOptions) ToQuery

type ListQueryResultsForResourceGroupOperationResponse

type ListQueryResultsForResourceGroupOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type ListQueryResultsForResourceOperationOptions

type ListQueryResultsForResourceOperationOptions struct {
	Apply   *string
	Expand  *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func DefaultListQueryResultsForResourceOperationOptions

func DefaultListQueryResultsForResourceOperationOptions() ListQueryResultsForResourceOperationOptions

func (ListQueryResultsForResourceOperationOptions) ToHeaders

func (ListQueryResultsForResourceOperationOptions) ToOData

func (ListQueryResultsForResourceOperationOptions) ToQuery

type ListQueryResultsForResourceOperationResponse

type ListQueryResultsForResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions

type ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions struct {
	Apply   *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func (ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions) ToHeaders

func (ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions) ToOData

func (ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationOptions) ToQuery

type ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationResponse

type ListQueryResultsForSubscriptionLevelPolicyAssignmentOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type ListQueryResultsForSubscriptionOperationOptions

type ListQueryResultsForSubscriptionOperationOptions struct {
	Apply   *string
	Filter  *string
	From    *string
	Orderby *string
	Select  *string
	To      *string
	Top     *int64
}

func DefaultListQueryResultsForSubscriptionOperationOptions

func DefaultListQueryResultsForSubscriptionOperationOptions() ListQueryResultsForSubscriptionOperationOptions

func (ListQueryResultsForSubscriptionOperationOptions) ToHeaders

func (ListQueryResultsForSubscriptionOperationOptions) ToOData

func (ListQueryResultsForSubscriptionOperationOptions) ToQuery

type ListQueryResultsForSubscriptionOperationResponse

type ListQueryResultsForSubscriptionOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComponentPolicyStatesQueryResults
}

type PolicyAssignmentId

type PolicyAssignmentId struct {
	SubscriptionId       string
	PolicyAssignmentName string
}

PolicyAssignmentId is a struct representing the Resource ID for a Policy Assignment

func NewPolicyAssignmentID

func NewPolicyAssignmentID(subscriptionId string, policyAssignmentName string) PolicyAssignmentId

NewPolicyAssignmentID returns a new PolicyAssignmentId struct

func ParsePolicyAssignmentID

func ParsePolicyAssignmentID(input string) (*PolicyAssignmentId, error)

ParsePolicyAssignmentID parses 'input' into a PolicyAssignmentId

func ParsePolicyAssignmentIDInsensitively

func ParsePolicyAssignmentIDInsensitively(input string) (*PolicyAssignmentId, error)

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

func (*PolicyAssignmentId) FromParseResult

func (id *PolicyAssignmentId) FromParseResult(input resourceids.ParseResult) error

func (PolicyAssignmentId) ID

func (id PolicyAssignmentId) ID() string

ID returns the formatted Policy Assignment ID

func (PolicyAssignmentId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Policy Assignment ID

func (PolicyAssignmentId) String

func (id PolicyAssignmentId) String() string

String returns a human-readable description of this Policy Assignment ID

type PolicyDefinitionId

type PolicyDefinitionId struct {
	SubscriptionId       string
	PolicyDefinitionName string
}

PolicyDefinitionId is a struct representing the Resource ID for a Policy Definition

func NewPolicyDefinitionID

func NewPolicyDefinitionID(subscriptionId string, policyDefinitionName string) PolicyDefinitionId

NewPolicyDefinitionID returns a new PolicyDefinitionId struct

func ParsePolicyDefinitionID

func ParsePolicyDefinitionID(input string) (*PolicyDefinitionId, error)

ParsePolicyDefinitionID parses 'input' into a PolicyDefinitionId

func ParsePolicyDefinitionIDInsensitively

func ParsePolicyDefinitionIDInsensitively(input string) (*PolicyDefinitionId, error)

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

func (*PolicyDefinitionId) FromParseResult

func (id *PolicyDefinitionId) FromParseResult(input resourceids.ParseResult) error

func (PolicyDefinitionId) ID

func (id PolicyDefinitionId) ID() string

ID returns the formatted Policy Definition ID

func (PolicyDefinitionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Policy Definition ID

func (PolicyDefinitionId) String

func (id PolicyDefinitionId) String() string

String returns a human-readable description of this Policy Definition ID

Jump to

Keyboard shortcuts

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