computepolicies

package
v0.20230823.1052657 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/datalakeanalytics/2016-11-01/computepolicies Documentation

The computepolicies SDK allows for interaction with the Azure Resource Manager Service datalakeanalytics (API Version 2016-11-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/datalakeanalytics/2016-11-01/computepolicies"

Client Initialization

client := computepolicies.NewComputePoliciesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ComputePoliciesClient.CreateOrUpdate

ctx := context.TODO()
id := computepolicies.NewComputePolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "computePolicyValue")

payload := computepolicies.CreateOrUpdateComputePolicyParameters{
	// ...
}


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

Example Usage: ComputePoliciesClient.Delete

ctx := context.TODO()
id := computepolicies.NewComputePolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "computePolicyValue")

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

Example Usage: ComputePoliciesClient.Get

ctx := context.TODO()
id := computepolicies.NewComputePolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "computePolicyValue")

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

Example Usage: ComputePoliciesClient.ListByAccount

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

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

Example Usage: ComputePoliciesClient.Update

ctx := context.TODO()
id := computepolicies.NewComputePolicyID("12345678-1234-9876-4563-123456789012", "example-resource-group", "accountValue", "computePolicyValue")

payload := computepolicies.UpdateComputePolicyParameters{
	// ...
}


read, err := client.Update(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 PossibleValuesForAADObjectType

func PossibleValuesForAADObjectType() []string

func ValidateAccountID

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

ValidateAccountID checks that 'input' can be parsed as a Account ID

func ValidateComputePolicyID added in v0.20220907.1111434

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

ValidateComputePolicyID checks that 'input' can be parsed as a Compute Policy ID

Types

type AADObjectType

type AADObjectType string
const (
	AADObjectTypeGroup            AADObjectType = "Group"
	AADObjectTypeServicePrincipal AADObjectType = "ServicePrincipal"
	AADObjectTypeUser             AADObjectType = "User"
)

func (*AADObjectType) UnmarshalJSON added in v0.20230516.1215417

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

type AccountId

type AccountId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
}

AccountId is a struct representing the Resource ID for a Account

func NewAccountID

func NewAccountID(subscriptionId string, resourceGroupName string, accountName string) AccountId

NewAccountID returns a new AccountId struct

func ParseAccountID

func ParseAccountID(input string) (*AccountId, error)

ParseAccountID parses 'input' into a AccountId

func ParseAccountIDInsensitively

func ParseAccountIDInsensitively(input string) (*AccountId, error)

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

func (AccountId) ID

func (id AccountId) ID() string

ID returns the formatted Account ID

func (AccountId) Segments

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

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

func (AccountId) String

func (id AccountId) String() string

String returns a human-readable description of this Account ID

type ComputePoliciesClient

type ComputePoliciesClient struct {
	Client *resourcemanager.Client
}

func NewComputePoliciesClientWithBaseURI

func NewComputePoliciesClientWithBaseURI(sdkApi sdkEnv.Api) (*ComputePoliciesClient, error)

func (ComputePoliciesClient) CreateOrUpdate

CreateOrUpdate ...

func (ComputePoliciesClient) Delete

Delete ...

func (ComputePoliciesClient) Get

Get ...

func (ComputePoliciesClient) ListByAccount

func (c ComputePoliciesClient) ListByAccount(ctx context.Context, id AccountId) (result ListByAccountOperationResponse, err error)

ListByAccount ...

func (ComputePoliciesClient) ListByAccountComplete

ListByAccountComplete retrieves all the results into a single object

func (ComputePoliciesClient) ListByAccountCompleteMatchingPredicate

func (c ComputePoliciesClient) ListByAccountCompleteMatchingPredicate(ctx context.Context, id AccountId, predicate ComputePolicyOperationPredicate) (result ListByAccountCompleteResult, err error)

ListByAccountCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (ComputePoliciesClient) Update

Update ...

type ComputePolicy

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

type ComputePolicyId added in v0.20220907.1111434

type ComputePolicyId struct {
	SubscriptionId    string
	ResourceGroupName string
	AccountName       string
	ComputePolicyName string
}

ComputePolicyId is a struct representing the Resource ID for a Compute Policy

func NewComputePolicyID added in v0.20220907.1111434

func NewComputePolicyID(subscriptionId string, resourceGroupName string, accountName string, computePolicyName string) ComputePolicyId

NewComputePolicyID returns a new ComputePolicyId struct

func ParseComputePolicyID added in v0.20220907.1111434

func ParseComputePolicyID(input string) (*ComputePolicyId, error)

ParseComputePolicyID parses 'input' into a ComputePolicyId

func ParseComputePolicyIDInsensitively added in v0.20220907.1111434

func ParseComputePolicyIDInsensitively(input string) (*ComputePolicyId, error)

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

func (ComputePolicyId) ID added in v0.20220907.1111434

func (id ComputePolicyId) ID() string

ID returns the formatted Compute Policy ID

func (ComputePolicyId) Segments added in v0.20220907.1111434

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

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

func (ComputePolicyId) String added in v0.20220907.1111434

func (id ComputePolicyId) String() string

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

type ComputePolicyOperationPredicate

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

func (ComputePolicyOperationPredicate) Matches

type ComputePolicyProperties

type ComputePolicyProperties struct {
	MaxDegreeOfParallelismPerJob *int64         `json:"maxDegreeOfParallelismPerJob,omitempty"`
	MinPriorityPerJob            *int64         `json:"minPriorityPerJob,omitempty"`
	ObjectId                     *string        `json:"objectId,omitempty"`
	ObjectType                   *AADObjectType `json:"objectType,omitempty"`
}

type CreateOrUpdateComputePolicyParameters

type CreateOrUpdateComputePolicyParameters struct {
	Properties CreateOrUpdateComputePolicyProperties `json:"properties"`
}

type CreateOrUpdateComputePolicyProperties

type CreateOrUpdateComputePolicyProperties struct {
	MaxDegreeOfParallelismPerJob *int64        `json:"maxDegreeOfParallelismPerJob,omitempty"`
	MinPriorityPerJob            *int64        `json:"minPriorityPerJob,omitempty"`
	ObjectId                     string        `json:"objectId"`
	ObjectType                   AADObjectType `json:"objectType"`
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComputePolicy
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComputePolicy
}

type ListByAccountCompleteResult

type ListByAccountCompleteResult struct {
	Items []ComputePolicy
}

type ListByAccountOperationResponse

type ListByAccountOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ComputePolicy
}

type UpdateComputePolicyParameters

type UpdateComputePolicyParameters struct {
	Properties *UpdateComputePolicyProperties `json:"properties,omitempty"`
}

type UpdateComputePolicyProperties

type UpdateComputePolicyProperties struct {
	MaxDegreeOfParallelismPerJob *int64         `json:"maxDegreeOfParallelismPerJob,omitempty"`
	MinPriorityPerJob            *int64         `json:"minPriorityPerJob,omitempty"`
	ObjectId                     *string        `json:"objectId,omitempty"`
	ObjectType                   *AADObjectType `json:"objectType,omitempty"`
}

type UpdateOperationResponse

type UpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ComputePolicy
}

Jump to

Keyboard shortcuts

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