scheduledactions

package
v0.20221118.1114350 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/costmanagement/2022-10-01/scheduledactions Documentation

The scheduledactions SDK allows for interaction with the Azure Resource Manager Service costmanagement (API Version 2022-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/costmanagement/2022-10-01/scheduledactions"

Client Initialization

client := scheduledactions.NewScheduledActionsClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: ScheduledActionsClient.CheckNameAvailability

ctx := context.TODO()

payload := scheduledactions.CheckNameAvailabilityRequest{
	// ...
}


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

Example Usage: ScheduledActionsClient.CheckNameAvailabilityByScope

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

payload := scheduledactions.CheckNameAvailabilityRequest{
	// ...
}


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

Example Usage: ScheduledActionsClient.CreateOrUpdate

ctx := context.TODO()
id := scheduledactions.NewScheduledActionID("nameValue")

payload := scheduledactions.ScheduledAction{
	// ...
}


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: ScheduledActionsClient.CreateOrUpdateByScope

ctx := context.TODO()
id := scheduledactions.NewScopedScheduledActionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "nameValue")

payload := scheduledactions.ScheduledAction{
	// ...
}


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

Example Usage: ScheduledActionsClient.Delete

ctx := context.TODO()
id := scheduledactions.NewScheduledActionID("nameValue")

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: ScheduledActionsClient.DeleteByScope

ctx := context.TODO()
id := scheduledactions.NewScopedScheduledActionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "nameValue")

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

Example Usage: ScheduledActionsClient.Get

ctx := context.TODO()
id := scheduledactions.NewScheduledActionID("nameValue")

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: ScheduledActionsClient.GetByScope

ctx := context.TODO()
id := scheduledactions.NewScopedScheduledActionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "nameValue")

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

Example Usage: ScheduledActionsClient.List

ctx := context.TODO()


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

Example Usage: ScheduledActionsClient.ListByScope

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

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

Example Usage: ScheduledActionsClient.Run

ctx := context.TODO()
id := scheduledactions.NewScheduledActionID("nameValue")

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

Example Usage: ScheduledActionsClient.RunByScope

ctx := context.TODO()
id := scheduledactions.NewScopedScheduledActionID("/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/some-resource-group", "nameValue")

read, err := client.RunByScope(ctx, id)
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 PossibleValuesForCheckNameAvailabilityReason

func PossibleValuesForCheckNameAvailabilityReason() []string

func PossibleValuesForDaysOfWeek

func PossibleValuesForDaysOfWeek() []string

func PossibleValuesForFileFormat

func PossibleValuesForFileFormat() []string

func PossibleValuesForScheduleFrequency

func PossibleValuesForScheduleFrequency() []string

func PossibleValuesForScheduledActionKind

func PossibleValuesForScheduledActionKind() []string

func PossibleValuesForScheduledActionStatus

func PossibleValuesForScheduledActionStatus() []string

func PossibleValuesForWeeksOfMonth

func PossibleValuesForWeeksOfMonth() []string

func ValidateScheduledActionID

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

ValidateScheduledActionID checks that 'input' can be parsed as a Scheduled Action ID

func ValidateScopedScheduledActionID

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

ValidateScopedScheduledActionID checks that 'input' can be parsed as a Scoped Scheduled Action ID

Types

type CheckNameAvailabilityByScopeOperationResponse

type CheckNameAvailabilityByScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckNameAvailabilityResponse
}

type CheckNameAvailabilityOperationResponse

type CheckNameAvailabilityOperationResponse struct {
	HttpResponse *http.Response
	Model        *CheckNameAvailabilityResponse
}

type CheckNameAvailabilityReason

type CheckNameAvailabilityReason string
const (
	CheckNameAvailabilityReasonAlreadyExists CheckNameAvailabilityReason = "AlreadyExists"
	CheckNameAvailabilityReasonInvalid       CheckNameAvailabilityReason = "Invalid"
)

type CheckNameAvailabilityRequest

type CheckNameAvailabilityRequest struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
}

type CheckNameAvailabilityResponse

type CheckNameAvailabilityResponse struct {
	Message       *string                      `json:"message,omitempty"`
	NameAvailable *bool                        `json:"nameAvailable,omitempty"`
	Reason        *CheckNameAvailabilityReason `json:"reason,omitempty"`
}

type CreateOrUpdateByScopeOperationResponse

type CreateOrUpdateByScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledAction
}

type CreateOrUpdateOperationResponse

type CreateOrUpdateOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledAction
}

type DaysOfWeek

type DaysOfWeek string
const (
	DaysOfWeekFriday    DaysOfWeek = "Friday"
	DaysOfWeekMonday    DaysOfWeek = "Monday"
	DaysOfWeekSaturday  DaysOfWeek = "Saturday"
	DaysOfWeekSunday    DaysOfWeek = "Sunday"
	DaysOfWeekThursday  DaysOfWeek = "Thursday"
	DaysOfWeekTuesday   DaysOfWeek = "Tuesday"
	DaysOfWeekWednesday DaysOfWeek = "Wednesday"
)

type DeleteByScopeOperationResponse

