policymetadata

package
v0.20241203.1090052 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MPL-2.0 Imports: 10 Imported by: 1

README

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

The policymetadata 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-sdk/resource-manager/policyinsights/2024-10-01/policymetadata"

Client Initialization

client := policymetadata.NewPolicyMetadataClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PolicyMetadataClient.GetResource

ctx := context.TODO()
id := policymetadata.NewPolicyMetadataID("policyMetadataName")

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

Example Usage: PolicyMetadataClient.List

ctx := context.TODO()


// alternatively `client.List(ctx, policymetadata.DefaultListOperationOptions())` can be used to do batched pagination
items, err := client.ListComplete(ctx, policymetadata.DefaultListOperationOptions())
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidatePolicyMetadataID

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

ValidatePolicyMetadataID checks that 'input' can be parsed as a Policy Metadata ID

Types

type GetResourceOperationResponse

type GetResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *PolicyMetadata
}

type ListCompleteResult

type ListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []SlimPolicyMetadata
}

type ListCustomPager

type ListCustomPager struct {
	NextLink *odata.Link `json:"nextLink"`
}
func (p *ListCustomPager) NextPageLink() *odata.Link

type ListOperationOptions

type ListOperationOptions struct {
	Top *int64
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

func (ListOperationOptions) ToHeaders

func (o ListOperationOptions) ToHeaders() *client.Headers

func (ListOperationOptions) ToOData

func (o ListOperationOptions) ToOData() *odata.Query

func (ListOperationOptions) ToQuery

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]SlimPolicyMetadata
}

type PolicyMetadata

type PolicyMetadata struct {
	Id         *string                   `json:"id,omitempty"`
	Name       *string                   `json:"name,omitempty"`
	Properties *PolicyMetadataProperties `json:"properties,omitempty"`
	Type       *string                   `json:"type,omitempty"`
}

type PolicyMetadataClient

type PolicyMetadataClient struct {
	Client *resourcemanager.Client
}

func NewPolicyMetadataClientWithBaseURI

func NewPolicyMetadataClientWithBaseURI(sdkApi sdkEnv.Api) (*PolicyMetadataClient, error)

func (PolicyMetadataClient) GetResource

GetResource ...

func (PolicyMetadataClient) List

List ...

func (PolicyMetadataClient) ListComplete

ListComplete retrieves all the results into a single object

func (PolicyMetadataClient) ListCompleteMatchingPredicate

func (c PolicyMetadataClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate SlimPolicyMetadataOperationPredicate) (result ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all the results and then applies the predicate

type PolicyMetadataId

type PolicyMetadataId struct {
	PolicyMetadataName string
}

PolicyMetadataId is a struct representing the Resource ID for a Policy Metadata

func NewPolicyMetadataID

func NewPolicyMetadataID(policyMetadataName string) PolicyMetadataId

NewPolicyMetadataID returns a new PolicyMetadataId struct

func ParsePolicyMetadataID

func ParsePolicyMetadataID(input string) (*PolicyMetadataId, error)

ParsePolicyMetadataID parses 'input' into a PolicyMetadataId

func ParsePolicyMetadataIDInsensitively

func ParsePolicyMetadataIDInsensitively(input string) (*PolicyMetadataId, error)

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

func (*PolicyMetadataId) FromParseResult

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

func (PolicyMetadataId) ID

func (id PolicyMetadataId) ID() string

ID returns the formatted Policy Metadata ID

func (PolicyMetadataId) Segments

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

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

func (PolicyMetadataId) String

func (id PolicyMetadataId) String() string

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

type PolicyMetadataProperties

type PolicyMetadataProperties struct {
	AdditionalContentURL *string      `json:"additionalContentUrl,omitempty"`
	Category             *string      `json:"category,omitempty"`
	Description          *string      `json:"description,omitempty"`
	Metadata             *interface{} `json:"metadata,omitempty"`
	MetadataId           *string      `json:"metadataId,omitempty"`
	Owner                *string      `json:"owner,omitempty"`
	Requirements         *string      `json:"requirements,omitempty"`
	Title                *string      `json:"title,omitempty"`
}

type PolicyMetadataSlimProperties

type PolicyMetadataSlimProperties struct {
	AdditionalContentURL *string      `json:"additionalContentUrl,omitempty"`
	Category             *string      `json:"category,omitempty"`
	Metadata             *interface{} `json:"metadata,omitempty"`
	MetadataId           *string      `json:"metadataId,omitempty"`
	Owner                *string      `json:"owner,omitempty"`
	Title                *string      `json:"title,omitempty"`
}

type SlimPolicyMetadata

type SlimPolicyMetadata struct {
	Id         *string                       `json:"id,omitempty"`
	Name       *string                       `json:"name,omitempty"`
	Properties *PolicyMetadataSlimProperties `json:"properties,omitempty"`
	Type       *string                       `json:"type,omitempty"`
}

type SlimPolicyMetadataOperationPredicate

type SlimPolicyMetadataOperationPredicate struct {
	Id   *string
	Name *string
	Type *string
}

func (SlimPolicyMetadataOperationPredicate) Matches

Jump to

Keyboard shortcuts

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