patchschedules

package
v0.20240108.1165100 Latest Latest
Warning

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

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

README

github.com/hashicorp/go-azure-sdk/resource-manager/redis/2023-08-01/patchschedules Documentation

The patchschedules SDK allows for interaction with the Azure Resource Manager Service redis (API Version 2023-08-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/redis/2023-08-01/patchschedules"

Client Initialization

client := patchschedules.NewPatchSchedulesClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: PatchSchedulesClient.CreateOrUpdate

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

payload := patchschedules.RedisPatchSchedule{
	// ...
}


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: PatchSchedulesClient.Delete

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

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: PatchSchedulesClient.Get

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

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: PatchSchedulesClient.ListByRedisResource

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

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

func PossibleValuesForDayOfWeek() []string

func ValidateRediID

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

ValidateRediID checks that 'input' can be parsed as a Redi ID

Types

type CreateOrUpdateOperationResponse

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

type DayOfWeek

type DayOfWeek string
const (
	DayOfWeekEveryday  DayOfWeek = "Everyday"
	DayOfWeekFriday    DayOfWeek = "Friday"
	DayOfWeekMonday    DayOfWeek = "Monday"
	DayOfWeekSaturday  DayOfWeek = "Saturday"
	DayOfWeekSunday    DayOfWeek = "Sunday"
	DayOfWeekThursday  DayOfWeek = "Thursday"
	DayOfWeekTuesday   DayOfWeek = "Tuesday"
	DayOfWeekWednesday DayOfWeek = "Wednesday"
	DayOfWeekWeekend   DayOfWeek = "Weekend"
)

func (*DayOfWeek) UnmarshalJSON

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

type DeleteOperationResponse

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

type GetOperationResponse

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

type ListByRedisResourceCompleteResult

type ListByRedisResourceCompleteResult struct {
	Items []RedisPatchSchedule
}

type ListByRedisResourceOperationResponse

type ListByRedisResourceOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]RedisPatchSchedule
}

type PatchSchedulesClient

type PatchSchedulesClient struct {
	Client *resourcemanager.Client
}

func NewPatchSchedulesClientWithBaseURI

func NewPatchSchedulesClientWithBaseURI(sdkApi sdkEnv.Api) (*PatchSchedulesClient, error)

func (PatchSchedulesClient) CreateOrUpdate

CreateOrUpdate ...

func (PatchSchedulesClient) Delete

func (c PatchSchedulesClient) Delete(ctx context.Context, id RediId) (result DeleteOperationResponse, err error)

Delete ...

func (PatchSchedulesClient) Get

Get ...

func (PatchSchedulesClient) ListByRedisResource

func (c PatchSchedulesClient) ListByRedisResource(ctx context.Context, id RediId) (result ListByRedisResourceOperationResponse, err error)

ListByRedisResource ...

func (PatchSchedulesClient) ListByRedisResourceComplete

func (c PatchSchedulesClient) ListByRedisResourceComplete(ctx context.Context, id RediId) (ListByRedisResourceCompleteResult, error)

ListByRedisResourceComplete retrieves all the results into a single object

func (PatchSchedulesClient) ListByRedisResourceCompleteMatchingPredicate

func (c PatchSchedulesClient) ListByRedisResourceCompleteMatchingPredicate(ctx context.Context, id RediId, predicate RedisPatchScheduleOperationPredicate) (result ListByRedisResourceCompleteResult, err error)

ListByRedisResourceCompleteMatchingPredicate retrieves all the results and then applies the predicate

type RediId

type RediId struct {
	SubscriptionId    string
	ResourceGroupName string
	RedisName         string
}

RediId is a struct representing the Resource ID for a Redi

func NewRediID

func NewRediID(subscriptionId string, resourceGroupName string, redisName string) RediId

NewRediID returns a new RediId struct

func ParseRediID

func ParseRediID(input string) (*RediId, error)

ParseRediID parses 'input' into a RediId

func ParseRediIDInsensitively

func ParseRediIDInsensitively(input string) (*RediId, error)

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

func (*RediId) FromParseResult added in v0.20231127.1171502

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

func (RediId) ID

func (id RediId) ID() string

ID returns the formatted Redi ID

func (RediId) Segments

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

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

func (RediId) String

func (id RediId) String() string

String returns a human-readable description of this Redi ID

type RedisPatchSchedule

type RedisPatchSchedule struct {
	Id         *string         `json:"id,omitempty"`
	Location   *string         `json:"location,omitempty"`
	Name       *string         `json:"name,omitempty"`
	Properties ScheduleEntries `json:"properties"`
	Type       *string         `json:"type,omitempty"`
}

type RedisPatchScheduleOperationPredicate

type RedisPatchScheduleOperationPredicate struct {
	Id       *string
	Location *string
	Name     *string
	Type     *string
}

func (RedisPatchScheduleOperationPredicate) Matches

type ScheduleEntries

type ScheduleEntries struct {
	ScheduleEntries []ScheduleEntry `json:"scheduleEntries"`
}

type ScheduleEntry

type ScheduleEntry struct {
	DayOfWeek         DayOfWeek `json:"dayOfWeek"`
	MaintenanceWindow *string   `json:"maintenanceWindow,omitempty"`
	StartHourUtc      int64     `json:"startHourUtc"`
}

Jump to

Keyboard shortcuts

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