type DeleteByScopeOperationResponse struct {
	HttpResponse *http.Response
}

type DeleteOperationResponse

type DeleteOperationResponse struct {
	HttpResponse *http.Response
}

type FileDestination

type FileDestination struct {
	FileFormats *[]FileFormat `json:"fileFormats,omitempty"`
}

type FileFormat

type FileFormat string
const (
	FileFormatCsv FileFormat = "Csv"
)

type GetByScopeOperationResponse

type GetByScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledAction
}

type GetOperationResponse

type GetOperationResponse struct {
	HttpResponse *http.Response
	Model        *ScheduledAction
}

type ListByScopeCompleteResult

type ListByScopeCompleteResult struct {
	Items []ScheduledAction
}

type ListByScopeOperationOptions

type ListByScopeOperationOptions struct {
	Filter *string
}

func DefaultListByScopeOperationOptions

func DefaultListByScopeOperationOptions() ListByScopeOperationOptions

type ListByScopeOperationResponse

type ListByScopeOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ScheduledAction
	// contains filtered or unexported fields
}

func (ListByScopeOperationResponse) HasMore

func (r ListByScopeOperationResponse) HasMore() bool

func (ListByScopeOperationResponse) LoadMore

type ListCompleteResult

type ListCompleteResult struct {
	Items []ScheduledAction
}

type ListOperationOptions

type ListOperationOptions struct {
	Filter *string
}

func DefaultListOperationOptions

func DefaultListOperationOptions() ListOperationOptions

type ListOperationResponse

type ListOperationResponse struct {
	HttpResponse *http.Response
	Model        *[]ScheduledAction
	// contains filtered or unexported fields
}

func (ListOperationResponse) HasMore

func (r ListOperationResponse) HasMore() bool

func (ListOperationResponse) LoadMore

func (r ListOperationResponse) LoadMore(ctx context.Context) (resp ListOperationResponse, err error)

type NotificationProperties

type NotificationProperties struct {
	Language       *string  `json:"language,omitempty"`
	Message        *string  `json:"message,omitempty"`
	RegionalFormat *string  `json:"regionalFormat,omitempty"`
	Subject        string   `json:"subject"`
	To             []string `json:"to"`
}

type RunByScopeOperationResponse

type RunByScopeOperationResponse struct {
	HttpResponse *http.Response
}

type RunOperationResponse

type RunOperationResponse struct {
	HttpResponse *http.Response
}

type ScheduleFrequency

type ScheduleFrequency string
const (
	ScheduleFrequencyDaily   ScheduleFrequency = "Daily"
	ScheduleFrequencyMonthly ScheduleFrequency = "Monthly"
	ScheduleFrequencyWeekly  ScheduleFrequency = "Weekly"
)

type ScheduleProperties

type ScheduleProperties struct {
	DayOfMonth   *int64            `json:"dayOfMonth,omitempty"`
	DaysOfWeek   *[]DaysOfWeek     `json:"daysOfWeek,omitempty"`
	EndDate      string            `json:"endDate"`
	Frequency    ScheduleFrequency `json:"frequency"`
	HourOfDay    *int64            `json:"hourOfDay,omitempty"`
	StartDate    string            `json:"startDate"`
	WeeksOfMonth *[]WeeksOfMonth   `json:"weeksOfMonth,omitempty"`
}

func (*ScheduleProperties) GetEndDateAsTime

func (o *ScheduleProperties) GetEndDateAsTime() (*time.Time, error)

func (*ScheduleProperties) GetStartDateAsTime

func (o *ScheduleProperties) GetStartDateAsTime() (*time.Time, error)

func (*ScheduleProperties) SetEndDateAsTime

func (o *ScheduleProperties) SetEndDateAsTime(input time.Time)

func (*ScheduleProperties) SetStartDateAsTime

func (o *ScheduleProperties) SetStartDateAsTime(input time.Time)

type ScheduledAction

type ScheduledAction struct {
	ETag       *string                    `json:"eTag,omitempty"`
	Id         *string                    `json:"id,omitempty"`
	Kind       *ScheduledActionKind       `json:"kind,omitempty"`
	Name       *string                    `json:"name,omitempty"`
	Properties *ScheduledActionProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData     `json:"systemData,omitempty"`
	Type       *string                    `json:"type,omitempty"`
}

type ScheduledActionId

type ScheduledActionId struct {
	Name string
}

ScheduledActionId is a struct representing the Resource ID for a Scheduled Action

func NewScheduledActionID

func NewScheduledActionID(name string) ScheduledActionId

NewScheduledActionID returns a new ScheduledActionId struct

func ParseScheduledActionID

func ParseScheduledActionID(input string) (*ScheduledActionId, error)

ParseScheduledActionID parses 'input' into a ScheduledActionId

func ParseScheduledActionIDInsensitively

func ParseScheduledActionIDInsensitively(input string) (*ScheduledActionId, error)

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

func (ScheduledActionId) ID

func (id ScheduledActionId) ID() string

ID returns the formatted Scheduled Action ID

func (ScheduledActionId) Segments

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

