allpolicies

package
v0.20240228.1135502 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

README

github.com/hashicorp/go-azure-sdk/resource-manager/apimanagement/2023-05-01-preview/allpolicies Documentation

The allpolicies SDK allows for interaction with the Azure Resource Manager Service apimanagement (API Version 2023-05-01-preview).

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/apimanagement/2023-05-01-preview/allpolicies"

Client Initialization

client := allpolicies.NewAllPoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: AllPoliciesClient.ListByService

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

// alternatively `client.ListByService(ctx, id)` can be used to do batched pagination
items, err := client.ListByServiceComplete(ctx, id)
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 PossibleValuesForPolicyComplianceState

func PossibleValuesForPolicyComplianceState() []string

func ValidateServiceID

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

ValidateServiceID checks that 'input' can be parsed as a Service ID

Types

type AllPoliciesClient

type AllPoliciesClient struct {
	Client *resourcemanager.Client
}

func NewAllPoliciesClientWithBaseURI

func NewAllPoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*AllPoliciesClient, error)

func (AllPoliciesClient) ListByService

func (c AllPoliciesClient) ListByService(ctx context.Context, id ServiceId) (result ListByServiceOperationResponse, err error)

ListByService ...

func (AllPoliciesClient) ListByServiceComplete

func (c AllPoliciesClient) ListByServiceComplete(ctx context.Context, id ServiceId) (ListByServiceCompleteResult, error)

ListByServiceComplete retrieves all the results into a single object

func (AllPoliciesClient) ListByServiceCompleteMatchingPredicate

func (c AllPoliciesClient) ListByServiceCompleteMatchingPredicate(ctx context.Context, id ServiceId, predicate AllPoliciesContractOperationPredicate) (result ListByServiceCompleteResult, err error)

ListByServiceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type AllPoliciesContract

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

type AllPoliciesContractOperationPredicate

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

func (AllPoliciesContractOperationPredicate) Matches

type AllPoliciesContractProperties

type AllPoliciesContractProperties struct {
	ComplianceState   *PolicyComplianceState `json:"complianceState,omitempty"`
	ReferencePolicyId *string                `json:"referencePolicyId,omitempty"`
}

type ListByServiceCompleteResult

type ListByServiceCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []AllPoliciesContract
}

type ListByServiceOperationResponse

type ListByServiceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]AllPoliciesContract
}

type PolicyComplianceState

type PolicyComplianceState string
const (
	PolicyComplianceStateCompliant    PolicyComplianceState = "Compliant"
	PolicyComplianceStateNonCompliant PolicyComplianceState = "NonCompliant"
	PolicyComplianceStatePending      PolicyComplianceState = "Pending"
)

func (*PolicyComplianceState) UnmarshalJSON

func (s *PolicyComplianceState) UnmarshalJSON(bytes []byte) error

type ServiceId

type ServiceId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
}

ServiceId is a struct representing the Resource ID for a Service

func NewServiceID

func NewServiceID(subscriptionId string, resourceGroupName string, serviceName string) ServiceId

NewServiceID returns a new ServiceId struct

func ParseServiceID

func ParseServiceID(input string) (*ServiceId, error)

ParseServiceID parses 'input' into a ServiceId

func ParseServiceIDInsensitively

func ParseServiceIDInsensitively(input string) (*ServiceId, error)

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

func (*ServiceId) FromParseResult

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

func (ServiceId) ID

func (id ServiceId) ID() string

ID returns the formatted Service ID

func (ServiceId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Service ID

func (ServiceId) String

func (id ServiceId) String() string

String returns a human-readable description of this Service ID

Jump to

Keyboard shortcuts

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