Segments returns a slice of Resource ID Segments which comprise this Scheduled Action ID

func (ScheduledActionId) String

func (id ScheduledActionId) String() string

String returns a human-readable description of this Scheduled Action ID

type ScheduledActionKind

type ScheduledActionKind string
const (
	ScheduledActionKindEmail        ScheduledActionKind = "Email"
	ScheduledActionKindInsightAlert ScheduledActionKind = "InsightAlert"
)

type ScheduledActionOperationPredicate

type ScheduledActionOperationPredicate struct {
	ETag *string
	Id   *string
	Name *string
	Type *string
}

func (ScheduledActionOperationPredicate) Matches

type ScheduledActionProperties

type ScheduledActionProperties struct {
	DisplayName       string                 `json:"displayName"`
	FileDestination   *FileDestination       `json:"fileDestination,omitempty"`
	Notification      NotificationProperties `json:"notification"`
	NotificationEmail *string                `json:"notificationEmail,omitempty"`
	Schedule          ScheduleProperties     `json:"schedule"`
	Scope             *string                `json:"scope,omitempty"`
	Status            ScheduledActionStatus  `json:"status"`
	ViewId            string                 `json:"viewId"`
}

type ScheduledActionStatus

type ScheduledActionStatus string
const (
	ScheduledActionStatusDisabled ScheduledActionStatus = "Disabled"
	ScheduledActionStatusEnabled  ScheduledActionStatus = "Enabled"
	ScheduledActionStatusExpired  ScheduledActionStatus = "Expired"
)

type ScheduledActionsClient

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

func NewScheduledActionsClientWithBaseURI

func NewScheduledActionsClientWithBaseURI(endpoint string) ScheduledActionsClient

func (ScheduledActionsClient) CheckNameAvailability

CheckNameAvailability ...

func (ScheduledActionsClient) CheckNameAvailabilityByScope

CheckNameAvailabilityByScope ...

func (ScheduledActionsClient) CreateOrUpdate

CreateOrUpdate ...

func (ScheduledActionsClient) CreateOrUpdateByScope

CreateOrUpdateByScope ...

func (ScheduledActionsClient) Delete

Delete ...

func (ScheduledActionsClient) DeleteByScope

DeleteByScope ...

func (ScheduledActionsClient) Get

Get ...

func (ScheduledActionsClient) GetByScope

GetByScope ...

func (ScheduledActionsClient) List

List ...

func (ScheduledActionsClient) ListByScope

ListByScope ...

func (ScheduledActionsClient) ListByScopeComplete

ListByScopeComplete retrieves all of the results into a single object

func (ScheduledActionsClient) ListByScopeCompleteMatchingPredicate

func (c ScheduledActionsClient) ListByScopeCompleteMatchingPredicate(ctx context.Context, id commonids.ScopeId, options ListByScopeOperationOptions, predicate ScheduledActionOperationPredicate) (resp ListByScopeCompleteResult, err error)

ListByScopeCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScheduledActionsClient) ListComplete

ListComplete retrieves all of the results into a single object

func (ScheduledActionsClient) ListCompleteMatchingPredicate

func (c ScheduledActionsClient) ListCompleteMatchingPredicate(ctx context.Context, options ListOperationOptions, predicate ScheduledActionOperationPredicate) (resp ListCompleteResult, err error)

ListCompleteMatchingPredicate retrieves all of the results and then applied the predicate

func (ScheduledActionsClient) Run

Run ...

func (ScheduledActionsClient) RunByScope

RunByScope ...

type ScopedScheduledActionId

type ScopedScheduledActionId struct {
	Scope string
	Name  string
}

ScopedScheduledActionId is a struct representing the Resource ID for a Scoped Scheduled Action

func NewScopedScheduledActionID

func NewScopedScheduledActionID(scope string, name string) ScopedScheduledActionId

NewScopedScheduledActionID returns a new ScopedScheduledActionId struct

func ParseScopedScheduledActionID

func ParseScopedScheduledActionID(input string) (*ScopedScheduledActionId, error)

ParseScopedScheduledActionID parses 'input' into a ScopedScheduledActionId

func ParseScopedScheduledActionIDInsensitively

func ParseScopedScheduledActionIDInsensitively(input string) (*ScopedScheduledActionId, error)

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

func (ScopedScheduledActionId) ID

ID returns the formatted Scoped Scheduled Action ID

func (ScopedScheduledActionId) Segments

Segments returns a slice of Resource ID Segments which comprise this Scoped Scheduled Action ID

func (ScopedScheduledActionId) String

func (id ScopedScheduledActionId) String() string

String returns a human-readable description of this Scoped Scheduled Action ID

type WeeksOfMonth

type WeeksOfMonth string
const (
	WeeksOfMonthFirst  WeeksOfMonth = "First"
	WeeksOfMonthFourth WeeksOfMonth = "Fourth"
	WeeksOfMonthLast   WeeksOfMonth = "Last"
	WeeksOfMonthSecond WeeksOfMonth = "Second"
	WeeksOfMonthThird  WeeksOfMonth = "Third"
)

Jump to

Keyboard shortcuts

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